35#include "tools/ntuple_booking"
49void G4XmlNtupleManager::CreateTNtupleFromBooking(
53 if ( ! fFileManager->CreateNtupleFile(ntupleDescription) )
return;
57 new tools::waxml::ntuple(
63void G4XmlNtupleManager::FinishTNtuple(
69 if (fFileManager->GetFileName().size() == 0u)
return;
72 if (ntupleDescription->
GetNtuple() ==
nullptr) {
73 CreateTNtupleFromBooking(ntupleDescription);
77 if (ntupleDescription->
GetNtuple() ==
nullptr) {
78 Warn(
"Creating ntuple has failed. ", fkClass,
"FinishTNtuple");
86 ntupleName.append(
"_v");
87 ntupleName.append(std::to_string(
GetCycle()));
92 path.append(fFileManager->GetNtupleDirectoryName());
94 ->write_header(path, ntupleName,
96 fFileManager->LockDirectoryNames();
G4GLOB_DLL std::ostream G4cerr
const tools::ntuple_booking & GetNtupleBooking() const
void SetNtuple(NT *ntuple)
std::shared_ptr< FT > GetFile() const
G4XmlNtupleManager()=delete
void Warn(const G4String &message, const std::string_view inClass, const std::string_view inFunction)