35 #ifndef ExG4HbookNtupleManager_h
36 #define ExG4HbookNtupleManager_h 1
42 #include <tools/hbook/wntuple>
47 class ExG4HbookFileManager;
57 friend class ExG4HbookAnalysisManager;
61 virtual ~ExG4HbookNtupleManager();
69 G4int GetNtupleHbookIdOffset()
const;
72 void SetFileManager(ExG4HbookFileManager* fileManager);
75 tools::hbook::wntuple* GetNtuple()
const;
76 tools::hbook::wntuple* GetNtuple(
G4int ntupleId)
const;
79 std::vector<tools::hbook::wntuple*>::iterator BeginNtuple();
80 std::vector<tools::hbook::wntuple*>::iterator EndNtuple();
81 std::vector<tools::hbook::wntuple*>::const_iterator BeginConstNtuple()
const;
82 std::vector<tools::hbook::wntuple*>::const_iterator EndConstNtuple()
const;
131 void SetNtupleHbookIdOffset();
132 void CreateNtuplesFromBooking();
134 tools::hbook::wntuple::column<int>*
135 GetNtupleIColumn(
G4int ntupleId,
G4int columnId)
const;
136 tools::hbook::wntuple::column<float>*
137 GetNtupleFColumn(
G4int ntupleId,
G4int columnId)
const;
138 tools::hbook::wntuple::column<double>*
139 GetNtupleDColumn(
G4int ntupleId,
G4int columnId)
const;
142 ExG4HbookNtupleDescription* GetNtupleInFunction(
G4int id,
145 G4bool onlyIfActive =
true)
const;
149 ExG4HbookFileManager* fFileManager;
150 G4int fNtupleHbookIdOffset;
151 std::vector<ExG4HbookNtupleDescription*> fNtupleDescriptionVector;
152 std::vector<tools::hbook::wntuple*> fNtupleVector;
157 inline void ExG4HbookNtupleManager::SetFileManager(ExG4HbookFileManager* fileManager)
158 { fFileManager = fileManager; }
160 inline G4int ExG4HbookNtupleManager::GetNtupleHbookIdOffset()
const {
161 return fNtupleHbookIdOffset;
164 inline std::vector<tools::hbook::wntuple*>::iterator
165 ExG4HbookNtupleManager::BeginNtuple()
166 {
return fNtupleVector.begin(); }
168 inline std::vector<tools::hbook::wntuple*>::iterator
169 ExG4HbookNtupleManager::EndNtuple()
170 {
return fNtupleVector.end(); }
172 inline std::vector<tools::hbook::wntuple*>::const_iterator
173 ExG4HbookNtupleManager::BeginConstNtuple()
const
174 {
return fNtupleVector.begin(); }
176 inline std::vector<tools::hbook::wntuple*>::const_iterator
177 ExG4HbookNtupleManager::EndConstNtuple()
const
178 {
return fNtupleVector.end(); }
180 inline G4int ExG4HbookNtupleManager::GetNofNtuples()
const
181 {
return fNtupleVector.size(); }
virtual G4int GetNofNtuples() const =0
virtual G4int CreateNtupleSColumn(const G4String &name)=0
virtual G4bool FillNtupleSColumn(G4int id, const G4String &value)=0
virtual G4int CreateNtuple(const G4String &name, const G4String &title)=0
virtual void FinishNtuple()=0
virtual G4int CreateNtupleFColumn(const G4String &name, std::vector< float > *vector)=0
virtual G4int CreateNtupleIColumn(const G4String &name, std::vector< int > *vector)=0
virtual G4bool FillNtupleIColumn(G4int id, G4int value)=0
virtual G4bool AddNtupleRow()=0
virtual G4bool FillNtupleFColumn(G4int id, G4float value)=0
virtual G4bool FillNtupleDColumn(G4int id, G4double value)=0
virtual G4int CreateNtupleDColumn(const G4String &name, std::vector< double > *vector)=0
Definition of the ExG4HbookNtupleDescription structure.