GSI Object Oriented Online Offline (Go4)
GO4-6.3.0
|
#include <TGo4HDF5DataHandle.h>
Public Member Functions | |
TGo4HDF5DataHandle (const char *name, size_t datasize) | |
virtual | ~TGo4HDF5DataHandle () |
H5::CompType * | GetType () const |
const char * | GetTypeName () const |
void * | Data () const |
void | InsertTypeMember (const H5std_string &name, size_t offset, const H5::DataType &new_member) |
void | SetParentOffset (size_t off) |
virtual void | SetObjectPointer (void *memptr) |
void | SetTopEvent (TGo4EventElement *eve) |
void | SetTopEventClass (const char *classname) |
void | SetMemberName (const char *name) |
void | SetMemberClass (const char *clname) |
virtual void | BuildReadDataset (H5::H5File *file, TGo4HDF5Source *parent) |
virtual void | BuildWriteDataset (H5::H5File *file) |
virtual void | Read (hsize_t sequencenum, H5::H5File *file) |
virtual void | Write (hsize_t sequencenum, H5::H5File *file) |
TGo4HDF5DataHandle * | AddSubMember (const char *name, size_t datasize, const char *collectiontype=nullptr) |
TGo4HDF5DataHandle * | GetSubMember (UInt_t ix) |
TGo4HDF5DataHandle * | FindSubMember (const char *name) |
void | SetActive (Bool_t on) |
void | SetAllSubMembersActive (Bool_t on) |
Static Public Attributes | |
static TGo4HDF5DataHandleFactory | fxFactory |
Protected Attributes | |
TString | fxTypeName |
H5::CompType * | fxType {nullptr} |
H5::DataSet | fxDataSet |
H5::DataSpace * | fxDataSpace {nullptr} |
H5::DataSpace | fxFileSpace |
ULong_t | fiEntries {0} |
void * | fxData {nullptr} |
size_t | fiParentOffset {0} |
size_t | fiDataSize {0} |
size_t | fiReadOffset {0} |
std::vector< TGo4HDF5DataHandle * > | fxSubcomponents |
TString | fxMemberHandle |
TString | fxMemberClass |
TGo4EventElement * | fxEvent {nullptr} |
TString | fxEventClass |
TGo4HDF5Source * | fxParentSource {nullptr} |
Bool_t | fbDataSetExists {kFALSE} |
Bool_t | fbDataSetActive {kFALSE} |
The base class to access a datatype with substructures in hdf5. datahandle may contain other datahandles as direct subcomponents Each datahandle represents a single hdf5 dataset in the file
Definition at line 51 of file TGo4HDF5DataHandle.h.
TGo4HDF5DataHandle::TGo4HDF5DataHandle | ( | const char * | name, |
size_t | datasize | ||
) |
create new data handle
Definition at line 28 of file TGo4HDF5DataHandle.cxx.
References fxType, fxTypeName, and go4hdfdbg.
Referenced by TGo4HDF5DataHandleFactory::CreateDataHandle().
|
virtual |
Definition at line 38 of file TGo4HDF5DataHandle.cxx.
References fxDataSet, fxDataSpace, fxSubcomponents, fxType, fxTypeName, and go4hdfdbg.
TGo4HDF5DataHandle * TGo4HDF5DataHandle::AddSubMember | ( | const char * | name, |
size_t | datasize, | ||
const char * | collectiontype = nullptr |
||
) |
create new subhandle for complex member component on heap. Each complex component has separate dataset in file. returns the currently added handle to submember. If submember is part of a collection like std::vector, the name of collection is also passed.
Definition at line 61 of file TGo4HDF5DataHandle.cxx.
References TGo4HDF5DataHandleFactory::CreateDataHandle(), fxFactory, and fxSubcomponents.
Referenced by TGo4HDF5Adapter::AddSubHandle(), TGo4HDF5Adapter::BuildDataType(), and TGo4HDF5SubVectorDataHandle::SetObjectPointer().
|
virtual |
create datasets and buffers for reading this structure from hdf5 file. parent pointer is given for error handling case
Reimplemented in TGo4HDF5SubVectorDataHandle, TGo4HDF5VectorDataHandle, TGo4HDF5CompositeDataHandle, and TGo4HDF5BasicDataHandle.
Definition at line 136 of file TGo4HDF5DataHandle.cxx.
References BuildReadDataset(), and fxSubcomponents.
Referenced by TGo4HDF5Source::BuildDataSet(), BuildReadDataset(), TGo4HDF5BasicDataHandle::BuildReadDataset(), TGo4HDF5SubVectorDataHandle::BuildReadDataset(), and TGo4HDF5SubVectorDataHandle::Read().
|
virtual |
create datasets for writing memory structure of type into file.
Reimplemented in TGo4HDF5SubVectorDataHandle, TGo4HDF5VectorDataHandle, TGo4HDF5CompositeDataHandle, and TGo4HDF5BasicDataHandle.
Definition at line 146 of file TGo4HDF5DataHandle.cxx.
References BuildWriteDataset(), and fxSubcomponents.
Referenced by TGo4HDF5Store::BuildDataSet(), BuildWriteDataset(), TGo4HDF5BasicDataHandle::BuildWriteDataset(), and TGo4HDF5VectorDataHandle::BuildWriteDataset().
|
inline |
Definition at line 64 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5Adapter::AddSubHandle(), TGo4HDF5Adapter::BuildDataType(), TGo4HDF5Adapter::FillTypeInfo(), and TGo4HDF5SubVectorDataHandle::SetObjectPointer().
TGo4HDF5DataHandle * TGo4HDF5DataHandle::FindSubMember | ( | const char * | name | ) |
lookup if subcomponent of name already is in list. returns 0 pointer if no match of name, otherwise th matching subhandle
Definition at line 68 of file TGo4HDF5DataHandle.cxx.
References FindSubMember(), fxSubcomponents, and GetTypeName().
Referenced by FindSubMember(), and TGo4HDF5SubVectorDataHandle::SetObjectPointer().
|
inline |
Definition at line 109 of file TGo4HDF5DataHandle.h.
|
inline |
return handle for type descriptor. Currently this is filled from external routine of adapter class
Definition at line 60 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5Adapter::FillTypeInfo().
|
inline |
Definition at line 62 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5Adapter::BuildDataType(), FindSubMember(), and TGo4HDF5SubVectorDataHandle::SetObjectPointer().
void TGo4HDF5DataHandle::InsertTypeMember | ( | const H5std_string & | name, |
size_t | offset, | ||
const H5::DataType & | new_member | ||
) |
wrapper function to define contained structure member. Will also keep the offset to first assigned member
Definition at line 53 of file TGo4HDF5DataHandle.cxx.
References fbDataSetActive, fiReadOffset, and fxType.
Referenced by TGo4HDF5Adapter::FillTypeInfo().
|
virtual |
Read event of sequence number from file
Reimplemented in TGo4HDF5SubVectorDataHandle, TGo4HDF5VectorDataHandle, TGo4HDF5CompositeDataHandle, and TGo4HDF5BasicDataHandle.
Definition at line 156 of file TGo4HDF5DataHandle.cxx.
References fbDataSetExists, fiEntries, fxFileSpace, fxSubcomponents, fxTypeName, go4hdfdatahandlethrow, go4hdfdbg, and Read().
Referenced by TGo4HDF5Source::BuildEvent(), Read(), TGo4HDF5BasicDataHandle::Read(), TGo4HDF5VectorDataHandle::Read(), and TGo4HDF5SubVectorDataHandle::Read().
|
inline |
Definition at line 115 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5SubVectorDataHandle::BuildReadDataset(), TGo4HDF5SubVectorDataHandle::BuildWriteDataset(), TGo4HDF5DataHandleFactory::CreateDataHandle(), SetAllSubMembersActive(), and TGo4HDF5VectorDataHandle::Write().
void TGo4HDF5DataHandle::SetAllSubMembersActive | ( | Bool_t | on | ) |
Definition at line 88 of file TGo4HDF5DataHandle.cxx.
References fxSubcomponents, SetActive(), and SetAllSubMembersActive().
Referenced by SetAllSubMembersActive(), and TGo4HDF5SubVectorDataHandle::SetObjectPointer().
|
inline |
type of the member to access from outside
Definition at line 89 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5Adapter::AddSubHandle().
|
inline |
identifier for the member to access from outside using the top event handle
Definition at line 86 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5Adapter::AddSubHandle(), and TGo4HDF5SubVectorDataHandle::SetObjectPointer().
|
virtual |
define location of corresponding object in memory. This is base pointer for all member specific offsets.
Reimplemented in TGo4HDF5SubVectorDataHandle, and TGo4HDF5VectorDataHandle.
Definition at line 97 of file TGo4HDF5DataHandle.cxx.
References fiParentOffset, fxData, fxSubcomponents, fxTypeName, go4hdfdbg, and SetObjectPointer().
Referenced by TGo4HDF5Adapter::BuildDataType(), SetObjectPointer(), TGo4HDF5VectorDataHandle::SetObjectPointer(), and TGo4HDF5Store::Store().
|
inline |
remember location of this object relative to upper level object.
Definition at line 70 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5Adapter::AddSubHandle(), and TGo4HDF5Adapter::BuildDataType().
void TGo4HDF5DataHandle::SetTopEvent | ( | TGo4EventElement * | eve | ) |
pass the top level event element down the member hierarchy. Note that this is the "local" top event, e.g. the current Go4 composite subevent that owns the member
Definition at line 111 of file TGo4HDF5DataHandle.cxx.
References fxEvent, fxSubcomponents, fxTypeName, go4hdfdbg, and SetTopEvent().
Referenced by TGo4HDF5Adapter::BuildDataType(), and SetTopEvent().
void TGo4HDF5DataHandle::SetTopEventClass | ( | const char * | classname | ) |
pass the top level event element class down the member hierarchy. Note that this is the "local" top event, e.g. the current Go4 composite subevent that owns the member
Definition at line 124 of file TGo4HDF5DataHandle.cxx.
References fxEventClass, fxSubcomponents, and SetTopEventClass().
Referenced by TGo4HDF5Adapter::BuildDataType(), and SetTopEventClass().
|
virtual |
Write event of sequence number from file
Reimplemented in TGo4HDF5SubVectorDataHandle, TGo4HDF5VectorDataHandle, TGo4HDF5CompositeDataHandle, and TGo4HDF5BasicDataHandle.
Definition at line 187 of file TGo4HDF5DataHandle.cxx.
References fbDataSetExists, fxDataSet, fxFileSpace, fxSubcomponents, fxTypeName, go4hdfdbg, and Write().
Referenced by TGo4HDF5Store::Store(), Write(), TGo4HDF5BasicDataHandle::Write(), TGo4HDF5VectorDataHandle::Write(), and TGo4HDF5SubVectorDataHandle::Write().
|
protected |
we may disable this dataset temporarily from writing or reading useful for dynamic vector of vector components
Definition at line 183 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5BasicDataHandle::BuildWriteDataset(), InsertTypeMember(), TGo4HDF5BasicDataHandle::Read(), TGo4HDF5VectorDataHandle::Read(), TGo4HDF5VectorDataHandle::SetObjectPointer(), TGo4HDF5BasicDataHandle::Write(), and TGo4HDF5VectorDataHandle::Write().
|
protected |
check on the fly if this handle has already created a dataset
Definition at line 179 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5BasicDataHandle::BuildReadDataset(), TGo4HDF5BasicDataHandle::BuildWriteDataset(), TGo4HDF5VectorDataHandle::BuildWriteDataset(), Read(), and Write().
|
protected |
size of data structure in bytes, for redefining output dataset
Definition at line 153 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5BasicDataHandle::AllocReadBuffer(), TGo4HDF5BasicDataHandle::BuildReadDataset(), and TGo4HDF5BasicDataHandle::Read().
|
protected |
number of event entries found in file dataspace
Definition at line 141 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5BasicDataHandle::BuildReadDataset(), and Read().
|
protected |
offset of this data structure relative to top level event object
Definition at line 149 of file TGo4HDF5DataHandle.h.
Referenced by SetObjectPointer().
|
protected |
begin of real eventdata payload after event object pointer
Definition at line 157 of file TGo4HDF5DataHandle.h.
Referenced by InsertTypeMember(), and TGo4HDF5BasicDataHandle::Read().
|
protected |
pointer to begin of data in memory
Definition at line 146 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5BasicDataHandle::BuildWriteDataset(), TGo4HDF5BasicDataHandle::Read(), TGo4HDF5VectorDataHandle::Read(), SetObjectPointer(), TGo4HDF5VectorDataHandle::SetObjectPointer(), and TGo4HDF5BasicDataHandle::Write().
|
protected |
dataset containing the structure
Definition at line 132 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5BasicDataHandle::BuildReadDataset(), TGo4HDF5BasicDataHandle::BuildWriteDataset(), TGo4HDF5VectorDataHandle::BuildWriteDataset(), TGo4HDF5BasicDataHandle::Read(), TGo4HDF5VectorDataHandle::Read(), Write(), TGo4HDF5BasicDataHandle::Write(), TGo4HDF5VectorDataHandle::Write(), and ~TGo4HDF5DataHandle().
|
protected |
dataspace in memory
Definition at line 135 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5BasicDataHandle::BuildReadDataset(), TGo4HDF5BasicDataHandle::BuildWriteDataset(), TGo4HDF5VectorDataHandle::BuildWriteDataset(), TGo4HDF5BasicDataHandle::Read(), TGo4HDF5VectorDataHandle::Read(), TGo4HDF5BasicDataHandle::Write(), TGo4HDF5VectorDataHandle::Write(), and ~TGo4HDF5DataHandle().
|
protected |
the top level event element to access the current data member from outside
Definition at line 170 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5VectorDataHandle::Read(), and SetTopEvent().
|
protected |
the top level event element classname to access the current data member from outside
Definition at line 173 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5VectorDataHandle::Read(), and SetTopEventClass().
|
static |
Definition at line 119 of file TGo4HDF5DataHandle.h.
Referenced by AddSubMember().
|
protected |
dataspace in file
Definition at line 138 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5BasicDataHandle::BuildReadDataset(), Read(), TGo4HDF5BasicDataHandle::Read(), TGo4HDF5VectorDataHandle::Read(), Write(), TGo4HDF5BasicDataHandle::Write(), and TGo4HDF5VectorDataHandle::Write().
|
protected |
classname of the entry for interpreter to operate e.g. on variable length collection
Definition at line 167 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5VectorDataHandle::Read().
|
protected |
predefined interpreter access command e.g. to operate e.g. on the variable length collection
Definition at line 164 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5VectorDataHandle::Read(), and TGo4HDF5SubVectorDataHandle::SetObjectPointer().
|
protected |
backpointer to parent source for exceptions
Definition at line 176 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5BasicDataHandle::BuildReadDataset(), and TGo4HDF5SubVectorDataHandle::Read().
|
protected |
collect subcomponents of the referenced data object
Definition at line 161 of file TGo4HDF5DataHandle.h.
Referenced by AddSubMember(), BuildReadDataset(), BuildWriteDataset(), FindSubMember(), Read(), SetAllSubMembersActive(), SetObjectPointer(), SetTopEvent(), SetTopEventClass(), Write(), and ~TGo4HDF5DataHandle().
|
protected |
component type representing the data structure
Definition at line 128 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5BasicDataHandle::BuildReadDataset(), TGo4HDF5BasicDataHandle::BuildWriteDataset(), TGo4HDF5VectorDataHandle::BuildWriteDataset(), InsertTypeMember(), TGo4HDF5BasicDataHandle::Read(), TGo4HDF5VectorDataHandle::Read(), TGo4HDF5DataHandle(), TGo4HDF5VectorDataHandle::TGo4HDF5VectorDataHandle(), TGo4HDF5BasicDataHandle::Write(), TGo4HDF5VectorDataHandle::Write(), and ~TGo4HDF5DataHandle().
|
protected |
identifier of the dataset
Definition at line 123 of file TGo4HDF5DataHandle.h.
Referenced by TGo4HDF5BasicDataHandle::BuildReadDataset(), TGo4HDF5BasicDataHandle::BuildWriteDataset(), TGo4HDF5VectorDataHandle::BuildWriteDataset(), TGo4HDF5SubVectorDataHandle::BuildWriteDataset(), Read(), TGo4HDF5VectorDataHandle::Read(), TGo4HDF5SubVectorDataHandle::Read(), SetObjectPointer(), SetTopEvent(), TGo4HDF5DataHandle(), TGo4HDF5VectorDataHandle::TGo4HDF5VectorDataHandle(), Write(), TGo4HDF5BasicDataHandle::Write(), TGo4HDF5VectorDataHandle::Write(), TGo4HDF5BasicDataHandle::~TGo4HDF5BasicDataHandle(), TGo4HDF5CompositeDataHandle::~TGo4HDF5CompositeDataHandle(), ~TGo4HDF5DataHandle(), TGo4HDF5SubVectorDataHandle::~TGo4HDF5SubVectorDataHandle(), and TGo4HDF5VectorDataHandle::~TGo4HDF5VectorDataHandle().