51 mapModels::iterator it;
62 mapModels::const_iterator it = right.
fModels.begin();
64 for (; it != right.
fModels.end(); it++)
66 fModels[it->first] = it->second->Clone();
74 if (
this == &rhs)
return *
this;
81 mapModels::iterator it =
fModels.begin();
83 for (; it !=
fModels.end(); it++)
100 <<
"You are trying to insert a new model after initialization of th model manager.";
101 G4Exception(
"G4ITModelManager::SetModel",
"ITModelManager001",
104 fModels[startingTime] = aModel;
111 mapModels::reverse_iterator rit =
fModels.rbegin();
114 if (globalTime > rit->first)
120 mapModels::iterator it =
fModels.begin();
122 if (globalTime < it->
first)
125 exceptionDescription <<
"No model was found at time ";
126 exceptionDescription <<
G4BestUnit(globalTime,
"Time");
127 exceptionDescription <<
". The first model is registered at time : ";
128 exceptionDescription <<
G4BestUnit(it->first,
"Time") <<
". ";
129 G4Exception(
"G4ITModelManager::GetModel",
"ITModelManager003",
133 it =
fModels.lower_bound(globalTime);
135 if (it !=
fModels.end())
return it->second;
141 exceptionDescription <<
"No model was found.";
142 G4Exception(
"G4ITModelManager::GetModel",
"ITModelManager004",
virtual void Initialize()
std::ostringstream G4ExceptionDescription
void SetModel(G4VITStepModel *aModel, G4double startingTime)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4ITModelManager & operator=(const G4ITModelManager &rhs)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4VITStepModel * GetModel(const G4double globalTime)
const XML_Char XML_Content * model