48 mapModels::iterator it ;
59 mapModels::const_iterator it = right.
fModels.begin();
61 for ( ; it != right.
fModels.end() ; it++)
63 fModels[it->first] = it->second->Clone();
71 if (
this == &rhs)
return *
this;
78 mapModels::iterator it =
fModels.begin();
80 for( ; it !=
fModels.end() ; it ++)
96 exceptionDescription <<
"You are trying to insert a new model after initialization of th model manager.";
97 G4Exception(
"G4ITModelManager::SetModel",
"ITModelManager001",
100 fModels[startingTime] = aModel;
107 mapModels::reverse_iterator rit =
fModels.rbegin();
110 if(globalTime > rit->first)
116 mapModels::iterator it =
fModels.begin();
118 if(globalTime < it->first)
121 exceptionDescription <<
"No model was found at time ";
122 exceptionDescription <<
G4BestUnit(globalTime,
"Time");
123 exceptionDescription <<
". The first model is registered at time : ";
124 exceptionDescription <<
G4BestUnit(it->first,
"Time") <<
". ";
125 G4Exception(
"G4ITModelManager::GetModel",
"ITModelManager003",
129 it =
fModels.lower_bound(globalTime);
131 if(it !=
fModels.end())
return it->second;
137 exceptionDescription <<
"No model was found.";
138 G4Exception(
"G4ITModelManager::GetModel",
"ITModelManager004",
std::ostringstream G4ExceptionDescription
G4VITModel * GetModel(const G4double globalTime)
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
Define what to do before stepping and after stepping.
void SetModel(G4VITModel *aModel, G4double startingTime)
G4ITModelManager & operator=(const G4ITModelManager &rhs)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual void Initialize()
G4ITModelManager chooses which model to use according to the global simulation time.