ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4AccumulableManager Class Reference

#include <geant4/tree/geant4-10.6-release/source/analysis/accumulables/include/G4AccumulableManager.hh>

+ Collaboration diagram for G4AccumulableManager:

Public Member Functions

virtual ~G4AccumulableManager ()
 
template<typename T >
G4Accumulable< T > * CreateAccumulable (const G4String &name, T value, G4MergeMode mergeMode=G4MergeMode::kAddition)
 
template<typename T >
G4Accumulable< T > * CreateAccumulable (T value, G4MergeMode mergeMode=G4MergeMode::kAddition)
 
template<typename T >
G4bool RegisterAccumulable (G4Accumulable< T > &accumulable)
 
G4bool RegisterAccumulable (G4VAccumulable *accumulable)
 
template<typename T >
G4Accumulable< T > * GetAccumulable (const G4String &name, G4bool warn=true) const
 
G4VAccumulableGetAccumulable (const G4String &name, G4bool warn=true) const
 
template<typename T >
G4Accumulable< T > * GetAccumulable (G4int id, G4bool warn=true) const
 
G4VAccumulableGetAccumulable (G4int id, G4bool warn=true) const
 
G4int GetNofAccumulables () const
 
std::vector< G4VAccumulable * >
::iterator 
Begin ()
 
std::vector< G4VAccumulable * >
::iterator 
End ()
 
std::vector< G4VAccumulable * >
::const_iterator 
BeginConst () const
 
std::vector< G4VAccumulable * >
::const_iterator 
EndConst () const
 
void Merge ()
 
void Reset ()
 

Static Public Member Functions

static G4AccumulableManagerInstance ()
 

Private Member Functions

 G4AccumulableManager (G4bool isMaster)
 
G4String GenerateName () const
 
G4bool CheckName (const G4String &name, const G4String &where) const
 
template<typename T >
G4Accumulable< T > * GetAccumulable (G4VAccumulable *accumulable, G4bool warn) const
 

Private Attributes

const G4String kBaseName = "accumulable"
 
std::vector< G4VAccumulable * > fVector
 
std::map< G4String,
G4VAccumulable * > 
fMap
 
std::vector< G4VAccumulable * > fAccumulablesToDelete
 

Static Private Attributes

static G4AccumulableManagerfgMasterInstance = nullptr
 
static G4ThreadLocal
G4AccumulableManager
fgInstance = nullptr
 

Detailed Description

Definition at line 43 of file G4AccumulableManager.hh.

View newest version in sPHENIX GitHub at line 43 of file G4AccumulableManager.hh

Constructor & Destructor Documentation

G4AccumulableManager::~G4AccumulableManager ( )
virtual

Definition at line 73 of file G4AccumulableManager.cc.

View newest version in sPHENIX GitHub at line 73 of file G4AccumulableManager.cc

References fAccumulablesToDelete, and it.

G4AccumulableManager::G4AccumulableManager ( G4bool  isMaster)
private

Definition at line 55 of file G4AccumulableManager.cc.

View newest version in sPHENIX GitHub at line 55 of file G4AccumulableManager.cc

References FatalException, fgInstance, fgMasterInstance, and G4Exception().

Referenced by Instance().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Function Documentation

std::vector<G4VAccumulable*>::iterator G4AccumulableManager::Begin ( )
std::vector<G4VAccumulable*>::const_iterator G4AccumulableManager::BeginConst ( ) const
G4bool G4AccumulableManager::CheckName ( const G4String name,
const G4String where 
) const
private

Definition at line 97 of file G4AccumulableManager.cc.

View newest version in sPHENIX GitHub at line 97 of file G4AccumulableManager.cc

References G4String::append(), fMap, G4endl, G4Exception(), and JustWarning.

Referenced by RegisterAccumulable().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename T >
G4Accumulable<T>* G4AccumulableManager::CreateAccumulable ( const G4String name,
T  value,
G4MergeMode  mergeMode = G4MergeMode::kAddition 
)
template<typename T >
G4Accumulable<T>* G4AccumulableManager::CreateAccumulable ( T  value,
G4MergeMode  mergeMode = G4MergeMode::kAddition 
)
std::vector<G4VAccumulable*>::iterator G4AccumulableManager::End ( )
std::vector<G4VAccumulable*>::const_iterator G4AccumulableManager::EndConst ( ) const
G4String G4AccumulableManager::GenerateName ( ) const
private

Definition at line 86 of file G4AccumulableManager.cc.

View newest version in sPHENIX GitHub at line 86 of file G4AccumulableManager.cc

References G4String::append(), fVector, and kBaseName.

Referenced by RegisterAccumulable().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename T >
G4VAccumulable * G4AccumulableManager::GetAccumulable ( const G4String name,
G4bool  warn = true 
) const

Definition at line 135 of file G4AccumulableManager.cc.

View newest version in sPHENIX GitHub at line 135 of file G4AccumulableManager.cc

References fMap, G4Exception(), it, and JustWarning.

+ Here is the call graph for this function:

