Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4XmlRNtupleManager Class Reference

#include <G4XmlRNtupleManager.hh>

Inheritance diagram for G4XmlRNtupleManager:
Collaboration diagram for G4XmlRNtupleManager:

Protected Member Functions

 G4XmlRNtupleManager (const G4AnalysisManagerState &state)
 
virtual ~G4XmlRNtupleManager ()
 
G4bool IsEmpty () const
 
G4bool Reset ()
 
tools::aida::ntuple * GetNtuple () const
 
tools::aida::ntuple * GetNtuple (G4int ntupleId) const
 
G4int SetNtuple (G4XmlRNtupleDescription *rntupleDescription)
 
virtual G4bool SetNtupleIColumn (const G4String &columnName, G4int &value)
 
virtual G4bool SetNtupleFColumn (const G4String &columnName, G4float &value)
 
virtual G4bool SetNtupleDColumn (const G4String &columnName, G4double &value)
 
virtual G4bool SetNtupleSColumn (const G4String &columnName, G4String &value)
 
virtual G4bool SetNtupleIColumn (const G4String &columnName, std::vector< G4int > &vector)
 
virtual G4bool SetNtupleFColumn (const G4String &columnName, std::vector< G4float > &vector)
 
virtual G4bool SetNtupleDColumn (const G4String &columnName, std::vector< G4double > &vector)
 
virtual G4bool SetNtupleIColumn (G4int ntupleId, const G4String &columnName, G4int &value)
 
virtual G4bool SetNtupleFColumn (G4int ntupleId, const G4String &columnName, G4float &value)
 
virtual G4bool SetNtupleDColumn (G4int ntupleId, const G4String &columnName, G4double &value)
 
virtual G4bool SetNtupleSColumn (G4int ntupleId, const G4String &columnName, G4String &value)
 
virtual G4bool SetNtupleIColumn (G4int ntupleId, const G4String &columnName, std::vector< G4int > &vector)
 
virtual G4bool SetNtupleFColumn (G4int ntupleId, const G4String &columnName, std::vector< G4float > &vector)
 
virtual G4bool SetNtupleDColumn (G4int ntupleId, const G4String &columnName, std::vector< G4double > &vector)
 
virtual G4bool GetNtupleRow ()
 
virtual G4bool GetNtupleRow (G4int ntupleId)
 
virtual G4int GetNofNtuples () const
 

Friends

class G4XmlAnalysisReader
 

Additional Inherited Members

- Public Member Functions inherited from G4VRNtupleManager
 G4VRNtupleManager (const G4AnalysisManagerState &state)
 
virtual ~G4VRNtupleManager ()
 
 G4VRNtupleManager (const G4VRNtupleManager &rhs)=delete
 
G4VRNtupleManageroperator= (const G4VRNtupleManager &rhs)=delete
 
- Public Member Functions inherited from G4BaseAnalysisManager
 G4BaseAnalysisManager (const G4AnalysisManagerState &state)
 
virtual ~G4BaseAnalysisManager ()
 
G4bool SetFirstId (G4int firstId)
 
void SetLockFirstId (G4bool lockFirstId)
 
G4int GetFirstId () const
 
- Protected Attributes inherited from G4BaseAnalysisManager
const G4AnalysisManagerStatefState
 
G4int fFirstId
 
G4bool fLockFirstId
 

Detailed Description

Definition at line 45 of file G4XmlRNtupleManager.hh.

Constructor & Destructor Documentation

G4XmlRNtupleManager::G4XmlRNtupleManager ( const G4AnalysisManagerState state)
protected

Definition at line 62 of file G4XmlRNtupleManager.cc.

63  : G4VRNtupleManager(state),
64  fNtupleVector()
65 {
66 }
G4VRNtupleManager(const G4AnalysisManagerState &state)
G4XmlRNtupleManager::~G4XmlRNtupleManager ( )
protectedvirtual

Definition at line 69 of file G4XmlRNtupleManager.cc.

70 {
71  std::vector<G4XmlRNtupleDescription*>::iterator it;
72  for (it = fNtupleVector.begin(); it != fNtupleVector.end(); it++ ) {
73  delete (*it);
74  }
75 }

Member Function Documentation

