67{
68
69
70
71 auto ntupleFile = fFileManager->CreateNtupleFile(ntupleDescription, fFileNumber);
72 if ( ! ntupleFile ) {
73 if ( warn ) {
75 description
76 <<
"Ntuple file must be defined first." <<
G4endl
77 << "Cannot create main ntuple.";
78 G4Exception(
"G4RootMainAnalysisManager::CreateNtuple",
80 }
81 return;
82 }
83
84
86
87#ifdef G4VERBOSE
90 ->
Message(
"create",
"main ntuple", ntupleBooking.name());
91#endif
92
93
94 auto ntuple = new tools::wroot::ntuple(*std::get<2>(*ntupleFile), ntupleBooking, fRowWise);
95
96 auto basketSize = fNtupleBuilder->GetBasketSize();
97 ntuple->set_basket_size(basketSize);
98
99 fNtupleVector.push_back(ntuple);
100 fNtupleDescriptionVector.push_back(ntupleDescription);
101
102#ifdef G4VERBOSE
105 ->
Message(
"create",
"main ntuple", ntupleBooking.name());
106#endif
107}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
const G4AnalysisVerbose * GetVerboseL3() const
const G4AnalysisVerbose * GetVerboseL4() const
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
const G4AnalysisManagerState & fState
tools::ntuple_booking fNtupleBooking