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

#include <G4XmlRNtupleManager.hh>

+ Inheritance diagram for G4XmlRNtupleManager:

Public Member Functions

 G4XmlRNtupleManager (const G4AnalysisManagerState &state)
 
 G4XmlRNtupleManager ()=delete
 
 ~G4XmlRNtupleManager () override=default
 
- Public Member Functions inherited from G4TRNtupleManager< tools::aida::ntuple >
 G4TRNtupleManager ()=delete
 
- Public Member Functions inherited from G4BaseRNtupleManager
 G4BaseRNtupleManager (const G4AnalysisManagerState &state)
 
 ~G4BaseRNtupleManager () override=default
 
 G4BaseRNtupleManager ()=delete
 
 G4BaseRNtupleManager (const G4BaseRNtupleManager &rhs)=delete
 
G4BaseRNtupleManageroperator= (const G4BaseRNtupleManager &rhs)=delete
 
- Public Member Functions inherited from G4VRNtupleManager
 G4VRNtupleManager (const G4AnalysisManagerState &state)
 
 G4VRNtupleManager ()=delete
 
 ~G4VRNtupleManager () override=default
 
 G4VRNtupleManager (const G4VRNtupleManager &rhs)=delete
 
G4VRNtupleManageroperator= (const G4VRNtupleManager &rhs)=delete
 
- Public Member Functions inherited from G4BaseAnalysisManager
 G4BaseAnalysisManager (const G4AnalysisManagerState &state)
 
 G4BaseAnalysisManager ()=delete
 
virtual ~G4BaseAnalysisManager ()=default
 
G4bool SetFirstId (G4int firstId)
 
void SetLockFirstId (G4bool lockFirstId)
 
G4int GetFirstId () const
 
G4int GetCycle () const
 

Protected Member Functions

void SetFileManager (std::shared_ptr< G4XmlRFileManager > fileManager)
 
G4bool SetNtupleIColumn (G4int ntupleId, const G4String &columnName, std::vector< G4int > &vector) final
 
G4bool SetNtupleFColumn (G4int ntupleId, const G4String &columnName, std::vector< G4float > &vector) final
 
G4bool SetNtupleDColumn (G4int ntupleId, const G4String &columnName, std::vector< G4double > &vector) final
 
G4bool SetNtupleSColumn (G4int ntupleId, const G4String &columnName, std::vector< std::string > &vector) final
 
G4bool SetNtupleIColumn (const G4String &columnName, G4int &value) final
 
G4bool SetNtupleIColumn (G4int ntupleId, const G4String &columnName, G4int &value) override=0
 
G4bool SetNtupleIColumn (const G4String &columnName, std::vector< G4int > &vector) final
 
G4bool SetNtupleFColumn (const G4String &columnName, G4float &value) final
 
G4bool SetNtupleFColumn (G4int ntupleId, const G4String &columnName, G4float &value) override=0
 
G4bool SetNtupleFColumn (const G4String &columnName, std::vector< G4float > &vector) final
 
G4bool SetNtupleDColumn (const G4String &columnName, G4double &value) final
 
G4bool SetNtupleDColumn (G4int ntupleId, const G4String &columnName, G4double &value) override=0
 
G4bool SetNtupleDColumn (const G4String &columnName, std::vector< G4double > &vector) final
 
- Protected Member Functions inherited from G4TRNtupleManager< tools::aida::ntuple >
 G4TRNtupleManager (const G4AnalysisManagerState &state)
 
 ~G4TRNtupleManager () override
 
G4bool IsEmpty () const
 
G4bool Reset ()
 
tools::aida::ntuple * GetNtuple () const
 
tools::aida::ntuple * GetNtuple (G4int ntupleId) const
 
G4int SetNtuple (G4TRNtupleDescription< tools::aida::ntuple > *rntupleDescription)
 
G4bool SetNtupleSColumn (G4int ntupleId, const G4String &columnName, G4String &value) final
 
G4bool SetNtupleSColumn (const G4String &columnName, G4String &value) final
 
G4bool SetNtupleSColumn (const G4String &columnName, std::vector< std::string > &vector) final
 
G4bool GetNtupleRow (G4int ntupleId) final
 
G4bool GetNtupleRow () final
 
G4int GetNofNtuples () const final
 
G4TRNtupleDescription< tools::aida::ntuple > * GetNtupleDescriptionInFunction (G4int id, std::string_view function, G4bool warn=true) const
 
- Protected Member Functions inherited from G4BaseRNtupleManager
- Protected Member Functions inherited from G4VRNtupleManager
- Protected Member Functions inherited from G4BaseAnalysisManager
G4bool IsVerbose (G4int verboseLevel) const
 
void Message (G4int level, const G4String &action, const G4String &objectType, const G4String &objectName="", G4bool success=true) const
 

Friends

class G4XmlAnalysisReader
 

Additional Inherited Members

- Protected Attributes inherited from G4BaseAnalysisManager
const G4AnalysisManagerStatefState
 
G4int fFirstId { 0 }
 
G4bool fLockFirstId { false }
 

