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

Method DrawEvent

source/visualization/management/src/G4VSceneHandler.cc:889–916  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

887}
888
889void G4VSceneHandler::DrawEvent(const G4Event* event)
890{
891 if(!fpViewer->ReadyToDraw()) return;
892 const std::vector<G4Scene::Model>& EOEModelList =
893 fpScene -> GetEndOfEventModelList ();
894 std::size_t nModels = EOEModelList.size();
895 if (nModels) {
896 G4ModelingParameters* pMP = CreateModelingParameters();
897 pMP->SetEvent(event);
898 for (std::size_t i = 0; i < nModels; ++i) {
899 if (EOEModelList[i].fActive) {
900 fpModel = EOEModelList[i].fpModel;
901 fpModel -> SetModelingParameters(pMP);
902
903 // Describe to the current scene handler
904 fpModel -> DescribeYourselfTo (*this);
905
906 // Enter models in the scene tree
907 fpViewer->InsertModelInSceneTree(fpModel);
908
909 // Reset modeling parameters pointer
910 fpModel -> SetModelingParameters(0);
911 }
912 }
913 fpModel = 0;
914 delete pMP;
915 }
916}
917
918void G4VSceneHandler::DrawEndOfRunModels()
919{

Callers 2

G4VisSubThreadMethod · 0.80
EndOfEventKernelMethod · 0.80

Calls 5

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

Tested by

no test coverage detected