CbmRoot
Loading...
Searching...
No Matches
PsdGbtReader-v0.00.h
Go to the documentation of this file.
1/* Copyright (C) 2019-2021 Institute for Nuclear Research, Moscow
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Nikolay Karpushkin [committer], David Emschermann, Pierre-Alain Loizeau*/
4
5#ifndef PSD_GBT_READER_V000_H
6#define PSD_GBT_READER_V000_H
7
8#include <cstdint>
9#include <vector> // for vector
10
11#include "PsdGbtDataFormat-v0.00.h" // for PsdHitData, PsdHitHeader, PsdEventHead...
12
13namespace PsdDataV000
14{
16
17 public:
19 PsdGbtReader(const uint64_t* input)
20 {
21 buffer = input;
23 }
24
26
31
32 std::vector<PsdHitHeader> VectHitHdr;
33 std::vector<PsdHitData> VectHitData;
34
35 void SetInput(const uint64_t* input)
36 {
37 buffer = input;
39 }
40 void SetPrintOutMode(bool mode) { PrintOut = mode; }
43 void ReadHitHeaderFles();
44 void ReadHitDataFles();
45 int ReadEventFles();
46
47 //Getters
48 uint32_t GetTotalGbtWordsRead() { return gbt_word_index; }
49
50 private:
51 const uint64_t* buffer;
52
53 bool PrintOut = false;
54 uint32_t gbt_word_index = 0;
55 int buffer_shift = 0;
56 };
57} // namespace PsdDataV000
58
59#endif // PSD_GBT_READER_V000_H
std::vector< PsdHitData > VectHitData
std::vector< PsdHitHeader > VectHitHdr
void SetInput(const uint64_t *input)
PsdGbtReader(const uint64_t *input)