Detailed Description

Definition at line 47 of file G4XmlRNtupleManager.hh.

Constructor & Destructor Documentation

◆ G4XmlRNtupleManager() [1/2]

G4XmlRNtupleManager::G4XmlRNtupleManager ( const G4AnalysisManagerState & state)
explicit

◆ G4XmlRNtupleManager() [2/2]

G4XmlRNtupleManager::G4XmlRNtupleManager ( )
delete

◆ ~G4XmlRNtupleManager()

G4XmlRNtupleManager::~G4XmlRNtupleManager ( )
overridedefault

Member Function Documentation

◆ SetFileManager()

void G4XmlRNtupleManager::SetFileManager ( std::shared_ptr< G4XmlRFileManager > fileManager)
inlineprotected

Definition at line 95 of file G4XmlRNtupleManager.hh.

96{
97 fFileManager = std::move(fileManager);
98}

◆ SetNtupleDColumn() [1/4]

G4bool G4BaseRNtupleManager::SetNtupleDColumn ( const G4String & columnName,
G4double & value )
finalprotectedvirtual

Reimplemented from G4TRNtupleManager< tools::aida::ntuple >.

Definition at line 60 of file G4BaseRNtupleManager.cc.

61{
62 return SetNtupleDColumn(GetCurrentNtupleId(), columnName, value);
63}
G4bool SetNtupleDColumn(G4int ntupleId, const G4String &columnName, std::vector< G4double > &vector) final

◆ SetNtupleDColumn() [2/4]

G4bool G4BaseRNtupleManager::SetNtupleDColumn ( const G4String & columnName,
std::vector< G4double > & vector )
finalprotectedvirtual

Reimplemented from G4TRNtupleManager< tools::aida::ntuple >.

Definition at line 74 of file G4BaseRNtupleManager.cc.

89{
90 return SetNtupleDColumn(GetCurrentNtupleId(), columnName, vector);
91}

◆ SetNtupleDColumn() [3/4]

G4bool G4BaseRNtupleManager::SetNtupleDColumn ( G4int ntupleId,
const G4String & columnName,
G4double & value )
overrideprotectedvirtual

◆ SetNtupleDColumn() [4/4]

G4bool G4XmlRNtupleManager::SetNtupleDColumn ( G4int ntupleId,
const G4String & columnName,
std::vector< G4double > & vector )
finalprotectedvirtual

Reimplemented from G4TRNtupleManager< tools::aida::ntuple >.

Definition at line 159 of file G4XmlRNtupleManager.cc.

162{
163// Override base class default implementation
164
165 Message(kVL4, "set", "ntuple D column",
166 " ntupleId " + to_string(ntupleId) + " " + columnName);
167
168 auto ntupleDescription = GetNtupleDescriptionInFunction(ntupleId, "SetNtupleDColumn");
169 if (ntupleDescription == nullptr) return false;
170
171 // not supported
172 //tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
173 //ntupleBinding->add_column(columnName, vector);
174
175 auto subNtuple = new tools::aida::ntuple(G4cout, columnName);
176 ntupleDescription->fDVectorBindingMap[subNtuple] = &vector;
177 tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
178 ntupleBinding->add_column_cid(columnName, *subNtuple);
179
180 Message(kVL2, "set", "ntuple D column",
181 " ntupleId " + to_string(ntupleId) + " " + columnName);
182
183 return true;
184}
G4GLOB_DLL std::ostream G4cout
void Message(G4int level, const G4String &action, const G4String &objectType, const G4String &objectName="", G4bool success=true) const
G4TRNtupleDescription< tools::aida::ntuple > * GetNtupleDescriptionInFunction(G4int id, std::string_view function, G4bool warn=true) const
constexpr G4int kVL2
constexpr G4int kVL4

◆ SetNtupleFColumn() [1/4]

G4bool G4BaseRNtupleManager::SetNtupleFColumn ( const G4String & columnName,
G4float & value )
finalprotectedvirtual

Reimplemented from G4TRNtupleManager< tools::aida::ntuple >.

Definition at line 59 of file G4BaseRNtupleManager.cc.

54{
55 return SetNtupleFColumn(GetCurrentNtupleId(), columnName, value);
56}
G4bool SetNtupleFColumn(G4int ntupleId, const G4String &columnName, std::vector< G4float > &vector) final

◆ SetNtupleFColumn() [2/4]

G4bool G4BaseRNtupleManager::SetNtupleFColumn ( const G4String & columnName,
std::vector< G4float > & vector )
finalprotectedvirtual

Reimplemented from G4TRNtupleManager< tools::aida::ntuple >.

Definition at line 73 of file G4BaseRNtupleManager.cc.

82{
83 return SetNtupleFColumn(GetCurrentNtupleId(), columnName, vector);
84}

◆ SetNtupleFColumn() [3/4]

G4bool G4BaseRNtupleManager::SetNtupleFColumn ( G4int ntupleId,
const G4String & columnName,
G4float & value )
overrideprotectedvirtual

◆ SetNtupleFColumn() [4/4]

