GSI Object Oriented Online Offline (Go4)  GO4-6.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
TGo4HDF5Adapter Class Referenceabstract

#include <TGo4HDF5Adapter.h>

+ Inheritance diagram for TGo4HDF5Adapter:

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=0)
 
static void FillTypeInfo (TGo4HDF5DataHandle *handle, const char *membername, const char *memtypename, size_t memberoffset=0, Int_t arraydim=0, TDataMember *member=0)
 

Static Public Attributes

static const char * fgcFILESUF = ".h5"
 

Protected Member Functions

virtual void OpenFile (const char *fname=0)=0
 
virtual void CloseFile ()
 
virtual void BuildDataSet (TGo4EventElement *event)=0
 
virtual void DeleteDataSet ()
 
void BuildDataType (TGo4EventElement *event, TGo4HDF5DataHandle *parent=0, Int_t index=0)
 
size_t ScanEventSize (TGo4EventElement *event)
 
UInt_t ConvertFileMode (Go4_H5_File_Flags flags)
 

Protected Attributes

H5::H5File * fxFile
 
TGo4HDF5DataHandlefxHandle
 
Bool_t fbDataSetExists
 
TGo4EventElementfxEvent
 
UInt_t fiFlags
 
hsize_t fiFillCount
 

Detailed Description

Adapter class for io with hdf5 formatted file

Definition at line 34 of file TGo4HDF5Adapter.h.

Constructor & Destructor Documentation

TGo4HDF5Adapter::TGo4HDF5Adapter ( )
inline

Definition at line 37 of file TGo4HDF5Adapter.h.

virtual TGo4HDF5Adapter::~TGo4HDF5Adapter ( )
inlinevirtual

Definition at line 42 of file TGo4HDF5Adapter.h.

Member Function Documentation

void TGo4HDF5Adapter::AddSubHandle ( TGo4HDF5DataHandle handle,
const char *  name,
const char *  type,
size_t  size,
size_t  memberoffset,
const char *  membername,
const char *  classname,
TClass *  valueclass 
)
static

Add subhandle to handle that represents a containend collection. classname or valueclass, resp, refers to type of element in container,

Definition at line 55 of file TGo4HDF5Adapter.cxx.

References TGo4HDF5DataHandle::AddSubMember(), TGo4HDF5DataHandle::Data(), FillTypeInfo(), TGo4HDF5DataHandle::SetMemberClass(), TGo4HDF5DataHandle::SetMemberName(), and TGo4HDF5DataHandle::SetParentOffset().

Referenced by FillTypeInfo().

virtual void TGo4HDF5Adapter::BuildDataSet ( TGo4EventElement event)
protectedpure virtual

initialize dataset from event structure

Implemented in TGo4HDF5Store, and TGo4HDF5Source.

void TGo4HDF5Adapter::BuildDataType ( TGo4EventElement event,
TGo4HDF5DataHandle parent = 0,
Int_t  index = 0 
)
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 369 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().

void TGo4HDF5Adapter::CloseFile ( )
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().

UInt_t TGo4HDF5Adapter::ConvertFileMode ( Go4_H5_File_Flags  flags)
protected

Convert common go4 filemode flags to hdf5 flags:

Definition at line 440 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().

void TGo4HDF5Adapter::DeleteDataSet ( )
protectedvirtual

delete dataset resource

Reimplemented in TGo4HDF5Source.

Definition at line 37 of file TGo4HDF5Adapter.cxx.

References fbDataSetExists, and fxHandle.

Referenced by TGo4HDF5Source::DeleteDataSet(), and TGo4HDF5Store::~TGo4HDF5Store().

void TGo4HDF5Adapter::FillTypeInfo ( TGo4HDF5DataHandle handle,
TClass *  rootclass,
const char *  basename = 0 
)
static

evaluate h5 type information from root class streamer

Definition at line 81 of file TGo4HDF5Adapter.cxx.

References AddSubHandle(), TGo4HDF5DataHandle::Data(), and go4hdfdbg.

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

void TGo4HDF5Adapter::FillTypeInfo ( TGo4HDF5DataHandle handle,
const char *  membername,
const char *  memtypename,
size_t  memberoffset = 0,
Int_t  arraydim = 0,
TDataMember *  member = 0 
)
static

evaluate h5 type information for basic types of memtypename

Definition at line 259 of file TGo4HDF5Adapter.cxx.

References FillTypeInfo(), TGo4HDF5DataHandle::GetType(), go4hdfdbg, and TGo4HDF5DataHandle::InsertTypeMember().

virtual void TGo4HDF5Adapter::OpenFile ( const char *  fname = 0)
protectedpure virtual

opens the hdf5 file depending on the setup

Implemented in TGo4HDF5Store, and TGo4HDF5Source.

size_t TGo4HDF5Adapter::ScanEventSize ( TGo4EventElement event)
protected

evaluate total memory size of event object regarding composite subevents

Definition at line 44 of file TGo4HDF5Adapter.cxx.

References go4hdfdbg.

Referenced by BuildDataType().

Member Data Documentation

Bool_t TGo4HDF5Adapter::fbDataSetExists
protected

True if branch already exists. Used for automatic creation of new event branch within Store method.

Definition at line 106 of file TGo4HDF5Adapter.h.

Referenced by TGo4HDF5Source::BuildDataSet(), TGo4HDF5Store::BuildDataSet(), and DeleteDataSet().

const char * TGo4HDF5Adapter::fgcFILESUF = ".h5"
static

Standard suffix for file name

Definition at line 42 of file TGo4HDF5Adapter.h.

Referenced by TGo4HDF5Source::OpenFile(), TGo4HDF5Store::OpenFile(), and TGo4HDF5Source::ProducesFilesList().

hsize_t TGo4HDF5Adapter::fiFillCount
protected

counter of filled events.

Definition at line 117 of file TGo4HDF5Adapter.h.

Referenced by TGo4HDF5Source::BuildEvent(), and TGo4HDF5Store::Store().

UInt_t TGo4HDF5Adapter::fiFlags
protected

remember file property flags?.

Definition at line 112 of file TGo4HDF5Adapter.h.

Referenced by TGo4HDF5Store::OpenFile(), and TGo4HDF5Store::TGo4HDF5Store().

TGo4EventElement* TGo4HDF5Adapter::fxEvent
protected

Points to event structure to be filled into dataset.

Definition at line 109 of file TGo4HDF5Adapter.h.

Referenced by TGo4HDF5Source::BuildEvent(), and TGo4HDF5Store::Store().

H5::H5File* TGo4HDF5Adapter::fxFile
protected
TGo4HDF5DataHandle* TGo4HDF5Adapter::fxHandle
protected

handle object to recursively treat the io of nested event components

Definition at line 101 of file TGo4HDF5Adapter.h.

Referenced by TGo4HDF5Source::BuildDataSet(), TGo4HDF5Store::BuildDataSet(), BuildDataType(), TGo4HDF5Source::BuildEvent(), DeleteDataSet(), and TGo4HDF5Store::Store().


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