GSI Object Oriented Online Offline (Go4)
GO4-6.3.0
|
#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) |
static void | FillTypeInfo (TGo4HDF5DataHandle *handle, TClass *rootclass, const char *basename=nullptr) |
static void | FillTypeInfo (TGo4HDF5DataHandle *handle, const char *membername, const char *memtypename, size_t memberoffset=0, Int_t arraydim=0, TDataMember *member=nullptr) |
Static Public Attributes | |
static const char * | fgcFILESUF = ".h5" |
Protected Member Functions | |
virtual void | OpenFile (const char *fname=nullptr)=0 |
virtual void | CloseFile () |
virtual void | BuildDataSet (TGo4EventElement *event)=0 |
virtual void | DeleteDataSet () |
void | BuildDataType (TGo4EventElement *event, TGo4HDF5DataHandle *parent=nullptr, Int_t index=0) |
size_t | ScanEventSize (TGo4EventElement *event) |
UInt_t | ConvertFileMode (Go4_H5_File_Flags flags) |
Protected Attributes | |
H5::H5File * | fxFile {nullptr} |
TGo4HDF5DataHandle * | fxHandle {nullptr} |
hsize_t | fiFillCount {0} |
Bool_t | fbDataSetExists {kFALSE} |
TGo4EventElement * | fxEvent {nullptr} |
UInt_t | fiFlags {0} |
Adapter class for io with hdf5 formatted file
Definition at line 35 of file TGo4HDF5Adapter.h.
|
inline |
Definition at line 38 of file TGo4HDF5Adapter.h.
|
inlinevirtual |
Definition at line 43 of file TGo4HDF5Adapter.h.
|
static |
Add subhandle to handle that represents a containend 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 TGo4HDF5Store, and TGo4HDF5Source.
|
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(), 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(), and TGo4HDF5Store::BuildDataSet().
|
protectedvirtual |
opens the hdf5 file depending on the setup
Definition at line 29 of file TGo4HDF5Adapter.cxx.
References fxFile.
Referenced by TGo4HDF5Source::CloseCurrentFile(), TGo4HDF5Source::OpenFile(), TGo4HDF5Store::OpenFile(), and TGo4HDF5Store::~TGo4HDF5Store().
|
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 TGo4HDF5Source::DeleteDataSet(), and TGo4HDF5Store::~TGo4HDF5Store().
|
static |
evaluate h5 type information from root class streamer
Definition at line 78 of file TGo4HDF5Adapter.cxx.
References AddSubHandle(), TGo4HDF5DataHandle::Data(), and go4hdfdbg.
Referenced by AddSubHandle(), BuildDataType(), FillTypeInfo(), and TGo4HDF5SubVectorDataHandle::SetObjectPointer().
|
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().
|
protectedpure virtual |
opens the hdf5 file depending on the setup
Implemented in TGo4HDF5Store, and TGo4HDF5Source.
|
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 102 of file TGo4HDF5Adapter.h.
Referenced by TGo4HDF5Source::BuildDataSet(), TGo4HDF5Store::BuildDataSet(), and DeleteDataSet().
|
static |
Standard suffix for file name
Definition at line 47 of file TGo4HDF5Adapter.h.
Referenced by TGo4HDF5Source::OpenFile(), TGo4HDF5Store::OpenFile(), and TGo4HDF5Source::ProducesFilesList().
|
protected |
counter of filled events.
Definition at line 97 of file TGo4HDF5Adapter.h.
Referenced by TGo4HDF5Source::BuildEvent(), and TGo4HDF5Store::Store().
|
protected |
remember file property flags?.
Definition at line 108 of file TGo4HDF5Adapter.h.
Referenced by TGo4HDF5Store::OpenFile(), and TGo4HDF5Store::TGo4HDF5Store().
|
protected |
Points to event structure to be filled into dataset.
Definition at line 105 of file TGo4HDF5Adapter.h.
Referenced by TGo4HDF5Source::BuildEvent(), and TGo4HDF5Store::Store().
|
protected |
the currently open hdf5 file
Definition at line 91 of file TGo4HDF5Adapter.h.
Referenced by 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 94 of file TGo4HDF5Adapter.h.
Referenced by TGo4HDF5Source::BuildDataSet(), TGo4HDF5Store::BuildDataSet(), BuildDataType(), TGo4HDF5Source::BuildEvent(), DeleteDataSet(), and TGo4HDF5Store::Store().