MCPcopy Create free account
hub / github.com/Geant4/geant4 / AddEndOfRunModel

Method AddEndOfRunModel

source/visualization/management/src/G4Scene.cc:205–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205G4bool G4Scene::AddEndOfRunModel (G4VModel* pModel, G4bool warn) {
206 std::size_t i, nModels = fEndOfRunModelList.size ();
207 for (i = 0; i < nModels; ++i) {
208 if (pModel -> GetGlobalDescription () ==
209 fEndOfRunModelList[i].fpModel -> GetGlobalDescription ()) break;
210 }
211 if (i < nModels) {
212 if (warn) {
213 G4warn << "G4Scene::AddEndOfRunModel: a model \""
214 << pModel -> GetGlobalDescription ()
215 << "\"\n is already in the end-of-run list of scene \""
216 << fName << "\"."
217 << G4endl;
218 }
219 return false;
220 }
221 fEndOfRunModelList.push_back (pModel);
222 CalculateExtent ();
223 return true;
224}
225
226std::ostream& operator << (std::ostream& os, const G4Scene& scene) {
227

Callers 2

SetNewValueMethod · 0.80
AddVisActionMethod · 0.80

Calls 2

sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected