50void G4CsvNtupleManager::CreateTNtupleFromBooking(
54 if ( ! fFileManager->CreateNtupleFile(ntupleDescription) )
return;
58 new tools::wcsv::ntuple(
64void G4CsvNtupleManager::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");
84 if ( ! WriteHeader(ntupleDescription->
GetNtuple()) ) {
85 Warn(
"Writing ntuple header has failed.", fkClass,
"FinishTNtuple");
90G4bool G4CsvNtupleManager::WriteHeader(tools::wcsv::ntuple* ntuple)
const
97 if ( fIsCommentedHeader ) {
98 return ntuple->write_commented_header(
G4cout);
102 if ( fIsHippoHeader ) {
103 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
std::vector< tools::wcsv::ntuple * > fNtupleVector
void Warn(const G4String &message, const std::string_view inClass, const std::string_view inFunction)