G4int G4XmlRNtupleManager::GetNofNtuples ( ) const
inlineprotectedvirtual

Reimplemented from G4VRNtupleManager.

Definition at line 115 of file G4XmlRNtupleManager.hh.

116 { return fNtupleVector.size(); }
tools::aida::ntuple * G4XmlRNtupleManager::GetNtuple ( ) const
protected

Definition at line 126 of file G4XmlRNtupleManager.cc.

127 {
128  return GetNtuple(fFirstId);
129 }
tools::aida::ntuple * GetNtuple() const
tools::aida::ntuple * G4XmlRNtupleManager::GetNtuple ( G4int  ntupleId) const
protected

Definition at line 132 of file G4XmlRNtupleManager.cc.

133 {
134  G4XmlRNtupleDescription* rntupleDescription
135  = GetNtupleInFunction(ntupleId, "GetRNtuple");
136 
137  if ( ! rntupleDescription ) return nullptr;
138 
139  return rntupleDescription->fNtuple;
140 }
tools::aida::ntuple * fNtuple
G4bool G4XmlRNtupleManager::GetNtupleRow ( )
protectedvirtual

Implements G4VRNtupleManager.

Definition at line 447 of file G4XmlRNtupleManager.cc.

448 {
449  return GetNtupleRow(fFirstId);
450 }
virtual G4bool GetNtupleRow()
G4bool G4XmlRNtupleManager::GetNtupleRow ( G4int  ntupleId)
protectedvirtual

Implements G4VRNtupleManager.

Definition at line 453 of file G4XmlRNtupleManager.cc.

454 {
455 #ifdef G4VERBOSE
456  if ( fState.GetVerboseL4() ) {
457  G4ExceptionDescription description;
458  description << " ntupleId " << ntupleId;
459  fState.GetVerboseL4()->Message("get", "ntuple row", description);
460  }
461 #endif
462 
463  G4XmlRNtupleDescription* ntupleDescription
464  = GetNtupleInFunction(ntupleId, "GetNtupleRow");
465  if ( ! ntupleDescription ) return false;
466 
467  tools::aida::ntuple* ntuple = ntupleDescription->fNtuple;
468 
469  G4bool isInitialized = ntupleDescription->fIsInitialized;
470  if ( ! isInitialized ) {
471  tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
472  if ( ! ntuple->set_binding(std::cout, *ntupleBinding) ) {
473  G4ExceptionDescription description;
474  description
475  << " "
476  << "Ntuple initialization failed !!";
477  G4Exception("G4XmlRNtuple::GetNtupleRow()",
478  "Analysis_WR021", JustWarning, description);
479  return false;
480  }
481  ntupleDescription->fIsInitialized = true;
482  ntuple->start();
483  }
484 
485  G4bool next = ntuple->next();
486  if ( next ) {
487  if ( ! ntuple->get_row() ) {
488  G4ExceptionDescription description;
489  description
490  << " "
491  << "Ntuple get_row() failed !!";
492  G4Exception("G4XmlRNtuple::GetNtupleRow()",
493  "Analysis_WR021", JustWarning, description);
494  return false;
495  }
496 
497  // fill vector from sub ntuples
498 
499  {std::map<tools::aida::ntuple*, std::vector<int>* >::iterator it;
500  for ( it = ntupleDescription->fIVectorBindingMap.begin();
501  it != ntupleDescription->fIVectorBindingMap.end(); it++) {
502  tools::aida::to_vector<int>(*(it->first), *(it->second));
503  }}
504  {std::map<tools::aida::ntuple*, std::vector<float>* >::iterator it;
505  for ( it = ntupleDescription->fFVectorBindingMap.begin();
506  it != ntupleDescription->fFVectorBindingMap.end(); it++) {
507  tools::aida::to_vector<float>(*(it->first), *(it->second));
508  }}
509  {std::map<tools::aida::ntuple*, std::vector<double>* >::iterator it;
510  for ( it = ntupleDescription->fDVectorBindingMap.begin();
511  it != ntupleDescription->fDVectorBindingMap.end(); it++) {
512  tools::aida::to_vector<double>(*(it->first), *(it->second));
513  }}
514  }
515 
516 #ifdef G4VERBOSE
517  if ( fState.GetVerboseL2() ) {
518  G4ExceptionDescription description;
519  description << " ntupleId " << ntupleId;
520  fState.GetVerboseL2()->Message("get", "ntuple row", description, true);
521  }
522 #endif
523 
524  return next;
525 }
std::map< tools::aida::ntuple *, std::vector< double > * > fDVectorBindingMap
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
tools::ntuple_binding * fNtupleBinding
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
std::map< tools::aida::ntuple *, std::vector< int > * > fIVectorBindingMap
const G4AnalysisVerbose * GetVerboseL2() const
const G4AnalysisVerbose * GetVerboseL4() const
bool G4bool
Definition: G4Types.hh:79
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
tools::aida::ntuple * fNtuple
std::map< tools::aida::ntuple *, std::vector< float > * > fFVectorBindingMap
G4bool isInitialized()
const G4AnalysisManagerState & fState

