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

#include <G4ToolsAnalysisReader.hh>

+ Inheritance diagram for G4ToolsAnalysisReader:

Public Member Functions

 ~G4ToolsAnalysisReader () override=default
 
tools::histo::h1d * GetH1 (G4int id, G4bool warn=true) const
 
tools::histo::h2d * GetH2 (G4int id, G4bool warn=true) const
 
tools::histo::h3d * GetH3 (G4int id, G4bool warn=true) const
 
tools::histo::p1d * GetP1 (G4int id, G4bool warn=true) const
 
tools::histo::p2d * GetP2 (G4int id, G4bool warn=true) const
 
- Public Member Functions inherited from G4VAnalysisReader
virtual ~G4VAnalysisReader ()
 
G4bool CloseFiles (G4bool reset=true)
 
void SetFileName (const G4String &fileName)
 
G4String GetFileName () const
 
G4int ReadH1 (const G4String &h1Name, const G4String &fileName="", const G4String &dirName="")
 
G4int ReadH2 (const G4String &h2Name, const G4String &fileName="", const G4String &dirName="")
 
G4int ReadH3 (const G4String &h3Name, const G4String &fileName="", const G4String &dirName="")
 
G4int ReadP1 (const G4String &h1Name, const G4String &fileName="", const G4String &dirName="")
 
G4int ReadP2 (const G4String &h2Name, const G4String &fileName="", const G4String &dirName="")
 
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)
 
G4int GetNtuple (const G4String &ntupleName, const G4String &fileName="", const G4String &dirName="")
 
G4bool SetNtupleIColumn (const G4String &columnName, G4int &value)
 
G4bool SetNtupleFColumn (const G4String &columnName, G4float &value)
 
G4bool SetNtupleDColumn (const G4String &columnName, G4double &value)
 
G4bool SetNtupleSColumn (const G4String &columnName, G4String &value)
 
G4bool SetNtupleIColumn (const G4String &columnName, std::vector< int > &vector)
 
G4bool SetNtupleFColumn (const G4String &columnName, std::vector< float > &vector)
 
G4bool SetNtupleDColumn (const G4String &columnName, std::vector< double > &vector)
 
G4bool SetNtupleSColumn (const G4String &columnName, std::vector< std::string > &vector)
 
G4bool SetNtupleIColumn (G4int ntupleId, const G4String &columnName, G4int &value)
 
G4bool SetNtupleFColumn (G4int ntupleId, const G4String &columnName, G4float &value)
 
G4bool SetNtupleDColumn (G4int ntupleId, const G4String &columnName, G4double &value)
 
G4bool SetNtupleSColumn (G4int ntupleId, const G4String &columnName, G4String &value)
 
G4bool SetNtupleIColumn (G4int ntupleId, const G4String &columnName, std::vector< int > &vector)
 
G4bool SetNtupleFColumn (G4int ntupleId, const G4String &columnName, std::vector< float > &vector)
 
G4bool SetNtupleDColumn (G4int ntupleId, const G4String &columnName, std::vector< double > &vector)
 
G4bool SetNtupleSColumn (G4int ntupleId, const G4String &columnName, std::vector< std::string > &vector)
 
G4bool GetNtupleRow ()
 
G4bool GetNtupleRow (G4int ntupleId)
 
G4bool IsAscii () 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 () 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
 
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 GetH1Title (G4int id) const
 
G4String GetH1XAxisTitle (G4int id) const
 
G4String GetH1YAxisTitle (G4int id) const
 
G4String GetH2Title (G4int id) const
 
G4String GetH2XAxisTitle (G4int id) const
 
G4String GetH2YAxisTitle (G4int id) const
 
G4String GetH2ZAxisTitle (G4int id) const
 
G4String GetH3Title (G4int id) const
 
G4String GetH3XAxisTitle (G4int id) const
 
G4String GetH3YAxisTitle (G4int id) const
 
G4String GetH3ZAxisTitle (G4int id) const
 
G4String GetP1Title (G4int id) const
 
