48 fFileManager(nullptr),
49 fNtupleManager(nullptr)
61G4bool G4Hdf5NtupleFileManager::CloseNtupleFiles()
65 auto finalResult =
true;
66 auto ntupleVector = fNtupleManager->GetNtupleDescriptionVector();
67 for (
auto ntupleDescription : ntupleVector) {
68 auto result = fFileManager->CloseNtupleFile(ntupleDescription);
69 finalResult = finalResult && result;
84 fNtupleManager = std::make_shared<G4Hdf5NtupleManager>(
fState);
85 fNtupleManager->SetFileManager(fFileManager);
87 return fNtupleManager;
95 fNtupleManager->CreateNtuplesFromBooking(
106 auto finalResult =
true;
110 = fNtupleManager->GetNtupleDescriptionVector();
112 for (
auto ntupleDescription : ntupleVector) {
113 if (ntupleDescription->fFile) {
114 auto result = fFileManager->SetIsEmpty(ntupleDescription->fFileName,
false);
115 finalResult = finalResult && result;
125 auto finalResult =
true;
128 auto result = CloseNtupleFiles();
129 finalResult = finalResult && result;
136 description <<
" " <<
"Resetting data failed";
137 G4Exception(
"G4Hdf5NtupleFileManager::CloseFile()",
140 finalResult = finalResult && result;
149 return fNtupleManager->Reset(
true);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4Hdf5NtupleFileManager(const G4AnalysisManagerState &state)
virtual std::shared_ptr< G4VNtupleManager > CreateNtupleManager() override
virtual G4bool ActionAtOpenFile(const G4String &fileName) override
virtual G4bool ActionAtWrite() override
~G4Hdf5NtupleFileManager()
virtual G4bool Reset() override
virtual G4bool ActionAtCloseFile(G4bool reset) override
std::shared_ptr< G4NtupleBookingManager > fBookingManager
const G4AnalysisManagerState & fState