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

#include <TGo4HDF5Source.h>

+ Inheritance diagram for TGo4HDF5Source:

Public Member Functions

 TGo4HDF5Source ()
 
 TGo4HDF5Source (TGo4HDF5SourceParameter *par)
 
 TGo4HDF5Source (const char *name)
 
virtual ~TGo4HDF5Source ()
 
Bool_t BuildEvent (TGo4EventElement *dest) override
 
- Public Member Functions inherited from TGo4EventSource
 TGo4EventSource ()
 
 TGo4EventSource (const char *name)
 
virtual ~TGo4EventSource ()
 
void Clear (Option_t *opt="") override
 
Int_t GetCreateStatus () const
 
Int_t GetEventStatus () const
 
const char * GetErrMess () const
 
virtual const char * GetActiveName () const
 
virtual Bool_t CheckEventClass (TClass *cl)
 
- Public Member Functions inherited from TGo4HDF5Adapter
 TGo4HDF5Adapter ()
 
virtual ~TGo4HDF5Adapter ()
 

Static Public Member Functions

static TList * ProducesFilesList (const char *mask)
 
- Static Public Member Functions inherited from TGo4HDF5Adapter
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=nullptr)
 
static void FillTypeInfo (TGo4HDF5DataHandle *handle, const char *membername, const char *memtypename, size_t memberoffset=0, Int_t arraydim=0, TDataMember *member=nullptr)
 

Protected Member Functions

void OpenFile (const char *fname) override
 
void BuildDataSet (TGo4EventElement *event) override
 
void DeleteDataSet () override
 
- Protected Member Functions inherited from TGo4EventSource
void SetErrMess (const char *txt)
 
void SetEventStatus (Int_t status)
 
void SetCreateStatus (Int_t status)
 
void ThrowError (Int_t creastat, Int_t errstat, const char *message,...)
 
void ThrowEOF (Int_t creastat, Int_t errstat, const char *message,...)
 
- Protected Member Functions inherited from TGo4HDF5Adapter
virtual void CloseFile ()
 
void BuildDataType (TGo4EventElement *event, TGo4HDF5DataHandle *parent=nullptr, Int_t index=0)
 
size_t ScanEventSize (TGo4EventElement *event)
 
UInt_t ConvertFileMode (Go4_H5_File_Flags flags)
 

Private Member Functions

Bool_t OpenNextFile ()
 
Bool_t CloseCurrentFile ()
 

Private Attributes

Char_t * fxReadBuffer {nullptr}
 
size_t fiReadOffset {0}
 
TList * fxFilesNames {nullptr}
 
TString fxCurrentFileName
 

Friends

class TGo4HDF5DataHandle
 
class TGo4HDF5BasicDataHandle
 

Additional Inherited Members

- Static Public Attributes inherited from TGo4EventSource
static const Int_t fgiTIMEOUTDEFAULT =1
 
- Static Public Attributes inherited from TGo4HDF5Adapter
static const char * fgcFILESUF = ".h5"
 
- Protected Types inherited from TGo4EventSource
enum  { fguTXTLEN = 256 }
 
- Protected Attributes inherited from TGo4HDF5Adapter
H5::H5File * fxFile {nullptr}
 
TGo4HDF5DataHandlefxHandle {nullptr}
 
hsize_t fiFillCount {0}
 
Bool_t fbDataSetExists {kFALSE}
 
TGo4EventElementfxEvent {nullptr}
 
UInt_t fiFlags {0}
 

Detailed Description

Event source which reads entries from a dataset in a hdf5 formatted file names of elements in hdf5 data must match the members of the input event class

Definition at line 34 of file TGo4HDF5Source.h.

Constructor & Destructor Documentation

◆ TGo4HDF5Source() [1/3]

TGo4HDF5Source::TGo4HDF5Source ( )

Definition at line 57 of file TGo4HDF5Source.cxx.

◆ TGo4HDF5Source() [2/3]

TGo4HDF5Source::TGo4HDF5Source ( TGo4HDF5SourceParameter par)

◆ TGo4HDF5Source() [3/3]

TGo4HDF5Source::TGo4HDF5Source ( const char *  name)

