Import Geant4 11.0.0 source tree
This commit is contained in:
committed by
Ben Morgan
parent
6399a014b6
commit
80e2389dd8
@@ -31,29 +31,18 @@
|
||||
#include "G4AnalysisManagerState.hh"
|
||||
#include "G4AnalysisUtilities.hh"
|
||||
|
||||
#include "G4Threading.hh"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
using namespace G4Analysis;
|
||||
|
||||
//
|
||||
//
|
||||
// utility methods
|
||||
//
|
||||
|
||||
//_____________________________________________________________________________
|
||||
G4CsvNtupleManager::G4CsvNtupleManager(const G4AnalysisManagerState& state)
|
||||
: G4TNtupleManager<tools::wcsv::ntuple, std::ofstream>(state),
|
||||
fFileManager(nullptr),
|
||||
fIsCommentedHeader(true),
|
||||
fIsHippoHeader(false)
|
||||
: G4TNtupleManager<tools::wcsv::ntuple, std::ofstream>(state)
|
||||
{}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
G4CsvNtupleManager::~G4CsvNtupleManager()
|
||||
{}
|
||||
|
||||
//
|
||||
//
|
||||
// private methods
|
||||
//
|
||||
|
||||
@@ -87,20 +76,14 @@ void G4CsvNtupleManager::FinishTNtuple(
|
||||
|
||||
// Return if creating ntuple failed
|
||||
if ( ! ntupleDescription->fNtuple ) {
|
||||
G4ExceptionDescription description;
|
||||
description << "Creating ntuple has failed. ";
|
||||
G4Exception("G4CsvNtupleManager::FinishTNtuple()",
|
||||
"Analysis_W022", JustWarning, description);
|
||||
Warn("Creating ntuple has failed.", fkClass, "FinishTNtuple");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Write header if ntuple already exists
|
||||
if ( ! WriteHeader(ntupleDescription->fNtuple) ) {
|
||||
G4ExceptionDescription description;
|
||||
description << "Writing ntuple header has failed. ";
|
||||
G4Exception("G4CsvNtupleManager::FinishTNtuple()",
|
||||
"Analysis_W022", JustWarning, description);
|
||||
Warn("Writing ntuple header has failed.", fkClass, "FinishTNtuple");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,17 +93,17 @@ G4bool G4CsvNtupleManager::WriteHeader(tools::wcsv::ntuple* ntuple) const
|
||||
// Write header if ntuple already exists and if this option is activated.
|
||||
// When both Hippo and Commented headers are selected, only Commented
|
||||
// header, which reading is supported.
|
||||
// Return false only if an error occurred.
|
||||
// Return false only if an error occurred.
|
||||
|
||||
if ( fIsCommentedHeader ) {
|
||||
return ntuple->write_commented_header(G4cout);
|
||||
}
|
||||
|
||||
|
||||
// write hippo header (if activated and if not commented header)
|
||||
if ( fIsHippoHeader ) {
|
||||
ntuple->write_hippo_header();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user