G4String GetP1XAxisTitle (G4int id) const
 
G4String GetP1YAxisTitle (G4int id) const
 
G4String GetP1ZAxisTitle (G4int id) const
 
G4String GetP2Title (G4int id) const
 
G4String GetP2XAxisTitle (G4int id) const
 
G4String GetP2YAxisTitle (G4int id) const
 
G4String GetP2ZAxisTitle (G4int id) const
 
void SetVerboseLevel (G4int verboseLevel)
 
G4int GetVerboseLevel () const
 
G4String GetType () const
 
G4String GetFileType () const
 

Protected Member Functions

 G4ToolsAnalysisReader (const G4String &type)
 
G4int ReadH1Impl (const G4String &h1Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
 
G4int ReadH2Impl (const G4String &h2Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
 
G4int ReadH3Impl (const G4String &h3Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
 
G4int ReadP1Impl (const G4String &p1Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
 
G4int ReadP2Impl (const G4String &p2Name, const G4String &fileName, const G4String &dirName, G4bool isUserFileName) final
 
template<typename HT >
G4int ReadTImpl (const G4String &htName, const G4String &fileName, const G4String &dirName, G4bool isUserFileName, G4THnManager< HT > *htManager)
 
G4bool Reset ()
 
- Protected Member Functions inherited from G4VAnalysisReader
 G4VAnalysisReader (const G4String &type)
 
virtual G4bool CloseFilesImpl (G4bool reset)=0
 
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< G4VRNtupleManager > ntupleManager)
 
void SetFileManager (std::shared_ptr< G4VRFileManager > fileManager)
 

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 G4VAnalysisReader
G4AnalysisManagerState fState
 
std::shared_ptr< G4VRFileManagerfVFileManager { nullptr }
 

Static Protected Attributes

static constexpr std::string_view fkClass { "G4ToolsAnalysisReader" }
 

Detailed Description

Definition at line 53 of file G4ToolsAnalysisReader.hh.

Constructor & Destructor Documentation

◆ ~G4ToolsAnalysisReader()

G4ToolsAnalysisReader::~G4ToolsAnalysisReader ( )
overridedefault

◆ G4ToolsAnalysisReader()

G4ToolsAnalysisReader::G4ToolsAnalysisReader ( const G4String & type)
explicitprotected

Definition at line 32 of file G4ToolsAnalysisReader.cc.

33 : G4VAnalysisReader(type)
34{
35 // Create managers
41 // The managers will be deleted by the base class
42
43 // Set managers to base class which takes then their ownership
49}
G4THnToolsManager< kDim1, tools::histo::h1d > * fH1Manager
G4THnToolsManager< kDim3, tools::histo::h3d > * fH3Manager
G4THnToolsManager< kDim2, tools::histo::h2d > * fH2Manager
G4THnToolsManager< kDim3, tools::histo::p2d > * fP2Manager
G4THnToolsManager< kDim2, tools::histo::p1d > * fP1Manager
void SetH2Manager(G4VTBaseHnManager< kDim2 > *h2Manager)
G4VAnalysisReader(const G4String &type)
void SetH1Manager(G4VTBaseHnManager< kDim1 > *h1Manager)
G4AnalysisManagerState fState
void SetH3Manager(G4VTBaseHnManager< kDim3 > *h3Manager)
void SetP1Manager(G4VTBaseHnManager< kDim2 > *p1Manager)
void SetP2Manager(G4VTBaseHnManager< kDim3 > *p2Manager)

Member Function Documentation

◆ GetH1()

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

◆ GetH2()

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

◆ GetH3()

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

◆ GetP1()

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

◆ GetP2()

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

◆ ReadH1Impl()

G4int G4ToolsAnalysisReader::ReadH1Impl ( const G4String & h1Name,
const G4String & fileName,
const G4String & dirName,
G4bool isUserFileName )
finalprotectedvirtual

Implements G4VAnalysisReader.

Definition at line 56 of file G4ToolsAnalysisReader.cc.

60{
62 h1Name, fileName, dirName, isUserFileName, fH1Manager);
63}
G4int ReadTImpl(const G4String &htName, const G4String &fileName, const G4String &dirName, G4bool isUserFileName, G4THnManager< HT > *htManager)

◆ ReadH2Impl()

G4int G4ToolsAnalysisReader::ReadH2Impl ( const G4String & h2Name,
const G4String & fileName,
const G4String & dirName,
G4bool isUserFileName )
finalprotectedvirtual

Implements G4VAnalysisReader.

Definition at line 66 of file G4ToolsAnalysisReader.cc.

70{
72 h2Name, fileName, dirName, isUserFileName, fH2Manager);
73}

◆ ReadH3Impl()

G4int G4ToolsAnalysisReader::ReadH3Impl ( const G4String & h3Name,
const G4String & fileName,
const G4String & dirName,
G4bool isUserFileName )
finalprotectedvirtual

Implements G4VAnalysisReader.

Definition at line 76 of file G4ToolsAnalysisReader.cc.

80{
82 h3Name, fileName, dirName, isUserFileName, fH3Manager);
83}

