79 fNtupleManager(nullptr),
85 <<
"G4CsvAnalysisManager already exists."
86 <<
"Cannot create another instance.";
87 G4Exception(
"G4CsvAnalysisManager::G4CsvAnalysisManager()",
121 for (
auto ntupleDescription : ntupleVector) {
144 if ( ! h1Vector.size() )
return true;
149 result =
WriteT(h1Vector, hnVector,
"h1");
168 if ( ! h2Vector.size() )
return true;
173 result =
WriteT(h2Vector, hnVector,
"h2");
192 if ( ! h3Vector.size() )
return true;
197 result =
WriteT(h3Vector, hnVector,
"h3");
216 if ( ! p1Vector.size() )
return true;
221 result =
WriteT(p1Vector, hnVector,
"p1");
240 if ( ! p2Vector.size() )
return true;
245 result =
WriteT(p2Vector, hnVector,
"p2");
263 auto finalResult =
true;
266 finalResult = finalResult && result;
269 finalResult = finalResult && result;
277 auto finalResult =
true;
279 finalResult = finalResult && result;
283 finalResult = finalResult && result;
299 auto finalResult =
true;
314 <<
" " <<
"No master G4CsvAnalysisManager instance exists."
316 <<
" " <<
"Histogram data will not be merged.";
323 finalResult = finalResult && result;
327 finalResult = finalResult && result;
331 finalResult = finalResult && result;
335 finalResult = finalResult && result;
339 finalResult = finalResult && result;
353 ->
Message(
"write",
"files",
"", finalResult);
362 auto finalResult =
true;
366 finalResult = finalResult && result;
372 finalResult = finalResult && result;
378 description <<
" " <<
"Resetting data failed";
383 finalResult = finalResult && result;
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
std::ostringstream G4ExceptionDescription
static G4ThreadLocal G4CsvAnalysisManager * fgInstance
std::shared_ptr< G4CsvFileManager > fFileManager
static G4bool IsInstance()
G4CsvAnalysisManager(G4bool isMaster=true)
virtual G4bool WriteImpl() final
void CreateNtuplesFromBooking()
#define G4MUTEX_INITIALIZER
static G4CsvAnalysisManager * Instance()
G4bool Reset(G4bool deleteNtuple)
G4bool CloseNtupleFiles()
void SetFileManager(std::shared_ptr< G4CsvFileManager > fileManager)
const G4AnalysisVerbose * GetVerboseL4() const
G4CsvNtupleManager * fNtupleManager
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void SetFileManager(std::shared_ptr< G4VFileManager > fileManager)
const std::vector< NtupleDescriptionType * > & GetNtupleDescriptionVector() const
G4bool GetIsMaster() const
virtual G4bool OpenFileImpl(const G4String &fileName) final
G4bool WriteT(const std::vector< T * > &htVector, const std::vector< G4HnInformation * > &hnVector, const G4String &hnType)
static G4CsvAnalysisManager * fgMasterInstance
G4AnalysisManagerState fState
virtual G4bool CloseFileImpl() final
const G4AnalysisVerbose * GetVerboseL1() const
void SetNtupleManager(G4VNtupleManager *ntupleManager)