Here is the call graph for this function:

G4bool G4XmlRNtupleManager::IsEmpty ( ) const
protected

Definition at line 105 of file G4XmlRNtupleManager.cc.

106 {
107  return ! fNtupleVector.size();
108 }
G4bool G4XmlRNtupleManager::Reset ( )
protected

Definition at line 111 of file G4XmlRNtupleManager.cc.

112 {
113 // Reset ntuples
114 
115  std::vector<G4XmlRNtupleDescription*>::iterator it;
116  for (it = fNtupleVector.begin(); it != fNtupleVector.end(); it++ ) {
117  // ntuple is deleted automatically when file is closed
118  // delete (*it)->fNtuple;
119  (*it)->fNtuple=0;
120  }
121 
122  return true;
123 }
G4int G4XmlRNtupleManager::SetNtuple ( G4XmlRNtupleDescription rntupleDescription)
protected

Definition at line 143 of file G4XmlRNtupleManager.cc.

144 {
145  G4int id = fNtupleVector.size() + fFirstId;
146 
147  fNtupleVector.push_back(rntupleDescription);
148 
149  return id;
150 }
int G4int
Definition: G4Types.hh:78

Here is the caller graph for this function:

G4bool G4XmlRNtupleManager::SetNtupleDColumn ( const G4String columnName,
G4double value 
)
protectedvirtual

Implements G4VRNtupleManager.

Definition at line 167 of file G4XmlRNtupleManager.cc.

169 {
170  return SetNtupleDColumn(fFirstId, columnName, value);
171 }
virtual G4bool SetNtupleDColumn(const G4String &columnName, G4double &value)
const XML_Char int const XML_Char * value
Definition: expat.h:331

Here is the caller graph for this function:

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

Implements G4VRNtupleManager.

Definition at line 195 of file G4XmlRNtupleManager.cc.

197 {
198  return SetNtupleDColumn(fFirstId, columnName, vector);
199 }
virtual G4bool SetNtupleDColumn(const G4String &columnName, G4double &value)

Here is the call graph for this function:

G4bool G4XmlRNtupleManager::SetNtupleDColumn ( G4int  ntupleId,
const G4String columnName,
G4double value 
)
protectedvirtual

Implements G4VRNtupleManager.

Definition at line 264 of file G4XmlRNtupleManager.cc.

267 {
268 // Add protection if ntuple is initialized
269 
270 #ifdef G4VERBOSE
271  if ( fState.GetVerboseL4() ) {
272  G4ExceptionDescription description;
273  description << " ntupleId " << ntupleId << " " << columnName;
274  fState.GetVerboseL4()->Message("set", "ntuple D column", description);
275  }
276 #endif
277 
278  G4XmlRNtupleDescription* ntupleDescription
279  = GetNtupleInFunction(ntupleId, "SetNtupleDColumn");
280  if ( ! ntupleDescription ) return false;
281 
282  tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
283  ntupleBinding->add_column(columnName, value);
284 
285 #ifdef G4VERBOSE
286  if ( fState.GetVerboseL2() ) {
287  G4ExceptionDescription description;
288  description << " ntupleId " << ntupleId << " " << columnName;
289  fState.GetVerboseL2()->Message("set", "ntuple D colum", description, true);
290  }
291 #endif
292 
293  return true;
294 }
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
tools::ntuple_binding * fNtupleBinding
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
const G4AnalysisVerbose * GetVerboseL2() const
const XML_Char int const XML_Char * value
Definition: expat.h:331
const G4AnalysisVerbose * GetVerboseL4() const
const G4AnalysisManagerState & fState

