GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
TGo4HDF5DataHandle Class Reference

#include <TGo4HDF5DataHandle.h>

+ Inheritance diagram for TGo4HDF5DataHandle:

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)
 
TGo4HDF5DataHandleAddSubMember (const char *name, size_t datasize, const char *collectiontype=nullptr)
 
TGo4HDF5DataHandleGetSubMember (UInt_t ix)
 
TGo4HDF5DataHandleFindSubMember (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
 
TGo4EventElementfxEvent {nullptr}
 
TString fxEventClass
 
TGo4HDF5SourcefxParentSource {nullptr}
 
Bool_t fbDataSetExists {kFALSE}
 
Bool_t fbDataSetActive {kFALSE}
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ TGo4HDF5DataHandle()

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().

◆ ~TGo4HDF5DataHandle()

TGo4HDF5DataHandle::~TGo4HDF5DataHandle ( )
virtual

Definition at line 38 of file TGo4HDF5DataHandle.cxx.

References fxDataSet, fxDataSpace, fxSubcomponents, fxType, fxTypeName, and go4hdfdbg.

Member Function Documentation

◆ AddSubMember()

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().

◆ BuildReadDataset()

void TGo4HDF5DataHandle::BuildReadDataset ( H5::H5File *  file,
TGo4HDF5Source parent 
)
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().

◆ BuildWriteDataset()

void TGo4HDF5DataHandle::BuildWriteDataset ( H5::H5File *  file)
virtual

◆ Data()

void* TGo4HDF5DataHandle::Data ( ) const
inline

◆ FindSubMember()

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().

◆ GetSubMember()

TGo4HDF5DataHandle* TGo4HDF5DataHandle::GetSubMember ( UInt_t  ix)
inline

Definition at line 109 of file TGo4HDF5DataHandle.h.

◆ GetType()

H5::CompType* TGo4HDF5DataHandle::GetType ( ) const
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().

◆ GetTypeName()

const char* TGo4HDF5DataHandle::GetTypeName ( ) const
inline

◆ InsertTypeMember()

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().

◆ Read()

void TGo4HDF5DataHandle::Read ( hsize_t  sequencenum,
H5::H5File *  file 
)
virtual

◆ SetActive()

void TGo4HDF5DataHandle::SetActive ( Bool_t  on)
inline

◆ SetAllSubMembersActive()

void TGo4HDF5DataHandle::SetAllSubMembersActive ( Bool_t  on)

◆ SetMemberClass()

void TGo4HDF5DataHandle::SetMemberClass ( const char *  clname)
inline

type of the member to access from outside

Definition at line 89 of file TGo4HDF5DataHandle.h.

Referenced by TGo4HDF5Adapter::AddSubHandle().

◆ SetMemberName()

void TGo4HDF5DataHandle::SetMemberName ( const char *  name)
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().

◆ SetObjectPointer()

void TGo4HDF5DataHandle::SetObjectPointer ( void *  memptr)
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().

◆ SetParentOffset()

void TGo4HDF5DataHandle::SetParentOffset ( size_t  off)
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().

◆ SetTopEvent()

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().

◆ SetTopEventClass()

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().

◆ Write()

void TGo4HDF5DataHandle::Write ( hsize_t  sequencenum,
H5::H5File *  file 
)
virtual

Member Data Documentation

◆ fbDataSetActive

Bool_t TGo4HDF5DataHandle::fbDataSetActive {kFALSE}
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().

◆ fbDataSetExists

Bool_t TGo4HDF5DataHandle::fbDataSetExists {kFALSE}
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().

◆ fiDataSize

size_t TGo4HDF5DataHandle::fiDataSize {0}
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().

◆ fiEntries

ULong_t TGo4HDF5DataHandle::fiEntries {0}
protected

number of event entries found in file dataspace

Definition at line 141 of file TGo4HDF5DataHandle.h.

Referenced by TGo4HDF5BasicDataHandle::BuildReadDataset(), and Read().

◆ fiParentOffset

size_t TGo4HDF5DataHandle::fiParentOffset {0}
protected

offset of this data structure relative to top level event object

Definition at line 149 of file TGo4HDF5DataHandle.h.

Referenced by SetObjectPointer().

◆ fiReadOffset

size_t TGo4HDF5DataHandle::fiReadOffset {0}
protected

begin of real eventdata payload after event object pointer

Definition at line 157 of file TGo4HDF5DataHandle.h.

Referenced by InsertTypeMember(), and TGo4HDF5BasicDataHandle::Read().

◆ fxData

void* TGo4HDF5DataHandle::fxData {nullptr}
protected

◆ fxDataSet

H5::DataSet TGo4HDF5DataHandle::fxDataSet
protected

◆ fxDataSpace

H5::DataSpace* TGo4HDF5DataHandle::fxDataSpace {nullptr}
protected

◆ fxEvent

TGo4EventElement* TGo4HDF5DataHandle::fxEvent {nullptr}
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().

◆ fxEventClass

TString TGo4HDF5DataHandle::fxEventClass
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().

◆ fxFactory

TGo4HDF5DataHandleFactory TGo4HDF5DataHandle::fxFactory
static

Definition at line 119 of file TGo4HDF5DataHandle.h.

Referenced by AddSubMember().

◆ fxFileSpace

H5::DataSpace TGo4HDF5DataHandle::fxFileSpace
protected

◆ fxMemberClass

TString TGo4HDF5DataHandle::fxMemberClass
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().

◆ fxMemberHandle

TString TGo4HDF5DataHandle::fxMemberHandle
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().

◆ fxParentSource

TGo4HDF5Source* TGo4HDF5DataHandle::fxParentSource {nullptr}
protected

backpointer to parent source for exceptions

Definition at line 176 of file TGo4HDF5DataHandle.h.

Referenced by TGo4HDF5BasicDataHandle::BuildReadDataset(), and TGo4HDF5SubVectorDataHandle::Read().

◆ fxSubcomponents

std::vector<TGo4HDF5DataHandle*> TGo4HDF5DataHandle::fxSubcomponents
protected

◆ fxType

H5::CompType* TGo4HDF5DataHandle::fxType {nullptr}
protected

◆ fxTypeName

TString TGo4HDF5DataHandle::fxTypeName
protected

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