KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVFzDataReader.h
Go to the documentation of this file.
1 
4 #ifndef __KVFZDATAREADER_H
5 #define __KVFZDATAREADER_H
6 
7 #include "KVProtobufDataReader.h"
8 #include <KVUniqueNameList.h>
9 
10 #ifndef __CINT__
11 namespace DAQ {
12  class FzEvent;
13 }
14 #endif
15 
22 
23 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,0,0)
24  unique_ptr<KVUniqueNameList> fListOfFiles;
25  unique_ptr<TIter> fFileListIterator;
26 #else
29 #endif
32 
34  bool read_buffer();
35 
36 public:
37  KVFzDataReader() : fListOfFiles(nullptr), fFileListIterator(nullptr) {}
38  KVFzDataReader(const Char_t* filepath, Int_t bufSiz = 16 * 1024 * 1024);
39  virtual ~KVFzDataReader()
40  {
41 #if ROOT_VERSION_CODE < ROOT_VERSION(6,0,0)
44 #endif
45  }
46 
47 #ifndef __CINT__
48  const DAQ::FzEvent& get_fazia_event() const;
49 #endif
50 
51  static KVFzDataReader* Open(const Char_t* filename, Option_t* opt = "");
52 
54  {
55  return run_number;
56  }
57 
58  ClassDef(KVFzDataReader, 1) //Read FAZIA DAQ files
59 };
60 
61 #endif
int Int_t
#define SafeDelete(p)
char Char_t
const char Option_t
#define ClassDef(name, id)
Handle FAZIA protobuf-format raw data files.
KVString fFullFilePath
full path to files including "root:" etc. and "/run000000/"
Int_t GetRunNumberReadFromFile() const
virtual ~KVFzDataReader()
const DAQ::FzEvent & get_fazia_event() const
int run_number
run number deduced from filename
static KVFzDataReader * Open(const Char_t *filename, Option_t *opt="")
bool read_buffer()
if previous read reached the end of a file, we try to open the next file in the list
unique_ptr< KVUniqueNameList > fListOfFiles
list of files for run
unique_ptr< TIter > fFileListIterator
iterator for file list
bool parse_event_from_message()
Read Google Protobuf DAQ files.
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:72
Optimised list in which named objects can only be placed once.