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