G4VAccumulable* G4AccumulableManager::GetAccumulable ( const G4String name,
G4bool  warn = true 
) const
template<typename T >
G4VAccumulable * G4AccumulableManager::GetAccumulable ( G4int  id,
G4bool  warn = true 
) const

Definition at line 154 of file G4AccumulableManager.cc.

View newest version in sPHENIX GitHub at line 154 of file G4AccumulableManager.cc

References fVector, G4Exception(), and JustWarning.

+ Here is the call graph for this function:

G4VAccumulable* G4AccumulableManager::GetAccumulable ( G4int  id,
G4bool  warn = true 
) const
template<typename T >
G4Accumulable<T>* G4AccumulableManager::GetAccumulable ( G4VAccumulable accumulable,
G4bool  warn 
) const
private
G4int G4AccumulableManager::GetNofAccumulables ( ) const
G4AccumulableManager * G4AccumulableManager::Instance ( void  )
static

Definition at line 44 of file G4AccumulableManager.cc.

View newest version in sPHENIX GitHub at line 44 of file G4AccumulableManager.cc

References fgInstance, G4AccumulableManager(), and G4Threading::IsWorkerThread().

Referenced by B1RunAction::B1RunAction(), B3aRunAction::B3aRunAction(), B3aRunAction::BeginOfRunAction(), HadrontherapyRunAction::BeginOfRunAction(), B1RunAction::BeginOfRunAction(), B3aRunAction::EndOfRunAction(), HadrontherapyRunAction::EndOfRunAction(), B1RunAction::EndOfRunAction(), and HadrontherapyRunAction::HadrontherapyRunAction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4AccumulableManager::Merge ( )

Definition at line 171 of file G4AccumulableManager.cc.

View newest version in sPHENIX GitHub at line 171 of file G4AccumulableManager.cc

References fgMasterInstance, fVector, G4endl, G4Exception(), G4Threading::IsWorkerThread(), it, JustWarning, and G4TemplateAutoLock< _Mutex_t >::unlock().

Referenced by B3aRunAction::EndOfRunAction(), HadrontherapyRunAction::EndOfRunAction(), and B1RunAction::EndOfRunAction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename T >
G4bool G4AccumulableManager::RegisterAccumulable ( G4Accumulable< T > &  accumulable)

Referenced by B1RunAction::B1RunAction(), B3aRunAction::B3aRunAction(), and HadrontherapyRunAction::HadrontherapyRunAction().

+ Here is the caller graph for this function:

G4bool G4AccumulableManager::RegisterAccumulable ( G4VAccumulable accumulable)

Definition at line 115 of file G4AccumulableManager.cc.

View newest version in sPHENIX GitHub at line 115 of file G4AccumulableManager.cc

References CheckName(), fMap, G4VAccumulable::fName, fVector, GenerateName(), and G4VAccumulable::GetName().

+ Here is the call graph for this function:

void G4AccumulableManager::Reset ( )

Definition at line 206 of file G4AccumulableManager.cc.

View newest version in sPHENIX GitHub at line 206 of file G4AccumulableManager.cc

References fVector, and it.

Referenced by B3aRunAction::BeginOfRunAction(), HadrontherapyRunAction::BeginOfRunAction(), and B1RunAction::BeginOfRunAction().

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<G4VAccumulable*> G4AccumulableManager::fAccumulablesToDelete
private

Definition at line 123 of file G4AccumulableManager.hh.

View newest version in sPHENIX GitHub at line 123 of file G4AccumulableManager.hh

Referenced by ~G4AccumulableManager().

G4ThreadLocal G4AccumulableManager * G4AccumulableManager::fgInstance = nullptr
staticprivate

Definition at line 118 of file G4AccumulableManager.hh.

View newest version in sPHENIX GitHub at line 118 of file G4AccumulableManager.hh

Referenced by G4AccumulableManager(), and Instance().

G4AccumulableManager * G4AccumulableManager::fgMasterInstance = nullptr
staticprivate

Definition at line 117 of file G4AccumulableManager.hh.

View newest version in sPHENIX GitHub at line 117 of file G4AccumulableManager.hh

Referenced by G4AccumulableManager(), and Merge().

std::map<G4String, G4VAccumulable*> G4AccumulableManager::fMap
private

Definition at line 122 of file G4AccumulableManager.hh.

View newest version in sPHENIX GitHub at line 122 of file G4AccumulableManager.hh

Referenced by CheckName(), GetAccumulable(), and RegisterAccumulable().

std::vector<G4VAccumulable*> G4AccumulableManager::fVector
private

Definition at line 121 of file G4AccumulableManager.hh.

View newest version in sPHENIX GitHub at line 121 of file G4AccumulableManager.hh

Referenced by GenerateName(), GetAccumulable(), Merge(), RegisterAccumulable(), and Reset().

const G4String G4AccumulableManager::kBaseName = "accumulable"
private

Definition at line 114 of file G4AccumulableManager.hh.

View newest version in sPHENIX GitHub at line 114 of file G4AccumulableManager.hh

Referenced by GenerateName().


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