G4bool G4XmlRNtupleManager::SetNtupleFColumn ( G4int ntupleId,
const G4String & columnName,
std::vector< G4float > & vector )
finalprotectedvirtual

Reimplemented from G4TRNtupleManager< tools::aida::ntuple >.

Definition at line 130 of file G4XmlRNtupleManager.cc.

133{
134// Override base class default implementation
135
136 Message(kVL4, "set", "ntuple F column",
137 " ntupleId " + to_string(ntupleId) + " " + columnName);
138
139
140 auto ntupleDescription = GetNtupleDescriptionInFunction(ntupleId, "SetNtupleFColumn");
141 if (ntupleDescription == nullptr) return false;
142
143 // not supported
144 //tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
145 //ntupleBinding->add_column(columnName, vector);
146
147 auto subNtuple = new tools::aida::ntuple(G4cout, columnName);
148 ntupleDescription->fFVectorBindingMap[subNtuple] = &vector;
149 tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
150 ntupleBinding->add_column_cid(columnName, *subNtuple);
151
152 Message(kVL4, "set", "ntuple F column",
153 " ntupleId " + to_string(ntupleId) + " " + columnName);
154
155 return true;
156}

◆ SetNtupleIColumn() [1/4]

G4bool G4BaseRNtupleManager::SetNtupleIColumn ( const G4String & columnName,
G4int & value )
finalprotectedvirtual

Reimplemented from G4TRNtupleManager< tools::aida::ntuple >.

Definition at line 58 of file G4BaseRNtupleManager.cc.

48{
49 return SetNtupleIColumn(GetCurrentNtupleId(), columnName, value);
50}
G4bool SetNtupleIColumn(G4int ntupleId, const G4String &columnName, std::vector< G4int > &vector) final

◆ SetNtupleIColumn() [2/4]

G4bool G4BaseRNtupleManager::SetNtupleIColumn ( const G4String & columnName,
std::vector< G4int > & vector )
finalprotectedvirtual

Reimplemented from G4TRNtupleManager< tools::aida::ntuple >.

Definition at line 72 of file G4BaseRNtupleManager.cc.

75{
76 return SetNtupleIColumn(GetCurrentNtupleId(), columnName, vector);
77}

◆ SetNtupleIColumn() [3/4]

G4bool G4BaseRNtupleManager::SetNtupleIColumn ( G4int ntupleId,
const G4String & columnName,
G4int & value )
overrideprotectedvirtual

◆ SetNtupleIColumn() [4/4]

G4bool G4XmlRNtupleManager::SetNtupleIColumn ( G4int ntupleId,
const G4String & columnName,
std::vector< G4int > & vector )
finalprotectedvirtual

Reimplemented from G4TRNtupleManager< tools::aida::ntuple >.

Definition at line 102 of file G4XmlRNtupleManager.cc.

105{
106// Override base class default implementation
107
108 Message(kVL4, "set", "ntuple I column",
109 " ntupleId " + to_string(ntupleId) + " " + columnName);
110
111 auto ntupleDescription = GetNtupleDescriptionInFunction(ntupleId, "SetNtupleIColumn");
112 if (ntupleDescription == nullptr) return false;
113
114 // not supported
115 //tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
116 //ntupleBinding->add_column(columnName, vector);
117
118 auto subNtuple = new tools::aida::ntuple(G4cout, columnName);
119 ntupleDescription->fIVectorBindingMap[subNtuple] = &vector;
120 tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
121 ntupleBinding->add_column_cid(columnName, *subNtuple);
122
123 Message(kVL2, "set", "ntuple I column",
124 " ntupleId " + to_string(ntupleId) + " " + columnName);
125
126 return true;
127}

◆ SetNtupleSColumn()

G4bool G4XmlRNtupleManager::SetNtupleSColumn ( G4int ntupleId,
const G4String & columnName,
std::vector< std::string > & vector )
finalprotectedvirtual

Reimplemented from G4TRNtupleManager< tools::aida::ntuple >.

Definition at line 187 of file G4XmlRNtupleManager.cc.

190{
191// Override base class default implementation
192
193 Message(kVL4, "set", "ntuple S column",
194 " ntupleId " + to_string(ntupleId) + " " + columnName);
195
196 auto ntupleDescription = GetNtupleDescriptionInFunction(ntupleId, "SetNtupleSColumn");
197 if (ntupleDescription == nullptr) return false;
198
199 // not supported
200 //tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
201 //ntupleBinding->add_column(columnName, vector);
202
203 auto subNtuple = new tools::aida::ntuple(G4cout, columnName);
204 ntupleDescription->fSVectorBindingMap[subNtuple] = &vector;
205 tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
206 ntupleBinding->add_column_cid(columnName, *subNtuple);
207
208 Message(kVL2, "set", "ntuple S column",
209 " ntupleId " + to_string(ntupleId) + " " + columnName);
210
211 return true;
212}

Friends And Related Symbol Documentation

◆ G4XmlAnalysisReader

friend class G4XmlAnalysisReader
friend

Definition at line 49 of file G4XmlRNtupleManager.hh.


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