45 using namespace G4Analysis;
53 if ( fgInstance ==
nullptr ) {
64 fNtupleManager(nullptr),
71 <<
"G4XmlAnalysisReader already exists."
72 <<
"Cannot create another instance.";
73 G4Exception(
"G4XmlAnalysisReader::G4XmlAnalysisReader()",
119 tools::raxml_out* handler =
nullptr;
121 std::vector<tools::raxml_out>& objects = rfile->objects();
122 std::vector<tools::raxml_out>::iterator it;
123 for (it = objects.begin(); it!=objects.end(); ++it) {
124 tools::raxml_out&
object = *it;
125 if (
object.cls() == objectType &&
object.name() == objectName ) {
136 <<
"Cannot get "<< objectName <<
" in file " << fileName;
137 G4String inFunctionFull =
"G4XmlAnalysisReader::";
138 inFunctionFull.
append(inFunction);
151 auto finalResult =
true;
154 finalResult = finalResult &&
result;
157 finalResult = finalResult &&
result;
177 tools::raxml_out* handler
178 =
GetHandler(fileName, h1Name, tools::histo::h1d::s_class(),
"ReadH1Impl");
204 =
GetHandler(fileName, h2Name, tools::histo::h2d::s_class(),
"ReadH2Impl");
207 auto h2 =
static_cast<tools::histo::h2d*
>(handler->object());
230 =
GetHandler(fileName, h3Name, tools::histo::h3d::s_class(),
"ReadH3Impl");
233 auto h3 =
static_cast<tools::histo::h3d*
>(handler->object());
256 =
GetHandler(fileName, p1Name, tools::histo::p1d::s_class(),
"ReadP1Impl");
259 auto p1 =
static_cast<tools::histo::p1d*
>(handler->object());
282 =
GetHandler(fileName, p2Name, tools::histo::p2d::s_class(),
"ReadP2Impl");
285 auto p2 =
static_cast<tools::histo::p2d*
>(handler->object());
310 auto fullFileName = fileName;
311 if ( ! isUserFileName ) {
316 =
GetHandler(fullFileName, ntupleName, tools::aida::ntuple::s_class(),
const G4AnalysisVerbose * GetVerboseL2() const
virtual G4int ReadH1Impl(const G4String &h1Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
std::ostringstream G4ExceptionDescription
G4AnalysisManagerState fState
G4String GetNtupleFileName(const G4String &ntupleName) const
G4XmlRNtupleManager * fNtupleManager
void SetNtupleManager(G4VRNtupleManager *ntupleManager)
void SetFileManager(G4BaseFileManager *fileManager)
tools::raxml * GetRFile(const G4String &fileName) const
virtual G4int ReadP2Impl(const G4String &h1Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
virtual G4int ReadNtupleImpl(const G4String &ntupleName, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
virtual G4int ReadH3Impl(const G4String &h1Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
const G4AnalysisVerbose * GetVerboseL4() const
virtual ~G4XmlAnalysisReader()
virtual G4int ReadH2Impl(const G4String &h1Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
tools::raxml_out * GetHandler(const G4String &fileName, const G4String &objectName, const G4String &objectType, const G4String &inFunction)
virtual G4int ReadP1Impl(const G4String &h1Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
G4double G4ParticleHPJENDLHEData::G4double result
static G4XmlAnalysisReader * fgMasterInstance
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4int SetNtuple(G4TRNtupleDescription< TNTUPLE > *rntupleDescription)
G4XmlAnalysisReader(G4bool isMaster=true)
static G4XmlAnalysisReader * Instance()
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
virtual G4bool OpenRFile(const G4String &fileName)
G4bool GetIsMaster() const
G4String & append(const G4String &)
G4XmlRFileManager * fFileManager
static G4ThreadLocal G4XmlAnalysisReader * fgInstance