GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4HDF5VectorDataHandle Class Reference

Handle object to access datasets in hdf5 formatted file with go4 event data implementation for std::vector collections. More...

#include <TGo4HDF5DataHandle.h>

+ Inheritance diagram for TGo4HDF5VectorDataHandle:

Public Member Functions

 TGo4HDF5VectorDataHandle (const char *name, size_t datasize)
 create new data handle
 
virtual ~TGo4HDF5VectorDataHandle ()
 
void BuildReadDataset (H5::H5File *file, TGo4HDF5Source *parent) override
 create datasets and buffers for reading this structure from hdf5 file.
 
void BuildWriteDataset (H5::H5File *file) override
 create datasets for writing memory structure of type into file.
 
void Read (hsize_t sequencenum, H5::H5File *file) override
 Read event of sequence number from file.
 
void SetElementSize (size_t len)
 remember size of a single element (structure) in this collection, if it is one.
 
void SetObjectPointer (void *memptr) override
 define location of corresponding object in memory.
 
void Write (hsize_t sequencenum, H5::H5File *ile) override
 Write event of sequence number from file.
 
- Public Member Functions inherited from TGo4HDF5BasicDataHandle
 TGo4HDF5BasicDataHandle (const char *name, size_t datasize)
 create new data handle
 
virtual ~TGo4HDF5BasicDataHandle ()
 
- Public Member Functions inherited from TGo4HDF5DataHandle
 TGo4HDF5DataHandle (const char *name, size_t datasize)
 create new data handle
 
virtual ~TGo4HDF5DataHandle ()
 
TGo4HDF5DataHandleAddSubMember (const char *name, size_t datasize, const char *collectiontype=nullptr)
 create new subhandle for complex member component on heap.
 
void * Data () const
 
TGo4HDF5DataHandleFindSubMember (const char *name)
 lookup if subcomponent of name already is in list.
 
TGo4HDF5DataHandleGetSubMember (UInt_t ix)
 
H5::CompType * GetType () const
 return handle for type descriptor.
 
const char * GetTypeName () const
 
void InsertTypeMember (const H5std_string &name, size_t offset, const H5::DataType &new_member)
 wrapper function to define contained structure member.
 
void SetActive (Bool_t on)
 
void SetAllSubMembersActive (Bool_t on)
 
void SetMemberClass (const char *clname)
 type of the member to access from outside
 
void SetMemberName (const char *name)
 identifier for the member to access from outside using the top event handle
 
void SetParentOffset (size_t off)
 remember location of this object relative to upper level object.
 
void SetTopEvent (TGo4EventElement *eve)
 pass the top level event element down the member hierarchy.
 
void SetTopEventClass (const char *classname)
 pass the top level event element class down the member hierarchy.
 

Protected Attributes

size_t fiElementSize {0}
 size of the (collection element) structure
 
H5::CompType * fxCollection {nullptr}
 collection type with fxType as entries
 
TGo4HDF5VarContainer fxVarHandle
 handle for variable arrays
 
- Protected Attributes inherited from TGo4HDF5BasicDataHandle
Char_t * fxReadBuffer {nullptr}
 secondary read bounce buffer for hdf5
 
- Protected Attributes inherited from TGo4HDF5DataHandle
Bool_t fbDataSetActive {kFALSE}
 we may disable this dataset temporarily from writing or reading useful for dynamic vector of vector components
 
Bool_t fbDataSetExists {kFALSE}
 check on the fly if this handle has already created a dataset
 
size_t fiDataSize {0}
 size of data structure in bytes, for redefining output dataset
 
ULong_t fiEntries {0}
 number of event entries found in file dataspace
 
size_t fiParentOffset {0}
 offset of this data structure relative to top level event object
 
size_t fiReadOffset {0}
 begin of real eventdata payload after event object pointer
 
void * fxData {nullptr}
 pointer to begin of data in memory
 
H5::DataSet fxDataSet
 dataset containing the structure
 
H5::DataSpace * fxDataSpace {nullptr}
 dataspace in memory
 
TGo4EventElementfxEvent {nullptr}
 the top level event element to access the current data member from outside
 
TString fxEventClass
 the top level event element classname to access the current data member from outside
 
H5::DataSpace fxFileSpace
 dataspace in file
 
TString fxMemberClass
 classname of the entry for interpreter to operate e.g.
 
TString fxMemberHandle
 predefined interpreter access command e.g.
 
