4#include "KVFzDataReader.h"
6#include <google/protobuf/io/coded_stream.h>
7#include "FzEventSet.pb.h"
8#include "KVDataRepository.h"
21DAQ::FzEventSet fFzEvSet;
29 if (!fFzEvSet.ParseFromCodedStream(&codedIStream)) {
30 Error(
"parse_event_from_message",
"problem parsing event set");
33 if (fFzEvSet.ev_size() > 1) {
34 Error(
"parse_event_from_message",
"FzEventSet with %d events", fFzEvSet.ev_size());
75#if ROOT_VERSION_CODE >= ROOT_VERSION(6,0,0)
91 std::map<int, std::string> filelist;
92#if ROOT_VERSION_CODE >= ROOT_VERSION(6,0,0)
102 for (
int i = 0; i < 2; ++i) bb.
Next();
103 filelist[bb.
Next().
Atoi()] =
b->GetName();
106 for (std::map<int, std::string>::iterator mapit = filelist.begin(); mapit != filelist.end(); ++mapit) {
122 return fFzEvSet.ev(0);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t b
R__EXTERN TSystem * gSystem
Int_t IsRunFileName(const Char_t *filename)
Base class for KaliVeda framework.
KVBase()
Default constructor.
virtual KVUniqueNameList * GetDirectoryListing(const KVDataSet *dataset, const Char_t *datatype="", const Char_t *subdir="")
KVAvailableRunsFile * GetAvailableRunsFile(const Char_t *type) const
Handle FAZIA protobuf-format raw data files.
KVString fFullFilePath
full path to files including "root:" etc. and "/run000000/"
std::unique_ptr< KVUniqueNameList > fListOfFiles
list of files for run
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="")
std::unique_ptr< TIter > fFileListIterator
iterator for file list
bool read_buffer()
if previous read reached the end of a file, we try to open the next file in the list
bool parse_event_from_message()
Read Google Protobuf DAQ files.
void open_file(const Char_t *filepath)
UInt_t fEvSize
size of next event in buffer
virtual bool read_buffer()
read a buffer from the file
bool fReachedEndOfFile
true when we have read all bytes from file
char * fBuffer
current buffer
ptrdiff_t fEvOffset
next position to read in buffer
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const
const char * GetName() const override
virtual const char * GetName() const
virtual void Error(const char *method, const char *msgfmt,...) const
virtual const char * BaseName(const char *pathname)