GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 char * GetTypeName ()
void * Data ()
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=0)
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
H5::DataSet fxDataSet
H5::DataSpace * fxDataSpace
H5::DataSpace fxFileSpace
ULong_t fiEntries
void * fxData
size_t fiParentOffset
size_t fiDataSize
size_t fiReadOffset
std::vector< TGo4HDF5DataHandle * > fxSubcomponents
TString fxMemberHandle
TString fxMemberClass
TString fxEventClass
Bool_t fbDataSetExists
Bool_t fbDataSetActive

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 53 of file TGo4HDF5DataHandle.h.

Constructor & Destructor Documentation

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.

TGo4HDF5DataHandle::~TGo4HDF5DataHandle ( )

Definition at line 39 of file TGo4HDF5DataHandle.cxx.

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

Member Function Documentation

TGo4HDF5DataHandle * TGo4HDF5DataHandle::AddSubMember ( const char *  name,
size_t  datasize,
const char *  collectiontype = 0 

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 62 of file TGo4HDF5DataHandle.cxx.

References TGo4HDF5DataHandleFactory::CreateDataHandle(), fxFactory, and fxSubcomponents.

Referenced by TGo4HDF5Adapter::AddSubHandle(), TGo4HDF5Adapter::BuildDataType(), and TGo4HDF5SubVectorDataHandle::SetObjectPointer().

void TGo4HDF5DataHandle::BuildReadDataset ( H5::H5File *  file,
TGo4HDF5Source parent 

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 144 of file TGo4HDF5DataHandle.cxx.

References BuildReadDataset(), and fxSubcomponents.

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

void TGo4HDF5DataHandle::BuildWriteDataset ( H5::H5File *  file)
void* TGo4HDF5DataHandle::Data ( )
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 70 of file TGo4HDF5DataHandle.cxx.

References FindSubMember(), fxSubcomponents, and GetTypeName().

Referenced by FindSubMember(), and TGo4HDF5SubVectorDataHandle::SetObjectPointer().

TGo4HDF5DataHandle* TGo4HDF5DataHandle::GetSubMember ( UInt_t  ix)

Definition at line 122 of file TGo4HDF5DataHandle.h.

References fxSubcomponents.

H5::CompType* TGo4HDF5DataHandle::GetType ( )

return handle for type descriptor. Currently this is filled from external routine of adapter class

Definition at line 65 of file TGo4HDF5DataHandle.h.

References fxType.

Referenced by TGo4HDF5Adapter::FillTypeInfo().

const char* TGo4HDF5DataHandle::GetTypeName ( )
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 55 of file TGo4HDF5DataHandle.cxx.

References fbDataSetActive, fiReadOffset, and fxType.

Referenced by TGo4HDF5Adapter::FillTypeInfo().

void TGo4HDF5DataHandle::Read ( hsize_t  sequencenum,
H5::H5File *  file 
void TGo4HDF5DataHandle::SetActive ( Bool_t  on)
void TGo4HDF5DataHandle::SetAllSubMembersActive ( Bool_t  on)
void TGo4HDF5DataHandle::SetMemberClass ( const char *  clname)

type of the member to access from outside

Definition at line 98 of file TGo4HDF5DataHandle.h.

References fxMemberClass.

Referenced by TGo4HDF5Adapter::AddSubHandle().

void TGo4HDF5DataHandle::SetMemberName ( const char *  name)

identifier for the member to access from outside using the top event handle

Definition at line 95 of file TGo4HDF5DataHandle.h.

References fxMemberHandle.

Referenced by TGo4HDF5Adapter::AddSubHandle(), and TGo4HDF5SubVectorDataHandle::SetObjectPointer().

void TGo4HDF5DataHandle::SetObjectPointer ( void *  memptr)

define location of corresponding object in memory. This is base pointer for all member specific offsets.

Reimplemented in TGo4HDF5SubVectorDataHandle, and TGo4HDF5VectorDataHandle.

Definition at line 100 of file TGo4HDF5DataHandle.cxx.

References fiParentOffset, fxData, fxSubcomponents, fxTypeName, go4hdfdbg, and SetObjectPointer().

Referenced by TGo4HDF5Adapter::BuildDataType(), SetObjectPointer(), TGo4HDF5VectorDataHandle::SetObjectPointer(), and TGo4HDF5Store::Store().

void TGo4HDF5DataHandle::SetParentOffset ( size_t  off)

remember location of this object relative to upper level object.

Definition at line 75 of file TGo4HDF5DataHandle.h.

References fiParentOffset.

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 116 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 130 of file TGo4HDF5DataHandle.cxx.

References fxEventClass, fxSubcomponents, and SetTopEventClass().

Referenced by TGo4HDF5Adapter::BuildDataType(), and SetTopEventClass().

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

Member Data Documentation

Bool_t TGo4HDF5DataHandle::fbDataSetActive
Bool_t TGo4HDF5DataHandle::fbDataSetExists

check on the fly if this handle has already created a dataset

Definition at line 205 of file TGo4HDF5DataHandle.h.

Referenced by TGo4HDF5BasicDataHandle::BuildReadDataset(), TGo4HDF5BasicDataHandle::BuildWriteDataset(), TGo4HDF5VectorDataHandle::BuildWriteDataset(), Read(), and Write().

size_t TGo4HDF5DataHandle::fiDataSize

size of data structure in bytes, for redefining output dataset

Definition at line 173 of file TGo4HDF5DataHandle.h.

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

ULong_t TGo4HDF5DataHandle::fiEntries

number of event entries found in file dataspace

Definition at line 161 of file TGo4HDF5DataHandle.h.

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

size_t TGo4HDF5DataHandle::fiParentOffset

offset of this data structure relative to top level event object

Definition at line 169 of file TGo4HDF5DataHandle.h.

Referenced by SetObjectPointer(), and SetParentOffset().

size_t TGo4HDF5DataHandle::fiReadOffset

begin of real eventdata payload after event object pointer

Definition at line 177 of file TGo4HDF5DataHandle.h.

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

void* TGo4HDF5DataHandle::fxData
H5::DataSet TGo4HDF5DataHandle::fxDataSet
H5::DataSpace* TGo4HDF5DataHandle::fxDataSpace
TGo4EventElement* TGo4HDF5DataHandle::fxEvent

the top level event element to access the current data member from outside

Definition at line 196 of file TGo4HDF5DataHandle.h.

Referenced by TGo4HDF5VectorDataHandle::Read(), and SetTopEvent().

TString TGo4HDF5DataHandle::fxEventClass

the top level event element classname to access the current data member from outside

Definition at line 199 of file TGo4HDF5DataHandle.h.

Referenced by TGo4HDF5VectorDataHandle::Read(), and SetTopEventClass().

TGo4HDF5DataHandleFactory TGo4HDF5DataHandle::fxFactory

Definition at line 132 of file TGo4HDF5DataHandle.h.

Referenced by AddSubMember().

H5::DataSpace TGo4HDF5DataHandle::fxFileSpace
TString TGo4HDF5DataHandle::fxMemberClass

classname of the entry for interpreter to operate e.g. on variable length collection

Definition at line 193 of file TGo4HDF5DataHandle.h.

Referenced by TGo4HDF5VectorDataHandle::Read(), and SetMemberClass().

TString TGo4HDF5DataHandle::fxMemberHandle

predefined interpreter access command e.g. to operate e.g. on the variable length collection

Definition at line 190 of file TGo4HDF5DataHandle.h.

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

TGo4HDF5Source* TGo4HDF5DataHandle::fxParentSource

backpointer to parent source for exceptions

Definition at line 202 of file TGo4HDF5DataHandle.h.

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

std::vector<TGo4HDF5DataHandle*> TGo4HDF5DataHandle::fxSubcomponents
H5::CompType* TGo4HDF5DataHandle::fxType
TString TGo4HDF5DataHandle::fxTypeName

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