GSI Object Oriented Online Offline (Go4) GO4-6.4.0
|
Event source which reads entries from a dataset in a hdf5 formatted file names of elements in hdf5 data must match the members of the input event class. More...
#include <TGo4HDF5Source.h>
Public Member Functions | |
TGo4HDF5Source () | |
TGo4HDF5Source (const char *name) | |
TGo4HDF5Source (TGo4HDF5SourceParameter *par) | |
virtual | ~TGo4HDF5Source () |
Bool_t | BuildEvent (TGo4EventElement *dest) override |
Fill the destination event dest from the tree. | |
![]() | |
TGo4EventSource () | |
TGo4EventSource (const char *name) | |
virtual | ~TGo4EventSource () |
virtual Bool_t | CheckEventClass (TClass *cl) |
Check that event class is supported by event source. | |
void | Clear (Option_t *opt="") override |
virtual const char * | GetActiveName () const |
Access to the name of the currently active source. | |
Int_t | GetCreateStatus () const |
Status value of server/file open. | |
const char * | GetErrMess () const |
Status/ error message of the last event. | |
Int_t | GetEventStatus () const |
Status of the last event. | |
![]() | |
TGo4HDF5Adapter () | |
virtual | ~TGo4HDF5Adapter () |
Static Public Member Functions | |
static TList * | ProducesFilesList (const char *mask) |
![]() | |
static void | AddSubHandle (TGo4HDF5DataHandle *handle, const char *name, const char *type, size_t size, size_t memberoffset, const char *membername, const char *classname, TClass *valueclass) |
Add subhandle to handle that represents a contained collection. | |
static void | FillTypeInfo (TGo4HDF5DataHandle *handle, const char *membername, const char *memtypename, size_t memberoffset=0, Int_t arraydim=0, TDataMember *member=nullptr) |
evaluate h5 type information for basic types of memtypename | |
static void | FillTypeInfo (TGo4HDF5DataHandle *handle, TClass *rootclass, const char *basename=nullptr) |
evaluate h5 type information from root class streamer | |
Protected Member Functions | |
void | BuildDataSet (TGo4EventElement *event) override |
initialize dataset from event structure | |
void | DeleteDataSet () override |
delete dataset resource | |
void | OpenFile (const char *fname) override |
opens the hdf5 file of given name for reading | |
![]() | |
void | SetCreateStatus (Int_t status) |
Status value of event source init (file/server open). | |
void | SetErrMess (const char *txt) |
To be used for modification of the message by the event source implementation. | |
void | SetEventStatus (Int_t status) |
Status of the last event. | |
void | ThrowEOF (Int_t creastat, Int_t errstat, const char *message,...) |
EOF thrower. | |
void | ThrowError (Int_t creastat, Int_t errstat, const char *message,...) |
Exception thrower. | |
![]() | |
void | BuildDataType (TGo4EventElement *event, TGo4HDF5DataHandle *parent=nullptr, Int_t index=0) |
Prepare data type from event structure for hdf5. | |
virtual void | CloseFile () |
opens the hdf5 file depending on the setup | |
UInt_t | ConvertFileMode (Go4_H5_File_Flags flags) |
Convert common go4 filemode flags to hdf5 flags: | |
size_t | ScanEventSize (TGo4EventElement *event) |
evaluate total memory size of event object regarding composite subevents | |
Private Member Functions | |
Bool_t | CloseCurrentFile () |
Close currently open file. | |
Bool_t | OpenNextFile () |
Open next file from the files list. | |
Private Attributes | |
size_t | fiReadOffset {0} |
begin of real eventdata payload after event object pointer | |
TString | fxCurrentFileName |
current name of the file | |
TList * | fxFilesNames {nullptr} |
list of files names | |
Char_t * | fxReadBuffer {nullptr} |
read buffer for hdf5 | |
Friends | |
class | TGo4HDF5BasicDataHandle |
class | TGo4HDF5DataHandle |
Additional Inherited Members | |
![]() | |
static const Int_t | fgiTIMEOUTDEFAULT =1 |
Default timeout in seconds for event input. | |
![]() | |
static const char * | fgcFILESUF = ".h5" |
Standard suffix for file name. | |
![]() | |
enum | { fguTXTLEN = 256 } |
text length More... | |
![]() | |
Bool_t | fbDataSetExists {kFALSE} |
True if branch already exists. | |
hsize_t | fiFillCount {0} |
counter of filled events. | |
UInt_t | fiFlags {0} |
remember file property flags. | |
TGo4EventElement * | fxEvent {nullptr} |
Points to event structure to be filled into dataset. | |
H5::H5File * | fxFile {nullptr} |
the currently open hdf5 file | |
TGo4HDF5DataHandle * | fxHandle {nullptr} |
handle object to recursively treat the io of nested event components | |
Event source which reads entries from a dataset in a hdf5 formatted file names of elements in hdf5 data must match the members of the input event class.
Definition at line 34 of file TGo4HDF5Source.h.
TGo4HDF5Source::TGo4HDF5Source | ( | ) |
Definition at line 57 of file TGo4HDF5Source.cxx.
References TGo4EventSource::TGo4EventSource(), TGo4HDF5Adapter::TGo4HDF5Adapter(), fiReadOffset, fxFilesNames, and fxReadBuffer.
TGo4HDF5Source::TGo4HDF5Source | ( | TGo4HDF5SourceParameter * | par | ) |
Definition at line 46 of file TGo4HDF5Source.cxx.
References TGo4EventSource::TGo4EventSource(), TGo4HDF5Adapter::TGo4HDF5Adapter(), fiReadOffset, fxFilesNames, fxReadBuffer, OpenNextFile(), ProducesFilesList(), and TGo4EventSource::ThrowError().
TGo4HDF5Source::TGo4HDF5Source | ( | const char * | name | ) |
Definition at line 37 of file TGo4HDF5Source.cxx.
References TGo4EventSource::TGo4EventSource(), TGo4HDF5Adapter::TGo4HDF5Adapter(), fiReadOffset, fxFilesNames, fxReadBuffer, OpenNextFile(), ProducesFilesList(), and TGo4EventSource::ThrowError().
|
virtual |
Definition at line 63 of file TGo4HDF5Source.cxx.
References CloseCurrentFile(), and fxFilesNames.
|
overrideprotectedvirtual |
initialize dataset from event structure
Implements TGo4HDF5Adapter.
Definition at line 183 of file TGo4HDF5Source.cxx.
References TGo4HDF5Adapter::BuildDataType(), TGo4Log::Error(), TGo4HDF5Adapter::fbDataSetExists, TGo4HDF5Adapter::fxFile, TGo4HDF5Adapter::fxHandle, and TGo4EventSource::SetErrMess().
Referenced by BuildEvent().
|
overridevirtual |
Fill the destination event dest from the tree.
If end of tree is reached, the current event counter is reset and a kFALSE value is returned.
Reimplemented from TGo4EventSource.
Definition at line 214 of file TGo4HDF5Source.cxx.
References BuildDataSet(), TGo4Log::Error(), TGo4HDF5Adapter::fiFillCount, TGo4HDF5Adapter::fxEvent, TGo4HDF5Adapter::fxFile, TGo4HDF5Adapter::fxHandle, TGo4EventSource::SetErrMess(), and TGo4EventSource::ThrowError().
|
private |
Close currently open file.
Definition at line 149 of file TGo4HDF5Source.cxx.
References TGo4HDF5Adapter::CloseFile(), TGo4Log::Error(), fxCurrentFileName, TGo4Log::Info(), and TGo4EventSource::SetErrMess().
Referenced by ~TGo4HDF5Source(), and OpenNextFile().
|
overrideprotectedvirtual |
delete dataset resource
Reimplemented from TGo4HDF5Adapter.
Definition at line 208 of file TGo4HDF5Source.cxx.
References TGo4HDF5Adapter::DeleteDataSet(), and fxReadBuffer.
|
overrideprotectedvirtual |
opens the hdf5 file of given name for reading
Implements TGo4HDF5Adapter.
Definition at line 165 of file TGo4HDF5Source.cxx.
References TGo4HDF5Adapter::CloseFile(), TGo4Log::Error(), TGo4HDF5Adapter::fgcFILESUF, TGo4HDF5Adapter::fxFile, TGo4Log::Info(), and TGo4EventSource::SetErrMess().
Referenced by OpenNextFile().
|
private |
Open next file from the files list.
Definition at line 133 of file TGo4HDF5Source.cxx.
References CloseCurrentFile(), fxCurrentFileName, fxFilesNames, and OpenFile().
Referenced by TGo4HDF5Source(), and TGo4HDF5Source().
|
static |
Definition at line 73 of file TGo4HDF5Source.cxx.
References TGo4HDF5Adapter::fgcFILESUF.
Referenced by TGo4HDF5Source(), and TGo4HDF5Source().
|
friend |
Definition at line 37 of file TGo4HDF5Source.h.
References TGo4HDF5BasicDataHandle.
Referenced by TGo4HDF5BasicDataHandle.
|
friend |
Definition at line 36 of file TGo4HDF5Source.h.
References TGo4HDF5DataHandle.
Referenced by TGo4HDF5DataHandle.
|
private |
begin of real eventdata payload after event object pointer
Definition at line 73 of file TGo4HDF5Source.h.
Referenced by TGo4HDF5Source(), TGo4HDF5Source(), and TGo4HDF5Source().
|
private |
current name of the file
!
Definition at line 79 of file TGo4HDF5Source.h.
Referenced by CloseCurrentFile(), and OpenNextFile().
|
private |
list of files names
!
Definition at line 76 of file TGo4HDF5Source.h.
Referenced by TGo4HDF5Source(), TGo4HDF5Source(), TGo4HDF5Source(), ~TGo4HDF5Source(), and OpenNextFile().
|
private |
read buffer for hdf5
!
Definition at line 70 of file TGo4HDF5Source.h.
Referenced by TGo4HDF5Source(), TGo4HDF5Source(), TGo4HDF5Source(), and DeleteDataSet().