Here is the call graph for this function:

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

Implements G4VRNtupleManager.

Definition at line 408 of file G4XmlRNtupleManager.cc.

411 {
412 // Add protection if ntuple is initialized
413 
414 #ifdef G4VERBOSE
415  if ( fState.GetVerboseL4() ) {
416  G4ExceptionDescription description;
417  description << " ntupleId " << ntupleId << " " << columnName;
418  fState.GetVerboseL4()->Message("set", "ntuple D column of vector", description);
419  }
420 #endif
421 
422  G4XmlRNtupleDescription* ntupleDescription
423  = GetNtupleInFunction(ntupleId, "SetNtupleDColumn");
424  if ( ! ntupleDescription ) return false;
425 
426  // not supported
427  //tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
428  //ntupleBinding->add_column(columnName, vector);
429 
430  tools::aida::ntuple* subNtuple = new tools::aida::ntuple(G4cout, columnName);
431  ntupleDescription->fDVectorBindingMap[subNtuple] = &vector;
432  tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
433  ntupleBinding->add_column(columnName, *subNtuple);
434 
435 #ifdef G4VERBOSE
436  if ( fState.GetVerboseL2() ) {
437  G4ExceptionDescription description;
438  description << " ntupleId " << ntupleId << " " << columnName;
439  fState.GetVerboseL2()->Message("set", "ntuple D colum", description, true);
440  }
441 #endif
442 
443  return true;
444 }
std::map< tools::aida::ntuple *, std::vector< double > * > fDVectorBindingMap
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
tools::ntuple_binding * fNtupleBinding
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
const G4AnalysisVerbose * GetVerboseL2() const
G4GLOB_DLL std::ostream G4cout
const G4AnalysisVerbose * GetVerboseL4() const
const G4AnalysisManagerState & fState

Here is the call graph for this function:

G4bool G4XmlRNtupleManager::SetNtupleFColumn ( const G4String columnName,
G4float value 
)
protectedvirtual

Implements G4VRNtupleManager.

Definition at line 160 of file G4XmlRNtupleManager.cc.

162 {
163  return SetNtupleFColumn(fFirstId, columnName, value);
164 }
const XML_Char int const XML_Char * value
Definition: expat.h:331
virtual G4bool SetNtupleFColumn(const G4String &columnName, G4float &value)

Here is the caller graph for this function:

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

Implements G4VRNtupleManager.

Definition at line 188 of file G4XmlRNtupleManager.cc.

190 {
191  return SetNtupleFColumn(fFirstId, columnName, vector);
192 }
virtual G4bool SetNtupleFColumn(const G4String &columnName, G4float &value)

Here is the call graph for this function:

G4bool G4XmlRNtupleManager::SetNtupleFColumn ( G4int  ntupleId,
const G4String columnName,
G4float value 
)
protectedvirtual

Implements G4VRNtupleManager.

Definition at line 233 of file G4XmlRNtupleManager.cc.

236 {
237 #ifdef G4VERBOSE
238  if ( fState.GetVerboseL4() ) {
239  G4ExceptionDescription description;
240  description << " ntupleId " << ntupleId << " " << columnName;
241  fState.GetVerboseL4()->Message("set", "ntuple F column", description);
242  }
243 #endif
244 
245  G4XmlRNtupleDescription* ntupleDescription
246  = GetNtupleInFunction(ntupleId, "SetNtupleFColumn");
247  if ( ! ntupleDescription ) return false;
248 
249  tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
250  ntupleBinding->add_column(columnName, value);
251 
252 #ifdef G4VERBOSE
253  if ( fState.GetVerboseL2() ) {
254  G4ExceptionDescription description;
255  description << " ntupleId " << ntupleId << " " << columnName;
256  fState.GetVerboseL2()->Message("set", "ntuple F colum", description, true);
257  }
258 #endif
259 
260  return true;
261 }
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
tools::ntuple_binding * fNtupleBinding
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
const G4AnalysisVerbose * GetVerboseL2() const
const XML_Char int const XML_Char * value
Definition: expat.h:331
const G4AnalysisVerbose * GetVerboseL4() const
const G4AnalysisManagerState & fState

