CbmRoot
PsdGbtReader.h
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------
2 // ----- -----
3 // ----- PsdGbtDataReader -----
4 // ----- Created 14.09.2019 by N.Karpushkin -----
5 // ----- -----
6 // -----------------------------------------------------------------------------
7 
8 #ifndef PSD_GBT_READER_H_
9 #define PSD_GBT_READER_H_
10 
11 #include <stdint.h> // for uint64_t, uint32_t
12 #include <vector> // for vector
13 
14 #include "PsdGbtDataFormat.h" // for PsdHitData, PsdHitHeader, PsdEventHead...
15 
16 namespace PsdData {
17  class PsdGbtReader {
18 
19  public:
21  PsdGbtReader(const uint64_t* input) {
22  buffer = input;
23  gbt_word_index = 0;
24  }
25 
26  ~PsdGbtReader();
27 
32 
33  std::vector<PsdHitHeader> VectHitHdr;
34  std::vector<PsdHitData> VectHitData;
35 
36  void SetInput(const uint64_t* input) {
37  buffer = input;
38  gbt_word_index = 0;
39  }
40  void SetPrintOutMode(bool mode) { PrintOut = mode; }
41  void ReadEventHeaderAbFles();
42  void ReadEventHeaderAcFles();
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 PsdData
58 
59 #endif // PSD_GBT_READER_H_
PsdData::PsdGbtReader::SetPrintOutMode
void SetPrintOutMode(bool mode)
Definition: PsdGbtReader.h:40
PsdData::PsdGbtReader::buffer
const uint64_t * buffer
Definition: PsdGbtReader.h:51
PsdData::PsdGbtReader::VectHitData
std::vector< PsdHitData > VectHitData
Definition: PsdGbtReader.h:34
PsdData::PsdGbtReader::ReadEventHeaderAcFles
void ReadEventHeaderAcFles()
Definition: PsdGbtReader.cxx:41
PsdData::PsdGbtReader::gbt_word_index
uint32_t gbt_word_index
Definition: PsdGbtReader.h:54
PsdData::PsdGbtReader::EvHdrAc
PsdEventHeaderAC EvHdrAc
Definition: PsdGbtReader.h:29
PsdData::PsdGbtReader
Definition: PsdGbtReader.h:17
PsdData::PsdGbtReader::SetInput
void SetInput(const uint64_t *input)
Definition: PsdGbtReader.h:36
PsdData::PsdGbtReader::PrintOut
bool PrintOut
Definition: PsdGbtReader.h:53
PsdData::PsdGbtReader::ReadEventHeaderAbFles
void ReadEventHeaderAbFles()
Definition: PsdGbtReader.cxx:23
PsdData::PsdGbtReader::~PsdGbtReader
~PsdGbtReader()
Definition: PsdGbtReader.cxx:14
PsdData::PsdGbtReader::ReadHitHeaderFles
void ReadHitHeaderFles()
Definition: PsdGbtReader.cxx:60
PsdData::PsdGbtReader::ReadEventFles
int ReadEventFles()
Definition: PsdGbtReader.cxx:98
PsdData::PsdGbtReader::buffer_shift
int buffer_shift
Definition: PsdGbtReader.h:55
PsdData::PsdHitData
Definition: PsdGbtDataFormat.h:115
PsdData::PsdGbtReader::GetTotalGbtWordsRead
uint32_t GetTotalGbtWordsRead()
Definition: PsdGbtReader.h:48
PsdData::PsdEventHeaderAB
Definition: PsdGbtDataFormat.h:18
PsdData
Definition: PsdGbtDataFormat.h:16
PsdData::PsdGbtReader::EvHdrAb
PsdEventHeaderAB EvHdrAb
Definition: PsdGbtReader.h:28
PsdData::PsdGbtReader::PsdGbtReader
PsdGbtReader(const uint64_t *input)
Definition: PsdGbtReader.h:21
PsdData::PsdGbtReader::HitData
PsdHitData HitData
Definition: PsdGbtReader.h:31
PsdData::PsdEventHeaderAC
Definition: PsdGbtDataFormat.h:46
PsdData::PsdHitHeader
Definition: PsdGbtDataFormat.h:79
PsdData::PsdGbtReader::PsdGbtReader
PsdGbtReader()
Definition: PsdGbtReader.h:20
PsdData::PsdGbtReader::ReadHitDataFles
void ReadHitDataFles()
Definition: PsdGbtReader.cxx:81
PsdData::PsdGbtReader::HitHdr
PsdHitHeader HitHdr
Definition: PsdGbtReader.h:30
PsdGbtDataFormat.h
PsdData::PsdGbtReader::VectHitHdr
std::vector< PsdHitHeader > VectHitHdr
Definition: PsdGbtReader.h:33