35#include "tools/rroot/file"
46 fH1RFileManager = std::make_shared<G4RootHnRFileManager<histo::h1d>>(
this);
47 fH2RFileManager = std::make_shared<G4RootHnRFileManager<histo::h2d>>(
this);
48 fH3RFileManager = std::make_shared<G4RootHnRFileManager<histo::h3d>>(
this);
49 fP1RFileManager = std::make_shared<G4RootHnRFileManager<histo::p1d>>(
this);
50 fP2RFileManager = std::make_shared<G4RootHnRFileManager<histo::p2d>>(
this);
57 for (
auto& mapElement : fRFiles ) {
58 auto rfileTuple = mapElement.second;
59 delete std::get<1>(*rfileTuple);
60 delete std::get<2>(*rfileTuple);;
61 delete std::get<0>(*rfileTuple);
80 auto newFile =
new tools::rroot::file(
G4cout, name);
81 newFile->add_unziper(
'Z',toolx::decompress_buffer);
83 if ( ! newFile->is_open() ) {
84 Warn(
"Cannot open file " + name, fkClass,
"OpenRFile");
89 auto newFileTuple =
new G4RootRFile(newFile,
nullptr,
nullptr);
92 auto it = fRFiles.find(name);
93 if ( it != fRFiles.end() ) {
95 it->second = newFileTuple;
98 fRFiles[name] = newFileTuple;
113 auto it = fRFiles.find(name);
114 if (it != fRFiles.end()) {
std::tuple< tools::rroot::file *, tools::rroot::directory *, tools::rroot::directory * > G4RootRFile
G4GLOB_DLL std::ostream G4cout
G4String GetFullFileName(const G4String &baseFileName="", G4bool isPerThread=true) const
void Message(G4int level, const G4String &action, const G4String &objectType, const G4String &objectName="", G4bool success=true) const
G4RootRFileManager()=delete
virtual G4bool OpenRFile(const G4String &fileName, G4bool isPerThread)
~G4RootRFileManager() override
G4RootRFile * GetRFile(const G4String &fileName, G4bool isPerThread) const
std::shared_ptr< G4VTHnRFileManager< tools::histo::h2d > > fH2RFileManager
std::shared_ptr< G4VTHnRFileManager< tools::histo::p2d > > fP2RFileManager
std::shared_ptr< G4VTHnRFileManager< tools::histo::h3d > > fH3RFileManager
std::shared_ptr< G4VTHnRFileManager< tools::histo::p1d > > fP1RFileManager
std::shared_ptr< G4VTHnRFileManager< tools::histo::h1d > > fH1RFileManager
void Warn(const G4String &message, const std::string_view inClass, const std::string_view inFunction)