35#include "tools/ntuple_booking"
56void G4Hdf5NtupleManager::CreateTNtuple(
63 auto ntupleFile = ntupleDescription->
fFile;
65 ntupleFile = fFileManager->GetFile();
71 G4String inFunction =
"G4Hdf5NtupleManager::::CreateTNtuple";
74 <<
"Cannot create ntuple. Ntuple file does not exist." <<
G4endl;
80 auto directory = std::get<2>(*ntupleFile);
81 auto basketSize = fFileManager->GetBasketSize();
83 auto compressionLevel = 0;
87 =
new tools::hdf5::ntuple(
89 compressionLevel, basketSize);
95void G4Hdf5NtupleManager::CreateTNtupleFromBooking(
99 if ( ntupleDescription->
fFileName.size() ) {
100 fFileManager->CreateNtupleFile(ntupleDescription);
104 CreateTNtuple(ntupleDescription,
true);
108void G4Hdf5NtupleManager::FinishTNtuple(
112 if ( ! ntupleDescription->
fNtuple ) {
114 CreateTNtuple(ntupleDescription,
false);
117 fFileManager->LockDirectoryNames();
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
G4GLOB_DLL std::ostream G4cout
G4Hdf5NtupleManager(const G4AnalysisManagerState &state)
std::vector< tools::hdf5::ntuple * > fNtupleVector
std::shared_ptr< TF > fFile
tools::ntuple_booking fNtupleBooking