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

Method DrawEndOfRunModels

source/visualization/management/src/G4VSceneHandler.cc:918–945  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

916}
917
918void G4VSceneHandler::DrawEndOfRunModels()
919{
920 if(!fpViewer->ReadyToDraw()) return;
921 const std::vector<G4Scene::Model>& EORModelList =
922 fpScene -> GetEndOfRunModelList ();
923 std::size_t nModels = EORModelList.size();
924 if (nModels) {
925 G4ModelingParameters* pMP = CreateModelingParameters();
926 pMP->SetEvent(0);
927 for (std::size_t i = 0; i < nModels; ++i) {
928 if (EORModelList[i].fActive) {
929 fpModel = EORModelList[i].fpModel;
930 fpModel -> SetModelingParameters(pMP);
931
932 // Describe to the current scene handler
933 fpModel -> DescribeYourselfTo (*this);
934
935 // Enter models in the scene tree
936 fpViewer->InsertModelInSceneTree(fpModel);
937
938 // Reset modeling parameters pointer
939 fpModel -> SetModelingParameters(0);
940 }
941 }
942 fpModel = 0;
943 delete pMP;
944 }
945}
946
947G4ModelingParameters* G4VSceneHandler::CreateModelingParameters ()
948{

Callers 1

EndOfRunMethod · 0.80

Calls 5

SetEventMethod · 0.80
ReadyToDrawMethod · 0.45
sizeMethod · 0.45
DescribeYourselfToMethod · 0.45

Tested by

no test coverage detected