Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ToolsAnalysisManager Class Reference

#include <G4ToolsAnalysisManager.hh>

+ Inheritance diagram for G4ToolsAnalysisManager:

Public Member Functions

 ~G4ToolsAnalysisManager () override
 
tools::histo::h1d * GetH1 (G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
 
tools::histo::h2d * GetH2 (G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
 
tools::histo::h3d * GetH3 (G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
 
tools::histo::p1d * GetP1 (G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
 
tools::histo::p2d * GetP2 (G4int id, G4bool warn=true, G4bool onlyIfActive=true) const
 
std::vector< tools::histo::h1d * >::iterator BeginH1 ()
 
std::vector< tools::histo::h1d * >::iterator EndH1 ()
 
std::vector< tools::histo::h1d * >::const_iterator BeginConstH1 () const
 
std::vector< tools::histo::h1d * >::const_iterator EndConstH1 () const
 
std::vector< tools::histo::h2d * >::iterator BeginH2 ()
 
std::vector< tools::histo::h2d * >::iterator EndH2 ()
 
std::vector< tools::histo::h2d * >::const_iterator BeginConstH2 () const
 
std::vector< tools::histo::h2d * >::const_iterator EndConstH2 () const
 
std::vector< tools::histo::h3d * >::iterator BeginH3 ()
 
std::vector< tools::histo::h3d * >::iterator EndH3 ()
 
std::vector< tools::histo::h3d * >::const_iterator BeginConstH3 () const
 
std::vector< tools::histo::h3d * >::const_iterator EndConstH3 () const
 
std::vector< tools::histo::p1d * >::iterator BeginP1 ()
 
std::vector< tools::histo::p1d * >::iterator EndP1 ()
 
std::vector< tools::histo::p1d * >::const_iterator BeginConstP1 () const
 
std::vector< tools::histo::p1d * >::const_iterator EndConstP1 () const
 
std::vector< tools::histo::p2d * >::iterator BeginP2 ()
 
std::vector< tools::histo::p2d * >::iterator EndP2 ()
 
std::vector< tools::histo::p2d * >::const_iterator BeginConstP2 () const
 
std::vector< tools::histo::p2d * >::const_iterator EndConstP2 () const
 
- Public Member Functions inherited from G4VAnalysisManager
 G4VAnalysisManager ()=delete
 
G4bool OpenFile (const G4String &fileName="")
 
G4bool Write ()
 
G4bool CloseFile (G4bool reset=true)
 
G4bool Reset ()
 
void Clear ()
 
G4bool Merge (tools::histo::hmpi *hmpi)
 
G4bool Plot ()
 
G4bool IsOpenFile () const
 
void SetDefaultFileType (const G4String &value)
 
G4String GetDefaultFileType () const
 
G4bool SetFileName (const G4String &fileName)
 
G4bool SetHistoDirectoryName (const G4String &dirName)
 
G4bool SetNtupleDirectoryName (const G4String &dirName)
 
void SetCompressionLevel (G4int level)
 
G4String GetFileName () const
 
G4String GetHistoDirectoryName () const
 
G4String GetNtupleDirectoryName () const
 
G4int GetCompressionLevel () const
 
G4int CreateH1 (const G4String &name, const G4String &title, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binSchemeName="linear")
 
G4int CreateH1 (const G4String &name, const G4String &title, const std::vector< G4double > &edges, const G4String &unitName="none", const G4String &fcnName="none")
 
G4int CreateH2 (const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear")
 
G4int CreateH2 (const G4String &name, const G4String &title, const std::vector< G4double > &xedges, const std::vector< G4double > &yedges, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none")
 
G4int CreateH3 (const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4int nzbins, G4double zmin, G4double zmax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear", const G4String &zbinSchemeName="linear")
 
G4int CreateH3 (const G4String &name, const G4String &title, const std::vector< G4double > &xedges, const std::vector< G4double > &yedges, const std::vector< G4double > &zedges, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none")
 
G4bool SetH1 (G4int id, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binSchemeName="linear")
 
G4bool SetH1 (G4int id, const std::vector< G4double > &edges, const G4String &unitName="none", const G4String &fcnName="none")
 
G4bool SetH2 (G4int id, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear")
 
G4bool SetH2 (G4int id, const std::vector< G4double > &xedges, const std::vector< G4double > &yedges, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none")
 
G4bool SetH3 (G4int id, G4int nxbins, G4double xmin, G4double xmax, G4int nzbins, G4double zmin, G4double zmax, G4int nybins, G4double ymin, G4double ymax, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear", const G4String &zbinSchemeName="linear")
 
G4bool SetH3 (G4int id, const std::vector< G4double > &xedges, const std::vector< G4double > &yedges, const std::vector< G4double > &zedges, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none")
 
G4bool ScaleH1 (G4int id, G4double factor)
 
G4bool ScaleH2 (G4int id, G4double factor)
 
G4bool ScaleH3 (G4int id, G4double factor)
 
G4int CreateP1 (const G4String &name, const G4String &title, G4int nbins, G4double xmin, G4double xmax, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinSchemeName="linear")
 
G4int CreateP1 (const G4String &name, const G4String &title, const std::vector< G4double > &edges, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none")
 
G4int CreateP2 (const G4String &name, const G4String &title, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4double zmin=0, G4double zmax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear")
 
G4int CreateP2 (const G4String &name, const G4String &title, const std::vector< G4double > &xedges, const std::vector< G4double > &yedges, G4double zmin=0, G4double zmax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none")
 
G4bool SetP1 (G4int id, G4int nbins, G4double xmin, G4double xmax, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &xbinSchemeName="linear")
 
G4bool SetP1 (G4int id, const std::vector< G4double > &edges, G4double ymin=0, G4double ymax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none")
 
G4bool SetP2 (G4int id, G4int nxbins, G4double xmin, G4double xmax, G4int nybins, G4double ymin, G4double ymax, G4double zmin=0, G4double zmax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none", const G4String &xbinSchemeName="linear", const G4String &ybinSchemeName="linear")
 
G4bool SetP2 (G4int id, const std::vector< G4double > &xedges, const std::vector< G4double > &yedges, G4double zmin=0, G4double zmax=0, const G4String &xunitName="none", const G4String &yunitName="none", const G4String &zunitName="none", const G4String &xfcnName="none", const G4String &yfcnName="none", const G4String &zfcnName="none")
 
G4bool ScaleP1 (G4int id, G4double factor)
 
G4bool ScaleP2 (G4int id, G4double factor)
 
G4int CreateNtuple (const G4String &name, const G4String &title)
 
G4int CreateNtupleIColumn (const G4String &name)
 
G4int CreateNtupleFColumn (const G4String &name)
 
G4int CreateNtupleDColumn (const G4String &name)
 
G4int CreateNtupleSColumn (const G4String &name)
 
G4int CreateNtupleIColumn (const G4String &name, std::vector< int > &vector)
 
G4int CreateNtupleFColumn (const G4String &name, std::vector< float > &vector)
 
G4int CreateNtupleDColumn (const G4String &name, std::vector< double > &vector)
 
G4int CreateNtupleSColumn (const G4String &name, std::vector< std::string > &vector)
 
void FinishNtuple ()
 
G4int CreateNtupleIColumn (G4int ntupleId, const G4String &name)
 
G4int CreateNtupleFColumn (G4int ntupleId, const G4String &name)
 
G4int CreateNtupleDColumn (G4int ntupleId, const G4String &name)
 
G4int CreateNtupleSColumn (G4int ntupleId, const G4String &name)
 
G4int CreateNtupleIColumn (G4int ntupleId, const G4String &name, std::vector< int > &vector)
 
G4int CreateNtupleFColumn (G4int ntupleId, const G4String &name, std::vector< float > &vector)
 
G4int CreateNtupleDColumn (G4int ntupleId, const G4String &name, std::vector< double > &vector)
 
G4int CreateNtupleSColumn (G4int ntupleId, const G4String &name, std::vector< std::string > &vector)
 
void FinishNtuple (G4int ntupleId)
 
virtual void SetNtupleMerging (G4bool mergeNtuples, G4int nofReducedNtupleFiles=0)
 
virtual void SetNtupleRowWise (G4bool rowWise, G4bool rowMode=true)
 
virtual void SetBasketSize (unsigned int basketSize)
 
virtual void SetBasketEntries (unsigned int basketEntries)
 
G4bool SetFirstHistoId (G4int firstId)
 
G4bool SetFirstH1Id (G4int firstId)
 
G4bool SetFirstH2Id (G4int firstId)
 
G4bool SetFirstH3Id (G4int firstId)
 
G4bool SetFirstProfileId (G4int firstId)
 
G4bool SetFirstP1Id (G4int firstId)
 
G4bool SetFirstP2Id (G4int firstId)
 
G4bool SetFirstNtupleId (G4int firstId)
 
G4bool SetFirstNtupleColumnId (G4int firstId)
 
G4bool FillH1 (G4int id, G4double value, G4double weight=1.0)
 
G4bool FillH2 (G4int id, G4double xvalue, G4double yvalue, G4double weight=1.0)
 
G4bool FillH3 (G4int id, G4double xvalue, G4double yvalue, G4double zvalue, G4double weight=1.0)
 
G4bool FillP1 (G4int id, G4double xvalue, G4double yvalue, G4double weight=1.0)
 
G4bool FillP2 (G4int id, G4double xvalue, G4double yvalue, G4double zvalue, G4double weight=1.0)
 
G4bool FillNtupleIColumn (G4int id, G4int value)
 
G4bool FillNtupleFColumn (G4int id, G4float value)
 
G4bool FillNtupleDColumn (G4int id, G4double value)
 
G4bool FillNtupleSColumn (G4int id, const G4String &value)
 
G4bool AddNtupleRow ()
 
G4bool FillNtupleIColumn (G4int ntupleId, G4int columnId, G4int value)
 
G4bool FillNtupleFColumn (G4int ntupleId, G4int columnId, G4float value)
 
G4bool FillNtupleDColumn (G4int ntupleId, G4int columnId, G4double value)
 
G4bool FillNtupleSColumn (G4int ntupleId, G4int id, const G4String &value)
 
G4bool AddNtupleRow (G4int ntupleId)
 
void SetActivation (G4bool activation)
 
G4bool GetActivation () const
 
G4bool IsActive () const
 
G4bool IsAscii () const
 
G4bool IsPlotting () const
 
G4int GetFirstH1Id () const
 
G4int GetFirstH2Id () const
 
G4int GetFirstH3Id () const
 
G4int GetFirstP1Id () const
 
G4int GetFirstP2Id () const
 
G4int GetFirstNtupleId () const
 
G4int GetFirstNtupleColumnId () const
 
G4int GetNofH1s (G4bool onlyIfExist=false) const
 
G4int GetNofH2s (G4bool onlyIfExist=false) const
 
G4int GetNofH3s (G4bool onlyIfExist=false) const
 
G4int GetNofP1s (G4bool onlyIfExist=false) const
 
G4int GetNofP2s (G4bool onlyIfExist=false) const
 
G4int GetNofNtuples (G4bool onlyIfExist=false) const
 
G4int GetH1Id (const G4String &name, G4bool warn=true) const
 
G4int GetH2Id (const G4String &name, G4bool warn=true) const
 
G4int GetH3Id (const G4String &name, G4bool warn=true) const
 
G4int GetP1Id (const G4String &name, G4bool warn=true) const
 
G4int GetP2Id (const G4String &name, G4bool warn=true) const
 
G4bool ListH1 (G4bool onlyIfActive=true) const
 
G4bool ListH2 (G4bool onlyIfActive=true) const
 
G4bool ListH3 (G4bool onlyIfActive=true) const
 
G4bool ListP1 (G4bool onlyIfActive=true) const
 
G4bool ListP2 (G4bool onlyIfActive=true) const
 
G4bool ListNtuple (G4bool onlyIfActive=true) const
 
G4bool List (G4bool onlyIfActive=true) const
 
void SetH1Activation (G4bool activation)
 
void SetH1Activation (G4int id, G4bool activation)
 
void SetH1Ascii (G4int id, G4bool ascii)
 
void SetH1Plotting (G4int id, G4bool plotting)
 
void SetH1FileName (G4int id, const G4String &fileName)
 
void SetH2Activation (G4bool activation)
 
void SetH2Activation (G4int id, G4bool activation)
 
void SetH2Ascii (G4int id, G4bool ascii)
 
void SetH2Plotting (G4int id, G4bool plotting)
 
void SetH2FileName (G4int id, const G4String &fileName)
 
void SetH3Activation (G4bool activation)
 
void SetH3Activation (G4int id, G4bool activation)
 
void SetH3Ascii (G4int id, G4bool ascii)
 
void SetH3Plotting (G4int id, G4bool plotting)
 
void SetH3FileName (G4int id, const G4String &fileName)
 
void SetP1Activation (G4bool activation)
 
void SetP1Activation (G4int id, G4bool activation)
 
void SetP1Ascii (G4int id, G4bool ascii)
 
void SetP1Plotting (G4int id, G4bool plotting)
 
void SetP1FileName (G4int id, const G4String &fileName)
 
void SetP2Activation (G4bool activation)
 
void SetP2Activation (G4int id, G4bool activation)
 
void SetP2Ascii (G4int id, G4bool ascii)
 
void SetP2Plotting (G4int id, G4bool plotting)
 
void SetP2FileName (G4int id, const G4String &fileName)
 
void SetNtupleActivation (G4bool activation)
 
void SetNtupleActivation (G4int id, G4bool activation)
 
void SetNtupleFileName (const G4String &fileName)
 
void SetNtupleFileName (G4int id, const G4String &fileName)
 
G4int GetH1Nbins (G4int id) const
 
G4double GetH1Xmin (G4int id) const
 
G4double GetH1Xmax (G4int id) const
 
G4double GetH1Width (G4int id) const
 
G4int GetH2Nxbins (G4int id) const
 
G4double GetH2Xmin (G4int id) const
 
G4double GetH2Xmax (G4int id) const
 
G4double GetH2XWidth (G4int id) const
 
G4int GetH2Nybins (G4int id) const
 
G4double GetH2Ymin (G4int id) const
 
G4double GetH2Ymax (G4int id) const
 
G4double GetH2YWidth (G4int id) const
 
G4int GetH3Nxbins (G4int id) const
 
G4double GetH3Xmin (G4int id) const
 
G4double GetH3Xmax (G4int id) const
 
G4double GetH3XWidth (G4int id) const
 
G4int GetH3Nybins (G4int id) const
 
G4double GetH3Ymin (G4int id) const
 
G4double GetH3Ymax (G4int id) const
 
G4double GetH3YWidth (G4int id) const
 
G4int GetH3Nzbins (G4int id) const
 
G4double GetH3Zmin (G4int id) const
 
G4double GetH3Zmax (G4int id) const
 
G4double GetH3ZWidth (G4int id) const
 
G4int GetP1Nbins (G4int id) const
 
G4double GetP1Xmin (G4int id) const
 
G4double GetP1Xmax (G4int id) const
 
G4double GetP1XWidth (G4int id) const
 
G4double GetP1Ymin (G4int id) const
 
G4double GetP1Ymax (G4int id) const
 
G4int GetP2Nxbins (G4int id) const
 
G4double GetP2Xmin (G4int id) const
 
G4double GetP2Xmax (G4int id) const
 
G4double GetP2XWidth (G4int id) const
 
G4int GetP2Nybins (G4int id) const
 
G4double GetP2Ymin (G4int id) const
 
G4double GetP2Ymax (G4int id) const
 
G4double GetP2YWidth (G4int id) const
 
G4double GetP2Zmin (G4int id) const
 
G4double GetP2Zmax (G4int id) const
 
G4String GetH1Name (G4int id) const
 
G4double GetH1Unit (G4int id) const
 
G4bool GetH1Activation (G4int id) const
 
G4bool GetH1Ascii (G4int id) const
 
G4bool GetH1Plotting (G4int id) const
 
G4String GetH1FileName (G4int id) const
 
G4String GetH2Name (G4int id) const
 
G4double GetH2XUnit (G4int id) const
 
G4double GetH2YUnit (G4int id) const
 
G4bool GetH2Activation (G4int id) const
 
G4bool GetH2Ascii (G4int id) const
 
G4bool GetH2Plotting (G4int id) const
 
G4String GetH3Name (G4int id) const
 
G4double GetH3XUnit (G4int id) const
 
G4double GetH3YUnit (G4int id) const
 
G4double GetH3ZUnit (G4int id) const
 
G4bool GetH3Activation (G4int id) const
 
G4bool GetH3Ascii (G4int id) const
 
G4bool GetH3Plotting (G4int id) const
 
G4String GetP1Name (G4int id) const
 
G4double GetP1XUnit (G4int id) const
 
G4double GetP1YUnit (G4int id) const
 
G4bool GetP1Activation (G4int id) const
 
G4bool GetP1Ascii (G4int id) const
 
G4bool GetP1Plotting (G4int id) const
 
G4String GetP2Name (G4int id) const
 
G4double GetP2XUnit (G4int id) const
 
G4double GetP2YUnit (G4int id) const
 
G4double GetP2ZUnit (G4int id) const
 
G4bool GetP2Activation (G4int id) const
 
G4bool GetP2Ascii (G4int id) const
 
G4bool GetP2Plotting (G4int id) const
 
G4bool GetNtupleActivation (G4int id) const
 
G4String GetNtupleFileName (G4int id) const
 
G4bool SetH1Title (G4int id, const G4String &title)
 
G4bool SetH1XAxisTitle (G4int id, const G4String &title)
 
G4bool SetH1YAxisTitle (G4int id, const G4String &title)
 
G4bool SetH1XAxisIsLog (G4int id, G4bool isLog)
 
G4bool SetH1YAxisIsLog (G4int id, G4bool isLog)
 
G4bool SetH2Title (G4int id, const G4String &title)
 
G4bool SetH2XAxisTitle (G4int id, const G4String &title)
 
G4bool SetH2YAxisTitle (G4int id, const G4String &title)
 
G4bool SetH2ZAxisTitle (G4int id, const G4String &title)
 
G4bool SetH2XAxisIsLog (G4int id, G4bool isLog)
 
G4bool SetH2YAxisIsLog (G4int id, G4bool isLog)
 
G4bool SetH2ZAxisIsLog (G4int id, G4bool isLog)
 
G4bool SetH3Title (G4int id, const G4String &title)
 
G4bool SetH3XAxisTitle (G4int id, const G4String &title)
 
G4bool SetH3YAxisTitle (G4int id, const G4String &title)
 
G4bool SetH3ZAxisTitle (G4int id, const G4String &title)
 
G4bool SetH3XAxisIsLog (G4int id, G4bool isLog)
 
G4bool SetH3YAxisIsLog (G4int id, G4bool isLog)
 
G4bool SetH3ZAxisIsLog (G4int id, G4bool isLog)
 
G4bool SetP1Title (G4int id, const G4String &title)
 
G4bool SetP1XAxisTitle (G4int id, const G4String &title)
 
G4bool SetP1YAxisTitle (G4int id, const G4String &title)
 
G4bool SetP1XAxisIsLog (G4int id, G4bool isLog)
 
G4bool SetP1YAxisIsLog (G4int id, G4bool isLog)
 
G4bool SetP2Title (G4int id, const G4String &title)
 
G4bool SetP2XAxisTitle (G4int id, const G4String &title)
 
G4bool SetP2YAxisTitle (G4int id, const G4String &title)
 
G4bool SetP2ZAxisTitle (G4int id, const G4String &title)
 
G4bool SetP2XAxisIsLog (G4int id, G4bool isLog)
 
G4bool SetP2YAxisIsLog (G4int id, G4bool isLog)
 
G4bool SetP2ZAxisIsLog (G4int id, G4bool isLog)
 
G4String GetH1Title (G4int id) const
 
G4String GetH1XAxisTitle (G4int id) const
 
G4String GetH1YAxisTitle (G4int id) const
 
G4bool GetH1XAxisIsLog (G4int id) const
 
G4bool GetH1YAxisIsLog (G4int id) const
 
G4String GetH2Title (G4int id) const
 
G4String GetH2XAxisTitle (G4int id) const
 
G4String GetH2YAxisTitle (G4int id) const
 
G4String GetH2ZAxisTitle (G4int id) const
 
G4bool GetH2XAxisIsLog (G4int id) const
 
G4bool GetH2YAxisIsLog (G4int id) const
 
G4bool GetH2ZAxisIsLog (G4int id) const
 
G4String GetH3Title (G4int id) const
 
G4String GetH3XAxisTitle (G4int id) const
 
G4String GetH3YAxisTitle (G4int id) const
 
G4String GetH3ZAxisTitle (G4int id) const
 
G4bool GetH3XAxisIsLog (G4int id) const
 
G4bool GetH3YAxisIsLog (G4int id) const
 
G4bool GetH3ZAxisIsLog (G4int id) const
 
G4String GetP1Title (G4int id) const
 
G4String GetP1XAxisTitle (G4int id) const
 
G4String GetP1YAxisTitle (G4int id) const
 
G4bool GetP1XAxisIsLog (G4int id) const
 
G4bool GetP1YAxisIsLog (G4int id) const
 
G4String GetP2Title (G4int id) const
 
G4String GetP2XAxisTitle (G4int id) const
 
G4String GetP2YAxisTitle (G4int id) const
 
G4String GetP2ZAxisTitle (G4int id) const
 
G4bool GetP2XAxisIsLog (G4int id) const
 
G4bool GetP2YAxisIsLog (G4int id) const
 
G4bool GetP2ZAxisIsLog (G4int id) const
 
G4bool DeleteH1 (G4int id, G4bool keepSetting=false)
 
G4bool DeleteH2 (G4int id, G4bool keepSetting=false)
 
G4bool DeleteH3 (G4int id, G4bool keepSetting=false)
 
G4bool DeleteP1 (G4int id, G4bool keepSetting=false)
 
G4bool DeleteP2 (G4int id, G4bool keepSetting=false)
 
G4bool DeleteNtuple (G4int id, G4bool clear=false)
 
void SetVerboseLevel (G4int verboseLevel)
 
G4int GetVerboseLevel () const
 
G4String GetType () const
 
G4String GetFileType () const
 

Static Public Member Functions

static G4ToolsAnalysisManagerInstance ()
 
static G4bool IsInstance ()
 

Protected Member Functions

 G4ToolsAnalysisManager (const G4String &type)
 
G4bool OpenFileImpl (const G4String &fileName) override
 
G4bool WriteImpl () override
 
G4bool CloseFileImpl (G4bool reset) override
 
G4bool ResetImpl () override
 
void ClearImpl () override
 
G4bool PlotImpl () final
 
G4bool MergeImpl (tools::histo::hmpi *hmpi) final
 
G4bool IsOpenFileImpl () const final
 
G4bool IsEmpty ()
 
- Protected Member Functions inherited from G4VAnalysisManager
 G4VAnalysisManager (const G4String &type)
 
virtual ~G4VAnalysisManager ()
 
virtual void SetDefaultFileTypeImpl (const G4String &value)
 
virtual G4String GetDefaultFileTypeImpl () const
 
void Message (G4int level, const G4String &action, const G4String &objectType, const G4String &objectName="", G4bool success=true) const
 
void SetH1Manager (G4VTBaseHnManager< kDim1 > *h1Manager)
 
void SetH2Manager (G4VTBaseHnManager< kDim2 > *h2Manager)
 
void SetH3Manager (G4VTBaseHnManager< kDim3 > *h3Manager)
 
void SetP1Manager (G4VTBaseHnManager< kDim2 > *p1Manager)
 
void SetP2Manager (G4VTBaseHnManager< kDim3 > *p2Manager)
 
void SetNtupleManager (std::shared_ptr< G4VNtupleManager > ntupleManager)
 
void SetNtupleFileManager (std::shared_ptr< G4VNtupleFileManager > ntupleFileManager)
 
void SetFileManager (std::shared_ptr< G4VFileManager > fileManager)
 
G4bool WriteAscii (const G4String &fileName)
 
virtual std::shared_ptr< G4VFileManagerGetFileManager (const G4String &fileName)
 

Protected Attributes

G4THnToolsManager< kDim1, tools::histo::h1d > * fH1Manager { nullptr }
 
G4THnToolsManager< kDim2, tools::histo::h2d > * fH2Manager { nullptr }
 
G4THnToolsManager< kDim3, tools::histo::h3d > * fH3Manager { nullptr }
 
G4THnToolsManager< kDim2, tools::histo::p1d > * fP1Manager { nullptr }
 
G4THnToolsManager< kDim3, tools::histo::p2d > * fP2Manager { nullptr }
 
- Protected Attributes inherited from G4VAnalysisManager
G4AnalysisManagerState fState
 
std::shared_ptr< G4VFileManagerfVFileManager { nullptr }
 
std::shared_ptr< G4NtupleBookingManagerfNtupleBookingManager { nullptr }
 
std::shared_ptr< G4VNtupleManagerfVNtupleManager { nullptr }
 
std::shared_ptr< G4VNtupleFileManagerfVNtupleFileManager { nullptr }
 

Static Protected Attributes

static G4ToolsAnalysisManagerfgMasterToolsInstance { nullptr }
 
static G4ThreadLocal G4ToolsAnalysisManagerfgToolsInstance { nullptr }
 
static constexpr std::string_view fkClass { "G4ToolsAnalysisManager" }
 

Friends

class G4ToolsAnalysisMessenger
 

Detailed Description

Definition at line 61 of file G4ToolsAnalysisManager.hh.

Constructor & Destructor Documentation

◆ ~G4ToolsAnalysisManager()

G4ToolsAnalysisManager::~G4ToolsAnalysisManager ( )
override

Definition at line 84 of file G4ToolsAnalysisManager.cc.

85{
86 if ( fState.GetIsMaster() ) fgMasterToolsInstance = nullptr;
87 fgToolsInstance = nullptr;
88}
static G4ThreadLocal G4ToolsAnalysisManager * fgToolsInstance
static G4ToolsAnalysisManager * fgMasterToolsInstance
G4AnalysisManagerState fState

◆ G4ToolsAnalysisManager()

G4ToolsAnalysisManager::G4ToolsAnalysisManager ( const G4String & type)
explicitprotected

Definition at line 57 of file G4ToolsAnalysisManager.cc.

58 : G4VAnalysisManager(type)
59{
60 // Set instance pointer
62 fgToolsInstance = this;
63
64 // Create managers
70 // The managers will be deleted by the base class
71
72 // Set managers to base class which takes then their ownership
78
79 // Plot manager
80 fPlotManager = std::make_unique<G4PlotManager>(fState);
81}
G4THnToolsManager< kDim2, tools::histo::h2d > * fH2Manager
G4THnToolsManager< kDim3, tools::histo::p2d > * fP2Manager
G4THnToolsManager< kDim2, tools::histo::p1d > * fP1Manager
G4THnToolsManager< kDim3, tools::histo::h3d > * fH3Manager
G4THnToolsManager< kDim1, tools::histo::h1d > * fH1Manager
void SetP1Manager(G4VTBaseHnManager< kDim2 > *p1Manager)
void SetP2Manager(G4VTBaseHnManager< kDim3 > *p2Manager)
G4VAnalysisManager()=delete
void SetH1Manager(G4VTBaseHnManager< kDim1 > *h1Manager)
void SetH3Manager(G4VTBaseHnManager< kDim3 > *h3Manager)
void SetH2Manager(G4VTBaseHnManager< kDim2 > *h2Manager)
G4bool IsWorkerThread()

Member Function Documentation

◆ BeginConstH1()

std::vector< tools::histo::h1d * >::const_iterator G4ToolsAnalysisManager::BeginConstH1 ( ) const

◆ BeginConstH2()

std::vector< tools::histo::h2d * >::const_iterator G4ToolsAnalysisManager::BeginConstH2 ( ) const

◆ BeginConstH3()

std::vector< tools::histo::h3d * >::const_iterator G4ToolsAnalysisManager::BeginConstH3 ( ) const

◆ BeginConstP1()

std::vector< tools::histo::p1d * >::const_iterator G4ToolsAnalysisManager::BeginConstP1 ( ) const

◆ BeginConstP2()

std::vector< tools::histo::p2d * >::const_iterator G4ToolsAnalysisManager::BeginConstP2 ( ) const

◆ BeginH1()

std::vector< tools::histo::h1d * >::iterator G4ToolsAnalysisManager::BeginH1 ( )

◆ BeginH2()

std::vector< tools::histo::h2d * >::iterator G4ToolsAnalysisManager::BeginH2 ( )

◆ BeginH3()

std::vector< tools::histo::h3d * >::iterator G4ToolsAnalysisManager::BeginH3 ( )

◆ BeginP1()

std::vector< tools::histo::p1d * >::iterator G4ToolsAnalysisManager::BeginP1 ( )

◆ BeginP2()

std::vector< tools::histo::p2d * >::iterator G4ToolsAnalysisManager::BeginP2 ( )

◆ ClearImpl()

void G4ToolsAnalysisManager::ClearImpl ( )
overrideprotectedvirtual

Implements G4VAnalysisManager.

Definition at line 277 of file G4ToolsAnalysisManager.cc.

278{
279// Reset histograms and profiles
280
286}
void ClearData()

◆ CloseFileImpl()

G4bool G4ToolsAnalysisManager::CloseFileImpl ( G4bool reset)
overrideprotectedvirtual

Implements G4VAnalysisManager.

Definition at line 221 of file G4ToolsAnalysisManager.cc.

222{
223 Message(kVL4, "close", "files");
224
225 auto result = true;
227 result &= fVNtupleFileManager->ActionAtCloseFile();
228 }
229
230 // close file
231 if ( (fVNtupleFileManager == nullptr) ||
232 (fVNtupleFileManager->GetMergeMode() != G4NtupleMergeMode::kSlave) ) {
233 if ( ! fVFileManager->CloseFiles() ) {
234 Warn("Closing files failed", fkClass, "CloseFileImpl");
235 result = false;
236 }
237 }
238
239 // delete empty files
240 if ( ! fVFileManager->DeleteEmptyFiles() ) {
241 Warn("Deleting empty files failed", fkClass, "CloseFileImpl");
242 result = false;
243 }
244
245 // reset histograms
246 if ( reset ) {
247 if ( ! Reset() ) {
248 Warn("Resetting data failed", fkClass, "CloseFileImpl");
249 result = false;
250 }
251 }
252
253 Message(kVL3, "close", "files", "", result);
254
255 return result;
256}
static constexpr std::string_view fkClass
std::shared_ptr< G4VNtupleFileManager > fVNtupleFileManager
void Message(G4int level, const G4String &action, const G4String &objectType, const G4String &objectName="", G4bool success=true) const
std::shared_ptr< G4VFileManager > fVFileManager
constexpr G4int kVL3
constexpr G4int kVL4
void Warn(const G4String &message, const std::string_view inClass, const std::string_view inFunction)

Referenced by G4Hdf5AnalysisManager::CloseFileImpl().

◆ EndConstH1()

std::vector< tools::histo::h1d * >::const_iterator G4ToolsAnalysisManager::EndConstH1 ( ) const

◆ EndConstH2()

std::vector< tools::histo::h2d * >::const_iterator G4ToolsAnalysisManager::EndConstH2 ( ) const

◆ EndConstH3()

std::vector< tools::histo::h3d * >::const_iterator G4ToolsAnalysisManager::EndConstH3 ( ) const

◆ EndConstP1()

std::vector< tools::histo::p1d * >::const_iterator G4ToolsAnalysisManager::EndConstP1 ( ) const

◆ EndConstP2()

std::vector< tools::histo::p2d * >::const_iterator G4ToolsAnalysisManager::EndConstP2 ( ) const

◆ EndH1()

std::vector< tools::histo::h1d * >::iterator G4ToolsAnalysisManager::EndH1 ( )

◆ EndH2()

std::vector< tools::histo::h2d * >::iterator G4ToolsAnalysisManager::EndH2 ( )

◆ EndH3()

std::vector< tools::histo::h3d * >::iterator G4ToolsAnalysisManager::EndH3 ( )

◆ EndP1()

std::vector< tools::histo::p1d * >::iterator G4ToolsAnalysisManager::EndP1 ( )

◆ EndP2()

std::vector< tools::histo::p2d * >::iterator G4ToolsAnalysisManager::EndP2 ( )

◆ GetH1()

tools::histo::h1d * G4ToolsAnalysisManager::GetH1 ( G4int id,
G4bool warn = true,
G4bool onlyIfActive = true ) const

◆ GetH2()

tools::histo::h2d * G4ToolsAnalysisManager::GetH2 ( G4int id,
G4bool warn = true,
G4bool onlyIfActive = true ) const

◆ GetH3()

tools::histo::h3d * G4ToolsAnalysisManager::GetH3 ( G4int id,
G4bool warn = true,
G4bool onlyIfActive = true ) const

◆ GetP1()

tools::histo::p1d * G4ToolsAnalysisManager::GetP1 ( G4int id,
G4bool warn = true,
G4bool onlyIfActive = true ) const

◆ GetP2()

tools::histo::p2d * G4ToolsAnalysisManager::GetP2 ( G4int id,
G4bool warn = true,
G4bool onlyIfActive = true ) const

◆ Instance()

G4ToolsAnalysisManager * G4ToolsAnalysisManager::Instance ( )
static

Definition at line 45 of file G4ToolsAnalysisManager.cc.

46{
47 return fgToolsInstance;
48}

◆ IsEmpty()

G4bool G4ToolsAnalysisManager::IsEmpty ( )
protected

Definition at line 357 of file G4ToolsAnalysisManager.cc.

358{
359 return fH1Manager->IsEmpty() && fH2Manager->IsEmpty() && fH3Manager->IsEmpty() &&
361}
G4bool IsEmpty() const

◆ IsInstance()

G4bool G4ToolsAnalysisManager::IsInstance ( )
static

Definition at line 51 of file G4ToolsAnalysisManager.cc.

52{
53 return ( fgToolsInstance != nullptr );
54}

◆ IsOpenFileImpl()

G4bool G4ToolsAnalysisManager::IsOpenFileImpl ( ) const
finalprotectedvirtual

Implements G4VAnalysisManager.

◆ MergeImpl()

G4bool G4ToolsAnalysisManager::MergeImpl ( tools::histo::hmpi * hmpi)
finalprotectedvirtual

Implements G4VAnalysisManager.

Definition at line 325 of file G4ToolsAnalysisManager.cc.

326{
327
328 // if ( G4Threading::IsWorkerThread() ) return true;
329
330 if (hmpi == nullptr) return false;
331
332 auto result = true;
333
334 // Create MPI manager
335 G4MPIToolsManager mpiToolsManager(fState, hmpi);
336
337 // H1
338 result &= mpiToolsManager.Merge<tools::histo::h1d>(fH1Manager->GetTHnVectorRef());
339
340 // H2
341 result &= mpiToolsManager.Merge<tools::histo::h2d>(fH2Manager->GetTHnVectorRef());
342
343 // H3
344 result &= mpiToolsManager.Merge<tools::histo::h3d>(fH3Manager->GetTHnVectorRef());
345
346 // P1
347 result &= mpiToolsManager.Merge<tools::histo::p1d>(fP1Manager->GetTHnVectorRef());
348
349 // P2
350 result &= mpiToolsManager.Merge<tools::histo::p2d>(fP2Manager->GetTHnVectorRef());
351
352 return result;
353}
const std::vector< std::pair< HT *, G4HnInformation * > > & GetTHnVectorRef() const

◆ OpenFileImpl()

G4bool G4ToolsAnalysisManager::OpenFileImpl ( const G4String & fileName)
overrideprotectedvirtual

Implements G4VAnalysisManager.

Definition at line 163 of file G4ToolsAnalysisManager.cc.

164{
165 // Create ntuple manager(s)
166 // and set it to base class which takes then their ownership
167 SetNtupleManager(fVNtupleFileManager->CreateNtupleManager());
168
169 auto result = true;
170
171 // Open file
172 if ( fVNtupleFileManager->GetMergeMode() != G4NtupleMergeMode::kSlave ) {
173 result &= fVFileManager->OpenFile(fileName);
174 }
175
176 // Open ntuple files and create ntuples from bookings
177 result &= fVNtupleFileManager->ActionAtOpenFile(fVFileManager->GetFullFileName());
178
179 return result;
180}
void SetNtupleManager(std::shared_ptr< G4VNtupleManager > ntupleManager)

Referenced by G4GenericAnalysisManager::OpenFileImpl(), and G4Hdf5AnalysisManager::OpenFileImpl().

◆ PlotImpl()

G4bool G4ToolsAnalysisManager::PlotImpl ( )
finalprotectedvirtual

Implements G4VAnalysisManager.

Definition at line 289 of file G4ToolsAnalysisManager.cc.

290{
291
292 // Only master thread performs plotting
293 if ( G4Threading::IsWorkerThread() ) return true;
294
295 auto result = true;
296
297 // Open output file
298 fPlotManager->OpenFile(fVFileManager->GetPlotFileName());
299
300 // H1
301 result
302 &= fPlotManager->PlotAndWrite<tools::histo::h1d>(fH1Manager->GetTHnVectorRef());
303
304 // H2
305 result
306 &= fPlotManager->PlotAndWrite<tools::histo::h2d>(fH2Manager->GetTHnVectorRef());
307
308 // H3
309 // not yet available in tools
310
311 // P1
312 result
313 &= fPlotManager->PlotAndWrite<tools::histo::p1d>(fP1Manager->GetTHnVectorRef());
314
315 // P2
316 // not yet available in tools
317
318 // Close output file
319 result &= fPlotManager->CloseFile();
320
321 return result;
322}

◆ ResetImpl()

G4bool G4ToolsAnalysisManager::ResetImpl ( )
overrideprotectedvirtual

Implements G4VAnalysisManager.

Definition at line 259 of file G4ToolsAnalysisManager.cc.

260{
261// Reset histograms and ntuple
262
263 Message(kVL4, "reset", "");
264
265 auto result = true;
266 result &= ResetHns();
267 if ( fVNtupleFileManager != nullptr ) {
268 result &= fVNtupleFileManager->Reset();
269 }
270
271 Message(kVL3, "reset", "", "", result);
272
273 return result;
274}

◆ WriteImpl()

G4bool G4ToolsAnalysisManager::WriteImpl ( )
overrideprotectedvirtual

Implements G4VAnalysisManager.

Definition at line 183 of file G4ToolsAnalysisManager.cc.

184{
185 Message(kVL4, "write", "files");
186
187 auto result = true;
189 result &= MergeHns();
190 }
191 else {
192 // Open all files registered with objects
193 fVFileManager->OpenFiles();
194
195 // Write all histograms/profile on master
196 result &= WriteHns();
197 }
198
199 // Ntuples
201 result &= fVNtupleFileManager->ActionAtWrite();
202 }
203
204 // Files
205 if ( (fVNtupleFileManager == nullptr) ||
206 (fVNtupleFileManager->GetMergeMode() != G4NtupleMergeMode::kSlave) ) {
207 result &= fVFileManager->WriteFiles();
208 }
209
210 // Write ASCII if activated
211 if ( IsAscii() ) {
212 result &= WriteAscii(fVFileManager->GetFileName());
213 }
214
215 Message(kVL3, "write", "files", "", result);
216
217 return result;
218}
G4bool WriteAscii(const G4String &fileName)

Friends And Related Symbol Documentation

◆ G4ToolsAnalysisMessenger

friend class G4ToolsAnalysisMessenger
friend

Definition at line 63 of file G4ToolsAnalysisManager.hh.

Member Data Documentation

◆ fgMasterToolsInstance

G4ToolsAnalysisManager* G4ToolsAnalysisManager::fgMasterToolsInstance { nullptr }
inlinestaticprotected

Definition at line 127 of file G4ToolsAnalysisManager.hh.

127{ nullptr };

Referenced by G4ToolsAnalysisManager(), and ~G4ToolsAnalysisManager().

◆ fgToolsInstance

G4ThreadLocal G4ToolsAnalysisManager* G4ToolsAnalysisManager::fgToolsInstance { nullptr }
inlinestaticprotected

Definition at line 128 of file G4ToolsAnalysisManager.hh.

128{ nullptr };

Referenced by G4ToolsAnalysisManager(), Instance(), IsInstance(), and ~G4ToolsAnalysisManager().

◆ fH1Manager

G4THnToolsManager<kDim1, tools::histo::h1d>* G4ToolsAnalysisManager::fH1Manager { nullptr }
protected

Definition at line 132 of file G4ToolsAnalysisManager.hh.

132{ nullptr };

Referenced by ClearImpl(), G4ToolsAnalysisManager(), IsEmpty(), MergeImpl(), and PlotImpl().

◆ fH2Manager

G4THnToolsManager<kDim2, tools::histo::h2d>* G4ToolsAnalysisManager::fH2Manager { nullptr }
protected

Definition at line 133 of file G4ToolsAnalysisManager.hh.

133{ nullptr };

Referenced by ClearImpl(), G4ToolsAnalysisManager(), IsEmpty(), MergeImpl(), and PlotImpl().

◆ fH3Manager

G4THnToolsManager<kDim3, tools::histo::h3d>* G4ToolsAnalysisManager::fH3Manager { nullptr }
protected

Definition at line 134 of file G4ToolsAnalysisManager.hh.

134{ nullptr };

Referenced by ClearImpl(), G4ToolsAnalysisManager(), IsEmpty(), and MergeImpl().

◆ fkClass

std::string_view G4ToolsAnalysisManager::fkClass { "G4ToolsAnalysisManager" }
staticconstexprprotected

Definition at line 129 of file G4ToolsAnalysisManager.hh.

129{ "G4ToolsAnalysisManager" };

Referenced by CloseFileImpl().

◆ fP1Manager

G4THnToolsManager<kDim2, tools::histo::p1d>* G4ToolsAnalysisManager::fP1Manager { nullptr }
protected

Definition at line 135 of file G4ToolsAnalysisManager.hh.

135{ nullptr };

Referenced by ClearImpl(), G4ToolsAnalysisManager(), IsEmpty(), MergeImpl(), and PlotImpl().

◆ fP2Manager

G4THnToolsManager<kDim3, tools::histo::p2d>* G4ToolsAnalysisManager::fP2Manager { nullptr }
protected

Definition at line 136 of file G4ToolsAnalysisManager.hh.

136{ nullptr };

Referenced by ClearImpl(), G4ToolsAnalysisManager(), IsEmpty(), and MergeImpl().


The documentation for this class was generated from the following files: