GSI Object Oriented Online Offline (Go4) GO4-6.4.0
|
Adapter class for io with hdf5 formatted file. More...
#include <TGo4HDF5Adapter.h>
Public Member Functions | |
TGo4HDF5Adapter () | |
virtual | ~TGo4HDF5Adapter () |
Static Public Member Functions | |
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 | |
Static Public Attributes | |
static const char * | fgcFILESUF = ".h5" |
Standard suffix for file name. | |
Protected Member Functions | |
virtual void | BuildDataSet (TGo4EventElement *event)=0 |
initialize dataset from event structure | |
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: | |
virtual void | DeleteDataSet () |
delete dataset resource | |
virtual void | OpenFile (const char *fname=nullptr)=0 |
opens the hdf5 file depending on the setup | |
size_t | ScanEventSize (TGo4EventElement *event) |
evaluate total memory size of event object regarding composite subevents | |
Protected Attributes | |
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 | |
Adapter class for io with hdf5 formatted file.
Definition at line 33 of file TGo4HDF5Adapter.h.
|
inline |
Definition at line 36 of file TGo4HDF5Adapter.h.
References fbDataSetExists, fiFillCount, fiFlags, fxEvent, fxFile, and fxHandle.
Referenced by TGo4HDF5Source::TGo4HDF5Source(), TGo4HDF5Source::TGo4HDF5Source(), TGo4HDF5Source::TGo4HDF5Source(), TGo4HDF5Store::TGo4HDF5Store(), TGo4HDF5Store::TGo4HDF5Store(), and TGo4HDF5Store::TGo4HDF5Store().
|
inlinevirtual |
Definition at line 41 of file TGo4HDF5Adapter.h.
|
static |
Add subhandle to handle that represents a contained collection.
classname or valueclass, resp, refers to type of element in container,
Definition at line 57 of file TGo4HDF5Adapter.cxx.
References TGo4HDF5DataHandle::AddSubMember(), TGo4HDF5DataHandle::Data(), FillTypeInfo(), TGo4HDF5DataHandle::SetMemberClass(), TGo4HDF5DataHandle::SetMemberName(), and TGo4HDF5DataHandle::SetParentOffset().
Referenced by FillTypeInfo().
|
protectedpure virtual |
initialize dataset from event structure
Implemented in TGo4HDF5Source, and TGo4HDF5Store.
|
protected |
Prepare data type from event structure for hdf5.
Return value is name of ROOT class that was used to compose the hdf5 type. In case of composite subevents, the current parent data handle and the index in array may be passed.
Definition at line 361 of file TGo4HDF5Adapter.cxx.
References TGo4HDF5DataHandle::AddSubMember(), BuildDataType(), TGo4HDF5DataHandle::Data(), TGo4Log::Error(), FillTypeInfo(), fxHandle, TGo4CompositeEvent::getEventElement(), TGo4CompositeEvent::getNElements(), TGo4HDF5DataHandle::GetTypeName(), go4hdfdbg, ScanEventSize(), TGo4HDF5DataHandle::SetObjectPointer(), TGo4HDF5DataHandle::SetParentOffset(), TGo4HDF5DataHandle::SetTopEvent(), and TGo4HDF5DataHandle::SetTopEventClass().
Referenced by TGo4HDF5Source::BuildDataSet(), TGo4HDF5Store::BuildDataSet(), and BuildDataType().
|
protectedvirtual |
opens the hdf5 file depending on the setup
Definition at line 29 of file TGo4HDF5Adapter.cxx.
References fxFile.
Referenced by TGo4HDF5Store::~TGo4HDF5Store(), TGo4HDF5Source::CloseCurrentFile(), TGo4HDF5Source::OpenFile(), and TGo4HDF5Store::OpenFile().
|
protected |
Convert common go4 filemode flags to hdf5 flags:
Definition at line 430 of file TGo4HDF5Adapter.cxx.
References GO4_H5F_ACC_EXCL, GO4_H5F_ACC_NONE, GO4_H5F_ACC_RDONLY, GO4_H5F_ACC_RDWR, and GO4_H5F_ACC_TRUNC.
Referenced by TGo4HDF5Store::TGo4HDF5Store().
|
protectedvirtual |
delete dataset resource
Reimplemented in TGo4HDF5Source.
Definition at line 38 of file TGo4HDF5Adapter.cxx.
References fbDataSetExists, and fxHandle.
Referenced by TGo4HDF5Store::~TGo4HDF5Store(), and TGo4HDF5Source::DeleteDataSet().
|
static |
evaluate h5 type information for basic types of memtypename
Definition at line 258 of file TGo4HDF5Adapter.cxx.
References FillTypeInfo(), TGo4HDF5DataHandle::GetType(), go4hdfdbg, and TGo4HDF5DataHandle::InsertTypeMember().
|
static |
evaluate h5 type information from root class streamer
Definition at line 78 of file TGo4HDF5Adapter.cxx.
References AddSubHandle(), TGo4HDF5DataHandle::Data(), FillTypeInfo(), and go4hdfdbg.
Referenced by AddSubHandle(), BuildDataType(), FillTypeInfo(), FillTypeInfo(), and TGo4HDF5SubVectorDataHandle::SetObjectPointer().
|
protectedpure virtual |
opens the hdf5 file depending on the setup
Implemented in TGo4HDF5Source, and TGo4HDF5Store.
|
protected |
evaluate total memory size of event object regarding composite subevents
Definition at line 46 of file TGo4HDF5Adapter.cxx.
References go4hdfdbg.
Referenced by BuildDataType().
|
protected |
True if branch already exists.
Used for automatic creation of new event branch within Store method.
Definition at line 95 of file TGo4HDF5Adapter.h.
Referenced by TGo4HDF5Adapter(), TGo4HDF5Source::BuildDataSet(), TGo4HDF5Store::BuildDataSet(), and DeleteDataSet().
|
static |
Standard suffix for file name.
Definition at line 45 of file TGo4HDF5Adapter.h.
Referenced by TGo4HDF5Source::OpenFile(), TGo4HDF5Store::OpenFile(), and TGo4HDF5Source::ProducesFilesList().
|
protected |
counter of filled events.
Definition at line 91 of file TGo4HDF5Adapter.h.
Referenced by TGo4HDF5Adapter(), TGo4HDF5Source::BuildEvent(), and TGo4HDF5Store::Store().
|
protected |
remember file property flags.
Definition at line 101 of file TGo4HDF5Adapter.h.
Referenced by TGo4HDF5Adapter(), TGo4HDF5Store::TGo4HDF5Store(), and TGo4HDF5Store::OpenFile().
|
protected |
Points to event structure to be filled into dataset.
Definition at line 98 of file TGo4HDF5Adapter.h.
Referenced by TGo4HDF5Adapter(), TGo4HDF5Source::BuildEvent(), and TGo4HDF5Store::Store().
|
protected |
the currently open hdf5 file
Definition at line 85 of file TGo4HDF5Adapter.h.
Referenced by TGo4HDF5Adapter(), TGo4HDF5Source::BuildDataSet(), TGo4HDF5Store::BuildDataSet(), TGo4HDF5Source::BuildEvent(), CloseFile(), TGo4HDF5Source::OpenFile(), TGo4HDF5Store::OpenFile(), and TGo4HDF5Store::Store().
|
protected |
handle object to recursively treat the io of nested event components
Definition at line 88 of file TGo4HDF5Adapter.h.
Referenced by TGo4HDF5Adapter(), TGo4HDF5Source::BuildDataSet(), TGo4HDF5Store::BuildDataSet(), BuildDataType(), TGo4HDF5Source::BuildEvent(), DeleteDataSet(), and TGo4HDF5Store::Store().