Here is the call graph for this function:

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

Implements G4VRNtupleManager.

Definition at line 369 of file G4XmlRNtupleManager.cc.

372 {
373 // Add protection if ntuple is initialized
374 
375 #ifdef G4VERBOSE
376  if ( fState.GetVerboseL4() ) {
377  G4ExceptionDescription description;
378  description << " ntupleId " << ntupleId << " " << columnName;
379  fState.GetVerboseL4()->Message("set", "ntuple F column of vector", description);
380  }
381 #endif
382 
383  G4XmlRNtupleDescription* ntupleDescription
384  = GetNtupleInFunction(ntupleId, "SetNtupleFColumn");
385  if ( ! ntupleDescription ) return false;
386 
387  // not supported
388  //tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
389  //ntupleBinding->add_column(columnName, vector);
390 
391  tools::aida::ntuple* subNtuple = new tools::aida::ntuple(G4cout, columnName);
392  ntupleDescription->fFVectorBindingMap[subNtuple] = &vector;
393  tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
394  ntupleBinding->add_column(columnName, *subNtuple);
395 
396 #ifdef G4VERBOSE
397  if ( fState.GetVerboseL2() ) {
398  G4ExceptionDescription description;
399  description << " ntupleId " << ntupleId << " " << columnName;
400  fState.GetVerboseL2()->Message("set", "ntuple F colum", description, true);
401  }
402 #endif
403 
404  return true;
405 }
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
tools::ntuple_binding * fNtupleBinding
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
const G4AnalysisVerbose * GetVerboseL2() const
G4GLOB_DLL std::ostream G4cout
const G4AnalysisVerbose * GetVerboseL4() const
std::map< tools::aida::ntuple *, std::vector< float > * > fFVectorBindingMap
const G4AnalysisManagerState & fState

Here is the call graph for this function:

G4bool G4XmlRNtupleManager::SetNtupleIColumn ( const G4String columnName,
G4int value 
)
protectedvirtual

Implements G4VRNtupleManager.

Definition at line 153 of file G4XmlRNtupleManager.cc.

155 {
156  return SetNtupleIColumn(fFirstId, columnName, value);
157 }
const XML_Char int const XML_Char * value
Definition: expat.h:331
virtual G4bool SetNtupleIColumn(const G4String &columnName, G4int &value)

Here is the caller graph for this function:

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

Implements G4VRNtupleManager.

Definition at line 181 of file G4XmlRNtupleManager.cc.

183 {
184  return SetNtupleIColumn(fFirstId, columnName, vector);
185 }
virtual G4bool SetNtupleIColumn(const G4String &columnName, G4int &value)

Here is the call graph for this function:

G4bool G4XmlRNtupleManager::SetNtupleIColumn ( G4int  ntupleId,
const G4String columnName,
G4int value 
)
protectedvirtual

Implements G4VRNtupleManager.

Definition at line 202 of file G4XmlRNtupleManager.cc.

205 {
206 #ifdef G4VERBOSE
207  if ( fState.GetVerboseL4() ) {
208  G4ExceptionDescription description;
209  description << " ntupleId " << ntupleId << " " << columnName;
210  fState.GetVerboseL4()->Message("set", "ntuple I column", description);
211  }
212 #endif
213 
214  G4XmlRNtupleDescription* ntupleDescription
215  = GetNtupleInFunction(ntupleId, "SetNtupleIColumn");
216  if ( ! ntupleDescription ) return false;
217 
218  tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
219  ntupleBinding->add_column(columnName, value);
220 
221 #ifdef G4VERBOSE
222  if ( fState.GetVerboseL2() ) {
223  G4ExceptionDescription description;
224  description << " ntupleId " << ntupleId << " " << columnName;
225  fState.GetVerboseL2()->Message("set", "ntuple I colum", description, true);
226  }
227 #endif
228 
229  return true;
230 }
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
tools::ntuple_binding * fNtupleBinding
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
const G4AnalysisVerbose * GetVerboseL2() const
const XML_Char int const XML_Char * value
Definition: expat.h:331
const G4AnalysisVerbose * GetVerboseL4() const
const G4AnalysisManagerState & fState

