50void G4CsvNtupleManager::CreateTNtupleFromBooking(
54 if ( ! fFileManager->CreateNtupleFile(ntupleDescription) )
return;
58 new tools::wcsv::ntuple(
63void G4CsvNtupleManager::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");
83 if ( ! WriteHeader(ntupleDescription->
GetNtuple()) ) {
84 Warn(
"Writing ntuple header has failed.", fkClass,
"FinishTNtuple");
89G4bool G4CsvNtupleManager::WriteHeader(tools::wcsv::ntuple* ntuple)
const
96 if ( fIsCommentedHeader ) {
97 return ntuple->write_commented_header(
G4cout);
101 if ( fIsHippoHeader ) {
102 ntuple->write_hippo_header();
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
G4CsvNtupleManager()=delete
const tools::ntuple_booking & GetNtupleBooking() const
void SetNtuple(NT *ntuple)
std::shared_ptr< FT > GetFile() const
void Warn(const G4String &message, const std::string_view inClass, const std::string_view inFunction)