◆ ReadP1Impl()

G4int G4ToolsAnalysisReader::ReadP1Impl ( const G4String & p1Name,
const G4String & fileName,
const G4String & dirName,
G4bool isUserFileName )
finalprotectedvirtual

Implements G4VAnalysisReader.

Definition at line 86 of file G4ToolsAnalysisReader.cc.

90{
92 p1Name, fileName, dirName, isUserFileName, fP1Manager);
93}

◆ ReadP2Impl()

G4int G4ToolsAnalysisReader::ReadP2Impl ( const G4String & p2Name,
const G4String & fileName,
const G4String & dirName,
G4bool isUserFileName )
finalprotectedvirtual

Implements G4VAnalysisReader.

Definition at line 96 of file G4ToolsAnalysisReader.cc.

100{
102 p2Name, fileName, dirName, isUserFileName, fP2Manager);
103}

◆ ReadTImpl()

template<typename HT >
G4int G4ToolsAnalysisReader::ReadTImpl ( const G4String & htName,
const G4String & fileName,
const G4String & dirName,
G4bool isUserFileName,
G4THnManager< HT > * htManager )
protected

◆ Reset()

G4bool G4ToolsAnalysisReader::Reset ( )
protected

Definition at line 106 of file G4ToolsAnalysisReader.cc.

107{
108// Reset histograms and profiles
109
110 auto result = true;
111
112 result &= fH1Manager->Reset();
113 result &= fH2Manager->Reset();
114 result &= fH3Manager->Reset();
115 result &= fP1Manager->Reset();
116 result &= fP2Manager->Reset();
117
118 return result;
119}
G4bool Reset()

Member Data Documentation

◆ fH1Manager

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

Definition at line 93 of file G4ToolsAnalysisReader.hh.

93{ nullptr };

Referenced by G4ToolsAnalysisReader(), ReadH1Impl(), and Reset().

◆ fH2Manager

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

Definition at line 94 of file G4ToolsAnalysisReader.hh.

94{ nullptr };

Referenced by G4ToolsAnalysisReader(), ReadH2Impl(), and Reset().

◆ fH3Manager

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

Definition at line 95 of file G4ToolsAnalysisReader.hh.

95{ nullptr };

Referenced by G4ToolsAnalysisReader(), ReadH3Impl(), and Reset().

◆ fkClass

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

Definition at line 90 of file G4ToolsAnalysisReader.hh.

90{ "G4ToolsAnalysisReader" };

◆ fP1Manager

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

Definition at line 96 of file G4ToolsAnalysisReader.hh.

96{ nullptr };

Referenced by G4ToolsAnalysisReader(), ReadP1Impl(), and Reset().

◆ fP2Manager

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

Definition at line 97 of file G4ToolsAnalysisReader.hh.

97{ nullptr };

Referenced by G4ToolsAnalysisReader(), ReadP2Impl(), and Reset().


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