Here is the call graph for this function:

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

Implements G4VRNtupleManager.

Definition at line 330 of file G4XmlRNtupleManager.cc.

333 {
334 // Add protection if ntuple is initialized
335 
336 #ifdef G4VERBOSE
337  if ( fState.GetVerboseL4() ) {
338  G4ExceptionDescription description;
339  description << " ntupleId " << ntupleId << " " << columnName;
340  fState.GetVerboseL4()->Message("set", "ntuple I column", description);
341  }
342 #endif
343 
344  G4XmlRNtupleDescription* ntupleDescription
345  = GetNtupleInFunction(ntupleId, "SetNtupleIColumn");
346  if ( ! ntupleDescription ) return false;
347 
348  // not supported
349  //tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
350  //ntupleBinding->add_column(columnName, vector);
351 
352  tools::aida::ntuple* subNtuple = new tools::aida::ntuple(G4cout, columnName);
353  ntupleDescription->fIVectorBindingMap[subNtuple] = &vector;
354  tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
355  ntupleBinding->add_column(columnName, *subNtuple);
356 
357 #ifdef G4VERBOSE
358  if ( fState.GetVerboseL2() ) {
359  G4ExceptionDescription description;
360  description << " ntupleId " << ntupleId << " " << columnName;
361  fState.GetVerboseL2()->Message("set", "ntuple I colum", description, true);
362  }
363 #endif
364 
365  return true;
366 }
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
tools::ntuple_binding * fNtupleBinding
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
std::map< tools::aida::ntuple *, std::vector< int > * > fIVectorBindingMap
const G4AnalysisVerbose * GetVerboseL2() const
G4GLOB_DLL std::ostream G4cout
const G4AnalysisVerbose * GetVerboseL4() const
const G4AnalysisManagerState & fState

Here is the call graph for this function:

G4bool G4XmlRNtupleManager::SetNtupleSColumn ( const G4String columnName,
G4String value 
)
protectedvirtual

Implements G4VRNtupleManager.

Definition at line 174 of file G4XmlRNtupleManager.cc.

176 {
177  return SetNtupleSColumn(fFirstId, columnName, value);
178 }
virtual G4bool SetNtupleSColumn(const G4String &columnName, G4String &value)
G4bool G4XmlRNtupleManager::SetNtupleSColumn ( G4int  ntupleId,
const G4String columnName,
G4String value 
)
protectedvirtual

Implements G4VRNtupleManager.

Definition at line 297 of file G4XmlRNtupleManager.cc.

300 {
301 // Add protection if ntuple is initialized
302 
303 #ifdef G4VERBOSE
304  if ( fState.GetVerboseL4() ) {
305  G4ExceptionDescription description;
306  description << " ntupleId " << ntupleId << " " << columnName;
307  fState.GetVerboseL4()->Message("set", "ntuple S column", description);
308  }
309 #endif
310 
311  G4XmlRNtupleDescription* ntupleDescription
312  = GetNtupleInFunction(ntupleId, "SetNtupleSColumn");
313  if ( ! ntupleDescription ) return false;
314 
315  tools::ntuple_binding* ntupleBinding = ntupleDescription->fNtupleBinding;
316  ntupleBinding->add_column(columnName, value);
317 
318 #ifdef G4VERBOSE
319  if ( fState.GetVerboseL2() ) {
320  G4ExceptionDescription description;
321  description << " ntupleId " << ntupleId << " " << columnName;
322  fState.GetVerboseL2()->Message("set", "ntuple S colum", description, true);
323  }
324 #endif
325 
326  return true;
327 }
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
tools::ntuple_binding * fNtupleBinding
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
const G4AnalysisVerbose * GetVerboseL2() const
const G4AnalysisVerbose * GetVerboseL4() const
const G4AnalysisManagerState & fState

Here is the call graph for this function:

Friends And Related Function Documentation

friend class G4XmlAnalysisReader
friend

Definition at line 47 of file G4XmlRNtupleManager.hh.


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