◆ ~TGo4HDF5Source()

TGo4HDF5Source::~TGo4HDF5Source ( )
virtual

Definition at line 63 of file TGo4HDF5Source.cxx.

References CloseCurrentFile(), and fxFilesNames.

Member Function Documentation

◆ BuildDataSet()

void TGo4HDF5Source::BuildDataSet ( TGo4EventElement event)
overrideprotectedvirtual

◆ BuildEvent()

Bool_t TGo4HDF5Source::BuildEvent ( TGo4EventElement dest)
overridevirtual

Fill the destination event dest from the tree. If end of tree is reached, the current event counter is reset and a kFALSE value is returned.

Reimplemented from TGo4EventSource.

Definition at line 214 of file TGo4HDF5Source.cxx.

References BuildDataSet(), TGo4Log::Error(), TGo4HDF5Adapter::fiFillCount, TGo4HDF5Adapter::fxEvent, TGo4HDF5Adapter::fxFile, TGo4HDF5Adapter::fxHandle, go4init::msg, TGo4HDF5DataHandle::Read(), TGo4EventSource::SetErrMess(), and TGo4EventSource::ThrowError().

◆ CloseCurrentFile()

Bool_t TGo4HDF5Source::CloseCurrentFile ( )
private

◆ DeleteDataSet()

void TGo4HDF5Source::DeleteDataSet ( )
overrideprotectedvirtual

delete dataset resource

Reimplemented from TGo4HDF5Adapter.

Definition at line 208 of file TGo4HDF5Source.cxx.

References TGo4HDF5Adapter::DeleteDataSet(), and fxReadBuffer.

◆ OpenFile()

void TGo4HDF5Source::OpenFile ( const char *  fname)
overrideprotectedvirtual

opens the hdf5 file of given name for reading

Implements TGo4HDF5Adapter.

Definition at line 165 of file TGo4HDF5Source.cxx.

References TGo4HDF5Adapter::CloseFile(), TGo4Log::Error(), TGo4HDF5Adapter::fgcFILESUF, TGo4HDF5Adapter::fxFile, TGo4Log::Info(), go4init::msg, and TGo4EventSource::SetErrMess().

Referenced by OpenNextFile().

◆ OpenNextFile()

Bool_t TGo4HDF5Source::OpenNextFile ( )
private

Open next file from the files list.

Definition at line 133 of file TGo4HDF5Source.cxx.

References CloseCurrentFile(), fxCurrentFileName, fxFilesNames, and OpenFile().

Referenced by TGo4HDF5Source().

◆ ProducesFilesList()

TList * TGo4HDF5Source::ProducesFilesList ( const char *  mask)
static

Definition at line 73 of file TGo4HDF5Source.cxx.

References TGo4HDF5Adapter::fgcFILESUF.

Referenced by TGo4HDF5Source().

Friends And Related Function Documentation

◆ TGo4HDF5BasicDataHandle

friend class TGo4HDF5BasicDataHandle
friend

Definition at line 37 of file TGo4HDF5Source.h.

◆ TGo4HDF5DataHandle

friend class TGo4HDF5DataHandle
friend

Definition at line 36 of file TGo4HDF5Source.h.

Member Data Documentation

◆ fiReadOffset

size_t TGo4HDF5Source::fiReadOffset {0}
private

begin of real eventdata payload after event object pointer

Definition at line 73 of file TGo4HDF5Source.h.

◆ fxCurrentFileName

TString TGo4HDF5Source::fxCurrentFileName
private

current name of the file

Definition at line 79 of file TGo4HDF5Source.h.

Referenced by CloseCurrentFile(), and OpenNextFile().

◆ fxFilesNames

TList* TGo4HDF5Source::fxFilesNames {nullptr}
private

list of files names

Definition at line 76 of file TGo4HDF5Source.h.

Referenced by OpenNextFile(), TGo4HDF5Source(), and ~TGo4HDF5Source().

◆ fxReadBuffer

Char_t* TGo4HDF5Source::fxReadBuffer {nullptr}
private

read buffer for hdf5

Definition at line 70 of file TGo4HDF5Source.h.

Referenced by DeleteDataSet().


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