39 #include "tools/wroot/to"
40 #include "tools/wroot/file"
80 <<
"G4RootAnalysisManager already exists."
81 <<
"Cannot create another instance.";
82 G4Exception(
"G4RootAnalysisManager::G4RootAnalysisManager()",
116 const std::vector<tools::histo::h1d*>& h1Vector
118 const std::vector<G4HnInformation*>& hnVector
121 if ( ! h1Vector.size() )
return true;
125 for (
G4int i=0; i<
G4int(h1Vector.size()); ++i ) {
131 tools::histo::h1d* h1 = h1Vector[i];
136 tools::wroot::directory* histoDirectory
139 = to(*histoDirectory, *h1, name);
142 description <<
" " <<
"saving histogram " << name <<
" failed";
163 const std::vector<tools::histo::h2d*>& h2Vector
165 const std::vector<G4HnInformation*>& hnVector
168 if ( ! h2Vector.size() )
return true;
172 for (
G4int i=0; i<
G4int(h2Vector.size()); ++i ) {
178 tools::histo::h2d* h2 = h2Vector[i];
183 tools::wroot::directory* histoDirectory
186 = to(*histoDirectory, *h2, name);
189 description <<
" " <<
"saving histogram " << name <<
" failed";
212 G4bool finalResult =
true;
215 finalResult = finalResult && result;
218 finalResult = finalResult && result;
221 finalResult = finalResult && result;
233 G4bool finalResult =
true;
235 finalResult = finalResult && result;
244 finalResult = finalResult && result;
261 G4bool finalResult =
true;
267 <<
" " <<
"No master G4RootAnalysisManager instance exists."
269 <<
" " <<
"Histogram data will not be merged.";
276 finalResult = finalResult && result;
280 finalResult = finalResult && result;
284 finalResult = finalResult && result;
289 finalResult = finalResult && result;
310 description <<
" " <<
"Resetting data failed";
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
static G4RootAnalysisManager * fgMasterInstance
virtual G4bool CloseFile()
G4RootFileManager * fFileManager
std::ostringstream G4ExceptionDescription
G4String GetFullFileName() const
void SetH1Manager(G4VH1Manager *h1Manager)
static G4ThreadLocal G4RootAnalysisManager * fgInstance
virtual G4bool OpenFileImpl(const G4String &fileName)
#define G4MUTEX_INITIALIZER
virtual G4bool WriteFile()
void CreateNtuplesFromBooking()
const G4AnalysisVerbose * GetVerboseL3() const
G4RootNtupleManager * fNtupleManager
G4H2ToolsManager * fH2Manager
const G4AnalysisVerbose * GetVerboseL4() const
G4String GetFileName() const
G4RootAnalysisManager(G4bool isMaster=true)
virtual G4bool WriteImpl()
virtual ~G4RootAnalysisManager()
void SetFileManager(G4VFileManager *fileManager)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
tools::wroot::directory * GetNtupleDirectory() const
void SetH2Manager(G4VH2Manager *h2Manager)
G4H1ToolsManager * fH1Manager
virtual G4bool CloseFileImpl()
static G4RootAnalysisManager * Instance()
G4bool GetIsMaster() const
virtual G4bool OpenFile(const G4String &fileName)
G4bool SetFileName(const G4String &fileName)
tools::wroot::directory * GetHistoDirectory() const
G4AnalysisManagerState fState
G4bool GetIsActivation() const
const G4AnalysisVerbose * GetVerboseL1() const
void SetNtupleManager(G4VNtupleManager *ntupleManager)
void SetNtupleDirectory(tools::wroot::directory *directory)
G4bool WriteAscii(const G4String &fileName)