64 <<
"G4AccumulableAnalysisManager already exists."
65 <<
"Cannot create another instance.";
66 G4Exception(
"G4AccumulableAnalysisManager::G4AccumulableAnalysisManager()",
90 std::ostringstream os;
100 if (
fMap.find(name) ==
fMap.end() )
return true;
103 description <<
" " <<
"Name " << name <<
" is already used." <<
G4endl;
104 description <<
" " <<
"Paremeter will be not created/registered.";
105 G4String method(
"G4AccumulableManager::");
121 if ( !
CheckName(
name,
"RegisterAccumulable") )
return false;
124 if ( !
name.length() ) {
130 fVector.push_back(accumulable);
139 auto it =
fMap.find(name);
140 if ( it ==
fMap.end() ) {
143 description <<
" " <<
"accumulable " << name <<
" does not exist.";
144 G4Exception(
"G4AccumulableManager::GetAccumulable",
161 description <<
" " <<
"accumulable " <<
id <<
" does not exist.";
162 G4Exception(
"G4AccumulableManager::GetAccumulable",
182 <<
" " <<
"No master G4AccumulableManager instance exists."
184 <<
" " <<
"Accumulables will not be merged.";
201 itMaster->Merge(*(*(it++)));
G4bool CheckName(const G4String &name, const G4String &where) const
std::ostringstream G4ExceptionDescription
static G4ThreadLocal G4AccumulableManager * fgInstance
virtual ~G4AccumulableManager()
G4Accumulable< T > * GetAccumulable(const G4String &name, G4bool warn=true) const
std::map< G4String, G4VAccumulable * > fMap
#define G4MUTEX_INITIALIZER
G4String GenerateName() const
G4bool RegisterAccumulable(G4Accumulable< T > &accumulable)
G4AccumulableManager(G4bool isMaster)
static G4AccumulableManager * Instance()
static G4AccumulableManager * fgMasterInstance
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::vector< G4VAccumulable * > fVector
G4String & append(const G4String &)
std::vector< G4VAccumulable * > fAccumulablesToDelete