Import Geant4 10.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2019-12-06 15:12:28 +01:00
parent b2a62ae692
commit 5baee230e9
2997 changed files with 141580 additions and 98673 deletions
@@ -188,18 +188,22 @@ void Tokenize(const G4String& line, std::vector<G4String>& tokens)
}
//_____________________________________________________________________________
G4AnalysisOutput GetOutput(const G4String& outputName) {
G4AnalysisOutput GetOutput(const G4String& outputName, G4bool warn) {
if ( outputName == "csv" ) { return G4AnalysisOutput::kCsv; }
#ifdef TOOLS_USE_HDF5
else if ( outputName == "hdf5" ) { return G4AnalysisOutput::kHdf5; }
#endif
else if ( outputName == "root" ) { return G4AnalysisOutput::kRoot; }
else if ( outputName == "xml" ) { return G4AnalysisOutput::kXml; }
else if ( outputName == "none" ) { return G4AnalysisOutput::kNone; }
else {
G4ExceptionDescription description;
description
<< " \"" << outputName << "\" output type is not supported." << G4endl
<< " " << "Root type will be used.";
G4Exception("G4Analysis::GetOutputType",
"Analysis_W013", JustWarning, description);
if (warn) {
G4ExceptionDescription description;
description
<< " \"" << outputName << "\" output type is not supported." << G4endl;
G4Exception("G4Analysis::GetOutputType",
"Analysis_W013", JustWarning, description);
}
return G4AnalysisOutput::kNone;
}
}
@@ -210,6 +214,11 @@ G4String GetOutputName(G4AnalysisOutput output) {
case G4AnalysisOutput::kCsv:
return "csv";
break;
#ifdef TOOLS_USE_HDF5
case G4AnalysisOutput::kHdf5:
return "hdf5";
break;
#endif
case G4AnalysisOutput::kRoot:
return "root";
break;