31#ifndef G4Hdf5NtupleManager_h
32#define G4Hdf5NtupleManager_h 1
37#include "tools/hdf5/ntuple"
53 G4int ntupleId,
G4int columnId,
const std::string& value);
68 void SetFileManager(std::shared_ptr<G4Hdf5FileManager> fileManager);
71 const std::vector<Hdf5NtupleDescription*>& GetNtupleDescriptionVector()
const;
78 virtual void CreateTNtupleFromBooking(
81 virtual void FinishTNtuple(
87 std::shared_ptr<G4Hdf5FileManager> fFileManager;
93G4Hdf5NtupleManager::SetFileManager(std::shared_ptr<G4Hdf5FileManager> fileManager)
94{ fFileManager = fileManager; }
96inline const std::vector<Hdf5NtupleDescription*>&
97G4Hdf5NtupleManager::GetNtupleDescriptionVector()
const
103 G4int ntupleId,
G4int columnId,
const std::string& value)
111 auto ntuple = GetNtupleInFunction(ntupleId,
"FillNtupleTColumn");
112 if ( ! ntuple )
return false;
115 auto index = columnId - fFirstNtupleColumnId;
116 if ( index < 0 || index >=
G4int(ntuple->columns().size()) ) {
118 description <<
" " <<
"ntupleId " << ntupleId
119 <<
" columnId " << columnId <<
" does not exist.";
120 G4Exception(
"G4TNtupleManager::FillNtupleTColumn()",
124 auto icolumn = ntuple->columns()[index];
127 auto column =
dynamic_cast<tools::hdf5::ntuple::column_string*
>(icolumn);
130 description <<
" Column type does not match: "
131 <<
" ntupleId " << ntupleId
132 <<
" columnId " << columnId <<
" value " << value;
143 description <<
" ntupleId " << ntupleId
144 <<
" columnId " << columnId <<
" value " << value;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
std::tuple< hid_t, hid_t, hid_t > G4Hdf5File
G4bool GetIsActivation() const
const G4AnalysisVerbose * GetVerboseL4() const
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
std::vector< G4TNtupleDescription< tools::hdf5::ntuple, G4Hdf5File > * > fNtupleDescriptionVector
const G4AnalysisManagerState & fState