71 std::ostringstream os;
74 name.append(os.str());
84 description <<
"Name " <<
name <<
" is already used." <<
G4endl;
85 description <<
"Parameter will be not created/registered.";
86 G4String method(
"G4AccumulableManager::");
102 if ( !
CheckName(
name,
"RegisterAccumulable") )
return false;
105 if ( !
name.length() ) {
111 fVector.push_back(accumulable);
121 if ( it ==
fMap.end() ) {
124 description <<
"Accumulable " <<
name <<
" does not exist.";
125 G4Exception(
"G4AccumulableManager::GetAccumulable",
142 description <<
"Accumulable " <<
id <<
" does not exist.";
143 G4Exception(
"G4AccumulableManager::GetAccumulable",
163 <<
"No master G4AccumulableManager instance exists." <<
G4endl
164 <<
"Accumulables will not be merged.";
181 itMaster->Merge(*(*(it++)));
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
#define G4MUTEX_INITIALIZER
G4String GenerateName() const
std::vector< G4VAccumulable * > fVector
G4Accumulable< T > * GetAccumulable(const G4String &name, G4bool warn=true) const
std::map< G4String, G4VAccumulable * > fMap
virtual ~G4AccumulableManager()
static G4AccumulableManager * Instance()
std::vector< G4VAccumulable * > fAccumulablesToDelete
G4bool RegisterAccumulable(G4Accumulable< T > &accumulable)
static G4AccumulableManager * fgMasterInstance
G4bool CheckName(const G4String &name, const G4String &where) const
const char * name(G4int ptype)