GSI Object Oriented Online Offline (Go4)  GO4-6.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4HDF5Adapter.h
Go to the documentation of this file.
1 // $Id: TGo4HDF5Adapter.h 2688 2020-01-10 13:35:00Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4HDF5ADAPTER_H
15 #define TGO4HDF5ADAPTER_H
16 
17 
18 #include "Go4HDF5.h"
19 #include "Rtypes.h"
20 #include "TString.h"
21 
22 #ifndef __CINT__
23 #include "H5Cpp.h"
24 #endif
25 
26 #include "TGo4HDF5DataHandle.h"
27 
28 
35  public:
36 
38  fbDataSetExists(kFALSE),
39  fxEvent(0),fiFlags(H5F_ACC_TRUNC),
40  fiFillCount(0) {};
41 
42  virtual ~TGo4HDF5Adapter(){};
43 
44 
46  static const char* fgcFILESUF;
47 
48 
51  static void AddSubHandle(TGo4HDF5DataHandle* handle, const char* name, const char* type, size_t size,
52  size_t memberoffset, const char* membername, const char* classname, TClass* valueclass);
53 
55  static void FillTypeInfo(TGo4HDF5DataHandle* handle, TClass* rootclass, const char* basename=0);
56 
58  static void FillTypeInfo(TGo4HDF5DataHandle* handle,
59  const char* membername, const char* memtypename, size_t memberoffset=0,
60  Int_t arraydim=0, TDataMember* member=0);
61 
62 
63 protected:
64 
66  virtual void OpenFile(const char* fname=0) =0;
67 
69  virtual void CloseFile();
70 
72  virtual void BuildDataSet(TGo4EventElement* event) =0;
73 
75  virtual void DeleteDataSet();
76 
80  void BuildDataType(TGo4EventElement* event, TGo4HDF5DataHandle* parent=0, Int_t index=0);
81 
82 
83 
84 
86  size_t ScanEventSize(TGo4EventElement* event);
87 
88 
89 
91  UInt_t ConvertFileMode(Go4_H5_File_Flags flags);
92 
93 
94 
95 #ifndef __CINT__
96 
98  H5::H5File* fxFile;
99 
102 
103 #endif
104 
107 
110 
112  UInt_t fiFlags;
113 
114 
115 #ifndef __CINT__
116 
117  hsize_t fiFillCount;
118 #endif
119 
120 };
121 
122 
123 
124 #endif //TGO4HDF5ADAPTER_H
static const char * fgcFILESUF
H5::H5File * fxFile
UInt_t ConvertFileMode(Go4_H5_File_Flags flags)
virtual void BuildDataSet(TGo4EventElement *event)=0
static void FillTypeInfo(TGo4HDF5DataHandle *handle, TClass *rootclass, const char *basename=0)
virtual void OpenFile(const char *fname=0)=0
virtual ~TGo4HDF5Adapter()
void BuildDataType(TGo4EventElement *event, TGo4HDF5DataHandle *parent=0, Int_t index=0)
TGo4EventElement * fxEvent
size_t ScanEventSize(TGo4EventElement *event)
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)
virtual void DeleteDataSet()
Go4_H5_File_Flags
Definition: Go4HDF5.h:41
virtual void CloseFile()
TGo4HDF5DataHandle * fxHandle