TGo4HDF5SourcefxParentSource {nullptr}
 backpointer to parent source for exceptions
 
std::vector< TGo4HDF5DataHandle * > fxSubcomponents
 collect sub-components of the referenced data object
 
H5::CompType * fxType {nullptr}
 component type representing the data structure
 
TString fxTypeName
 identifier of the dataset
 

Additional Inherited Members

- Static Public Attributes inherited from TGo4HDF5DataHandle
static TGo4HDF5DataHandleFactory fxFactory
 
- Protected Member Functions inherited from TGo4HDF5BasicDataHandle
void AllocReadBuffer (size_t size)
 (Re-)allocate read buffer depending on the object size read from file
 

Detailed Description

Handle object to access datasets in hdf5 formatted file with go4 event data implementation for std::vector collections.

  • Author
    J. Adamczewski-Musch
    Since
    5/2019

Definition at line 279 of file TGo4HDF5DataHandle.h.

Constructor & Destructor Documentation

◆ TGo4HDF5VectorDataHandle()

TGo4HDF5VectorDataHandle::TGo4HDF5VectorDataHandle ( const char * name,
size_t datasize )

◆ ~TGo4HDF5VectorDataHandle()

TGo4HDF5VectorDataHandle::~TGo4HDF5VectorDataHandle ( )
virtual

Definition at line 524 of file TGo4HDF5DataHandle.cxx.

References fxCollection, TGo4HDF5DataHandle::fxTypeName, and go4hdfdbg.

Member Function Documentation

◆ BuildReadDataset()

void TGo4HDF5VectorDataHandle::BuildReadDataset ( H5::H5File * file,
TGo4HDF5Source * parent )
overridevirtual

create datasets and buffers for reading this structure from hdf5 file.

parent pointer is given for error handling case

Reimplemented from TGo4HDF5BasicDataHandle.

Definition at line 587 of file TGo4HDF5DataHandle.cxx.

References TGo4HDF5BasicDataHandle::BuildReadDataset().

◆ BuildWriteDataset()

void TGo4HDF5VectorDataHandle::BuildWriteDataset ( H5::H5File * file)
overridevirtual

◆ Read()

◆ SetElementSize()

void TGo4HDF5VectorDataHandle::SetElementSize ( size_t len)
inline

remember size of a single element (structure) in this collection, if it is one.

Otherwise this is size of this class itself

Definition at line 290 of file TGo4HDF5DataHandle.h.

References fiElementSize.

Referenced by TGo4HDF5DataHandleFactory::CreateDataHandle().

◆ SetObjectPointer()

void TGo4HDF5VectorDataHandle::SetObjectPointer ( void * memptr)
overridevirtual

define location of corresponding object in memory.

This is base pointer for all member specific offsets.

Reimplemented from TGo4HDF5DataHandle.

Definition at line 530 of file TGo4HDF5DataHandle.cxx.

References TGo4HDF5DataHandle::fbDataSetActive, fiElementSize, TGo4HDF5DataHandle::fxData, fxVarHandle, go4hdfdbg, and TGo4HDF5DataHandle::SetObjectPointer().

Referenced by TGo4HDF5SubVectorDataHandle::SetObjectPointer().

◆ Write()

void TGo4HDF5VectorDataHandle::Write ( hsize_t sequencenum,
H5::H5File * ile )
overridevirtual

Field Documentation

◆ fiElementSize

size_t TGo4HDF5VectorDataHandle::fiElementSize {0}
protected

size of the (collection element) structure

Definition at line 318 of file TGo4HDF5DataHandle.h.

Referenced by TGo4HDF5VectorDataHandle(), Read(), SetElementSize(), TGo4HDF5SubVectorDataHandle::SetObjectPointer(), and SetObjectPointer().

◆ fxCollection

H5::CompType* TGo4HDF5VectorDataHandle::fxCollection {nullptr}
protected

collection type with fxType as entries

Definition at line 311 of file TGo4HDF5DataHandle.h.

Referenced by TGo4HDF5VectorDataHandle(), and ~TGo4HDF5VectorDataHandle().

◆ fxVarHandle

TGo4HDF5VarContainer TGo4HDF5VectorDataHandle::fxVarHandle
protected

handle for variable arrays

Definition at line 315 of file TGo4HDF5DataHandle.h.

Referenced by BuildWriteDataset(), Read(), TGo4HDF5SubVectorDataHandle::SetObjectPointer(), SetObjectPointer(), and Write().


The documentation for this class was generated from the following files: