Geant4-11
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes
PyG4VisManager Class Reference
Inheritance diagram for PyG4VisManager:
G4VisManager G4VVisManager

Public Types

enum  Verbosity {
  quiet , startup , errors , warnings ,
  confirmations , parameters , all
}
 

Public Member Functions

void BeginDraw (const G4Transform3D &objectTransformation=G4Transform3D())
 
void BeginDraw2D (const G4Transform3D &objectTransformation=G4Transform3D())
 
void CreateSceneHandler (const G4String &name="")
 
void CreateViewer (const G4String &name="", const G4String &XGeometry="")
 
const G4VTrajectoryModelCurrentTrajDrawModel () const
 
void Disable ()
 
void DispatchToModel (const G4VTrajectory &)
 
void Draw (const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())
 
void Draw (const G4LogicalVolume &, const G4VisAttributes &, const G4Transform3D &objectTransformation=G4Transform3D())
 
void Draw (const G4Polyhedron &, const G4Transform3D &objectTransformation=G4Transform3D())
 
void Draw (const G4Polyline &, const G4Transform3D &objectTransformation=G4Transform3D())
 
void Draw (const G4Polymarker &, const G4Transform3D &objectTransformation=G4Transform3D())
 
void Draw (const G4Square &, const G4Transform3D &objectTransformation=G4Transform3D())
 
void Draw (const G4Text &, const G4Transform3D &objectTransformation=G4Transform3D())
 
void Draw (const G4VDigi &)
 
void Draw (const G4VHit &)
 
void Draw (const G4VPhysicalVolume &, const G4VisAttributes &, const G4Transform3D &objectTransformation=G4Transform3D())
 
void Draw (const G4VSolid &, const G4VisAttributes &, const G4Transform3D &objectTransformation=G4Transform3D())
 
void Draw (const G4VTrajectory &)
 
void Draw2D (const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())
 
void Draw2D (const G4Polyhedron &, const G4Transform3D &objectTransformation=G4Transform3D())
 
void Draw2D (const G4Polyline &, const G4Transform3D &objectTransformation=G4Transform3D())
 
void Draw2D (const G4Polymarker &, const G4Transform3D &objectTransformation=G4Transform3D())
 
void Draw2D (const G4Square &, const G4Transform3D &objectTransformation=G4Transform3D())
 
void Draw2D (const G4Text &, const G4Transform3D &objectTransformation=G4Transform3D())
 
void Enable ()
 
void EndDraw ()
 
void EndDraw2D ()
 
G4bool FilterDigi (const G4VDigi &)
 
G4bool FilterHit (const G4VHit &)
 
G4bool FilterTrajectory (const G4VTrajectory &)
 
void GeometryHasChanged ()
 
G4bool GetAbortReviewKeptEvents () const
 
const G4GraphicsSystemListGetAvailableGraphicsSystems ()
 
const G4SceneHandlerListGetAvailableSceneHandlers () const
 
G4VGraphicsSystemGetCurrentGraphicsSystem () const
 
G4SceneGetCurrentScene () const
 
G4VSceneHandlerGetCurrentSceneHandler () const
 
G4VViewerGetCurrentViewer () const
 
const G4ViewParametersGetDefaultViewParameters () const
 
G4bool GetDrawEventOnlyIfToBeKept () const
 
const std::vector< UserVisAction > & GetEndOfEventUserVisActions () const
 
const std::vector< UserVisAction > & GetEndOfRunUserVisActions () const
 
G4int GetNKeepRequests () const
 
const G4EventGetRequestedEvent () const
 
G4bool GetReviewingKeptEvents () const
 
const std::vector< UserVisAction > & GetRunDurationUserVisActions () const
 
const G4SceneListGetSceneList () const
 
G4bool GetTransientsDrawnThisEvent () const
 
G4bool GetTransientsDrawnThisRun () const
 
const std::map< G4VUserVisAction *, G4VisExtent > & GetUserVisActionExtents () const
 
G4VViewerGetViewer (const G4String &viewerName) const
 
void IgnoreStateChanges (G4bool)
 
void Initialise ()
 
void Initialize ()
 
void NotifyHandlers ()
 
 PyG4VisManager ()
 
void RegisterEndOfEventUserVisAction (const G4String &name, G4VUserVisAction *, const G4VisExtent &=G4VisExtent())
 
void RegisterEndOfRunUserVisAction (const G4String &name, G4VUserVisAction *, const G4VisExtent &=G4VisExtent())
 
G4bool RegisterGraphicsSystem (G4VGraphicsSystem *)
 
virtual void RegisterGraphicsSystems ()
 
void RegisterMessenger (G4UImessenger *messenger)
 
void RegisterModel (G4VFilter< G4VDigi > *filter)
 
void RegisterModel (G4VFilter< G4VHit > *filter)
 
void RegisterModel (G4VFilter< G4VTrajectory > *filter)
 
void RegisterModel (G4VTrajectoryModel *model)
 
virtual void RegisterModelFactories ()
 
void RegisterModelFactory (G4DigiFilterFactory *factory)
 
void RegisterModelFactory (G4HitFilterFactory *factory)
 
void RegisterModelFactory (G4TrajDrawModelFactory *factory)
 
void RegisterModelFactory (G4TrajFilterFactory *factory)
 
void RegisterRunDurationUserVisAction (const G4String &name, G4VUserVisAction *, const G4VisExtent &=G4VisExtent())
 
void ResetTransientsDrawnFlags ()
 
void SelectTrajectoryModel (const G4String &model)
 
void SetAbortReviewKeptEvents (G4bool)
 
G4SceneHandlerListSetAvailableSceneHandlers ()
 
void SetCurrentGraphicsSystem (G4VGraphicsSystem *)
 
void SetCurrentScene (G4Scene *)
 
void SetCurrentSceneHandler (G4VSceneHandler *)
 
void SetCurrentViewer (G4VViewer *)
 
void SetDefaultViewParameters (const G4ViewParameters &)
 
void SetDrawEventOnlyIfToBeKept (G4bool)
 
void SetEventRefreshing (G4bool)
 
void SetRequestedEvent (const G4Event *)
 
void SetReviewingKeptEvents (G4bool)
 
G4SceneListSetSceneList ()
 
void SetTransientsDrawnThisEvent (G4bool)
 
void SetTransientsDrawnThisRun (G4bool)
 
void SetVerboseLevel (const G4String &)
 
void SetVerboseLevel (G4int)
 
void SetVerboseLevel (Verbosity)
 
G4String ViewerShortName (const G4String &viewerName) const
 
 ~PyG4VisManager ()
 

Static Public Member Functions

static PyG4VisManager_get_concrete_instance ()
 
static G4VVisManagerGetConcreteInstance ()
 
static G4VisManagerGetInstance ()
 
static Verbosity GetVerbosity ()
 
static Verbosity GetVerbosityValue (const G4String &)
 
static Verbosity GetVerbosityValue (G4int)
 
static G4String VerbosityString (Verbosity)
 

Static Public Attributes

static std::vector< G4StringVerbosityGuidanceStrings
 

Protected Member Functions

void PrintAvailableGraphicsSystems (Verbosity) const
 
void RegisterMessengers ()
 

Static Protected Member Functions

static void SetConcreteInstance (G4VVisManager *)
 

Protected Attributes

const G4int fVerbose
 

Static Protected Attributes

static G4VVisManagerfpConcreteInstance = 0
 

Private Member Functions

void BeginOfEvent ()
 
void BeginOfRun ()
 
void ClearTransientStoreIfMarked ()
 
template<class T >
void DrawT (const T &graphics_primitive, const G4Transform3D &objectTransform)
 
template<class T >
void DrawT2D (const T &graphics_primitive, const G4Transform3D &objectTransform)
 
void EndOfEvent ()
 
void EndOfRun ()
 
void InitialiseG4ColourMap () const
 
G4bool IsValidView ()
 
void PrintAvailableColours (Verbosity) const
 
void PrintAvailableModels (Verbosity) const
 
void PrintAvailableUserVisActions (Verbosity) const
 
void PrintInvalidPointers () const
 

Private Attributes

G4bool fAbortReviewKeptEvents
 
G4GraphicsSystemList fAvailableGraphicsSystems
 
G4SceneHandlerList fAvailableSceneHandlers
 
G4ViewParameters fDefaultViewParameters
 
std::vector< G4UIcommand * > fDirectoryList
 
G4bool fDrawEventOnlyIfToBeKept
 
G4int fDrawGroupNestingDepth
 
std::vector< UserVisActionfEndOfEventUserVisActions
 
std::vector< UserVisActionfEndOfRunUserVisActions
 
G4bool fEventKeepingSuspended
 
G4bool fEventRefreshing
 
G4bool fIgnoreStateChanges
 
G4bool fInitialised
 
G4bool fIsDrawGroup
 
std::vector< G4UImessenger * > fMessengerList
 
G4int fNKeepRequests
 
G4int fNoOfEventsDrawnThisRun
 
G4VisFilterManager< G4VDigi > * fpDigiFilterMgr
 
G4VGraphicsSystemfpGraphicsSystem
 
G4VisFilterManager< G4VHit > * fpHitFilterMgr
 
const G4EventfpRequestedEvent
 
G4ScenefpScene
 
G4VSceneHandlerfpSceneHandler
 
G4VisStateDependentfpStateDependent
 
G4VisModelManager< G4VTrajectoryModel > * fpTrajDrawModelMgr
 
G4VisFilterManager< G4VTrajectory > * fpTrajFilterMgr
 
G4VViewerfpViewer
 
G4bool fReviewingKeptEvents
 
std::vector< UserVisActionfRunDurationUserVisActions
 
G4SceneList fSceneList
 
G4bool fTransientsDrawnThisEvent
 
G4bool fTransientsDrawnThisRun
 
std::map< G4VUserVisAction *, G4VisExtentfUserVisActionExtents
 

Static Private Attributes

static G4VisManagerfpInstance = 0
 
static Verbosity fVerbosity = G4VisManager::warnings
 

Detailed Description

Definition at line 40 of file pyG4VisManager.cc.

Member Enumeration Documentation

◆ Verbosity

enum G4VisManager::Verbosity
inherited
Enumerator
quiet 
startup 
errors 
warnings 
confirmations 
parameters 
all 

Definition at line 137 of file G4VisManager.hh.

137 {
138 quiet, // Nothing is printed.
139 startup, // Startup and endup messages are printed...
140 errors, // ...and errors...
141 warnings, // ...and warnings...
142 confirmations, // ...and confirming messages...
143 parameters, // ...and parameters of scenes and views...
144 all // ...and everything available.
145 };

Constructor & Destructor Documentation

◆ PyG4VisManager()

PyG4VisManager::PyG4VisManager ( )
inline

Definition at line 42 of file pyG4VisManager.cc.

void SetVerboseLevel(G4int)

References G4VisManager::quiet, and G4VisManager::SetVerboseLevel().

◆ ~PyG4VisManager()

PyG4VisManager::~PyG4VisManager ( )
inline

Definition at line 43 of file pyG4VisManager.cc.

43{ }

Member Function Documentation

◆ _get_concrete_instance()

static PyG4VisManager * PyG4VisManager::_get_concrete_instance ( )
inlinestatic

Definition at line 45 of file pyG4VisManager.cc.

45 {
46 return dynamic_cast<PyG4VisManager*>(fpConcreteInstance);
47 }
static G4VVisManager * fpConcreteInstance

References G4VVisManager::fpConcreteInstance.

Referenced by export_G4VisManager().

◆ BeginDraw()

void G4VisManager::BeginDraw ( const G4Transform3D objectTransformation = G4Transform3D())
virtualinherited

Implements G4VVisManager.

Definition at line 830 of file G4VisManager.cc.

831{
832#ifdef G4MULTITHREADED
833 if (G4Threading::IsWorkerThread()) return;
834#endif
836 if (fDrawGroupNestingDepth > 1) {
838 ("G4VisManager::BeginDraw",
839 "visman0008", JustWarning,
840 "Nesting detected. It is illegal to nest Begin/EndDraw."
841 "\n Ignored");
842 return;
843 }
844 if (IsValidView ()) {
846 fpSceneHandler -> BeginPrimitives (objectTransform);
847 fIsDrawGroup = true;
848 }
849}
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
G4bool IsValidView()
G4VSceneHandler * fpSceneHandler
void ClearTransientStoreIfMarked()
G4int fDrawGroupNestingDepth
G4bool fIsDrawGroup
G4bool IsWorkerThread()
Definition: G4Threading.cc:123

References G4VisManager::ClearTransientStoreIfMarked(), G4VisManager::fDrawGroupNestingDepth, G4VisManager::fIsDrawGroup, G4VisManager::fpSceneHandler, G4Exception(), G4VisManager::IsValidView(), G4Threading::IsWorkerThread(), and JustWarning.

◆ BeginDraw2D()

void G4VisManager::BeginDraw2D ( const G4Transform3D objectTransformation = G4Transform3D())
virtualinherited

Implements G4VVisManager.

Definition at line 867 of file G4VisManager.cc.

868{
869#ifdef G4MULTITHREADED
870 if (G4Threading::IsWorkerThread()) return;
871#endif
873 if (fDrawGroupNestingDepth > 1) {
875 ("G4VisManager::BeginDraw2D",
876 "visman0009", JustWarning,
877 "Nesting detected. It is illegal to nest Begin/EndDraw2D."
878 "\n Ignored");
879 return;
880 }
881 if (IsValidView ()) {
883 fpSceneHandler -> BeginPrimitives2D (objectTransform);
884 fIsDrawGroup = true;
885 }
886}

References G4VisManager::ClearTransientStoreIfMarked(), G4VisManager::fDrawGroupNestingDepth, G4VisManager::fIsDrawGroup, G4VisManager::fpSceneHandler, G4Exception(), G4VisManager::IsValidView(), G4Threading::IsWorkerThread(), and JustWarning.

◆ BeginOfEvent()

void G4VisManager::BeginOfEvent ( )
privateinherited

Definition at line 1964 of file G4VisManager.cc.

1965{
1966 if (fIgnoreStateChanges) return;
1967
1968 if (!GetConcreteInstance()) return;
1969
1970// G4cout << "G4VisManager::BeginOfEvent: thread: "
1971// << G4Threading::G4GetThreadId() << G4endl;
1972
1973 // Some instructions that should NOT be in multithreaded version.
1974#ifndef G4MULTITHREADED
1975 // These instructions are in G4VisSubThread for multithreading.
1978#endif
1979}
void SetTransientsDrawnThisEvent(G4bool)
static G4VVisManager * GetConcreteInstance()
G4bool fIgnoreStateChanges
G4bool fTransientsDrawnThisEvent

References G4VisManager::fIgnoreStateChanges, G4VisManager::fpSceneHandler, G4VisManager::fTransientsDrawnThisEvent, G4VVisManager::GetConcreteInstance(), and G4VSceneHandler::SetTransientsDrawnThisEvent().

◆ BeginOfRun()

void G4VisManager::BeginOfRun ( )
privateinherited

Definition at line 1906 of file G4VisManager.cc.

1907{
1908 if (fIgnoreStateChanges) return;
1909
1910#ifdef G4MULTITHREADED
1911 if (G4Threading::IsWorkerThread()) return;
1912#endif
1913 // G4cout << "G4VisManager::BeginOfRun: thread: "
1914 // << G4Threading::G4GetThreadId() << G4endl;
1915
1917
1918 // For a fake run...
1919 G4int nEventsToBeProcessed = runManager->GetNumberOfEventsToBeProcessed();
1920 if (nEventsToBeProcessed == 0) return;
1921
1922 fNKeepRequests = 0;
1923 fEventKeepingSuspended = false;
1927
1928 // Check to see if the user has created a trajectory model. If not, create
1929 // a default one. To avoid code duplication the following function is used
1930 // and its result (a const G4VTrajectoryModel*) is thrown away at this point.
1931 // The function is called again later when needed.
1933
1934#ifdef G4MULTITHREADED
1935// There is a static method G4Threading::IsMultithreadedApplication()
1936// that returns true only if G4MTRunManager is instantiated with MT
1937// installation. Thus method returns false if G4RunManager base class is
1938// instantiated even with the MT installation, or of course with sequential
1939// installation.
1941
1942 // Inform viewer that we have finished all master thread drawing for now...
1943 if (fpViewer) fpViewer->DoneWithMasterThread();
1944
1945 // Start vis sub-thread
1946// G4cout << "G4VisManager::BeginOfRun: Starting vis sub-thread" << G4endl;
1947 G4MUTEXLOCK(&mtVisSubThreadMutex);
1948 mtRunInProgress = true;
1949 G4MUTEXUNLOCK(&mtVisSubThreadMutex);
1950 mtVisSubThread = new G4Thread;
1951 // Launch vis thread
1952 G4THREADCREATE(mtVisSubThread,G4VisSubThread,this);
1953
1954 // Tricky things for some viewers (e.g., Qt):
1955 // - Launch the vis thread
1956 // - Wait for the vis thread to set its QThread
1957 // - Then move current QOpenGL context (if Qt) to this Qthread
1958 // - Go ahead
1959 if (fpViewer) fpViewer->MovingToVisSubThread();
1960 }
1961#endif
1962}
#define G4MUTEXLOCK(mutex)
Definition: G4Threading.hh:251
void G4THREADCREATE(_Worker *&worker, _Func func, _Args... args)
Definition: G4Threading.hh:268
#define G4MUTEXUNLOCK(mutex)
Definition: G4Threading.hh:254
G4DummyThread G4Thread
Definition: G4Threading.hh:247
int G4int
Definition: G4Types.hh:85
static G4RunManager * GetMasterRunManager()
G4int GetNumberOfEventsToBeProcessed() const
void SetTransientsDrawnThisRun(G4bool)
G4bool fEventKeepingSuspended
const G4VTrajectoryModel * CurrentTrajDrawModel() const
G4int fNoOfEventsDrawnThisRun
G4VViewer * fpViewer
G4int fNKeepRequests
G4bool fTransientsDrawnThisRun
G4bool IsMultithreadedApplication()
Definition: G4Threading.cc:130

References G4VisManager::CurrentTrajDrawModel(), G4VisManager::fEventKeepingSuspended, G4VisManager::fIgnoreStateChanges, G4VisManager::fNKeepRequests, G4VisManager::fNoOfEventsDrawnThisRun, G4VisManager::fpSceneHandler, G4VisManager::fpViewer, G4VisManager::fTransientsDrawnThisRun, G4MUTEXLOCK, G4MUTEXUNLOCK, G4THREADCREATE(), G4RunManagerFactory::GetMasterRunManager(), G4RunManager::GetNumberOfEventsToBeProcessed(), G4Threading::IsMultithreadedApplication(), G4Threading::IsWorkerThread(), and G4VSceneHandler::SetTransientsDrawnThisRun().

◆ ClearTransientStoreIfMarked()

void G4VisManager::ClearTransientStoreIfMarked ( )
privateinherited

Definition at line 2341 of file G4VisManager.cc.

2341 {
2342 // Assumes valid view.
2346 }
2347 // Record if transients drawn. These local flags are only set
2348 // *after* ClearTransientStore. In the code in G4VSceneHandler
2349 // triggered by ClearTransientStore, use these flags so that
2350 // event refreshing is not done too early.
2353}
virtual void ClearTransientStore()
G4bool GetTransientsDrawnThisEvent() const
void SetMarkForClearingTransientStore(G4bool)
G4bool GetTransientsDrawnThisRun() const
G4bool GetMarkForClearingTransientStore() const

References G4VSceneHandler::ClearTransientStore(), G4VisManager::fpSceneHandler, G4VisManager::fTransientsDrawnThisEvent, G4VisManager::fTransientsDrawnThisRun, G4VSceneHandler::GetMarkForClearingTransientStore(), G4VSceneHandler::GetTransientsDrawnThisEvent(), G4VSceneHandler::GetTransientsDrawnThisRun(), and G4VSceneHandler::SetMarkForClearingTransientStore().

Referenced by G4VisManager::BeginDraw(), G4VisManager::BeginDraw2D(), G4VisManager::Draw(), G4VisManager::DrawT(), G4VisManager::DrawT2D(), and G4VisManager::EndOfEvent().

◆ CreateSceneHandler()

void G4VisManager::CreateSceneHandler ( const G4String name = "")
inherited

Definition at line 1135 of file G4VisManager.cc.

1135 {
1136 if (!fInitialised) Initialise ();
1137 if (fpGraphicsSystem) {
1138 G4VSceneHandler* pSceneHandler =
1140 if (pSceneHandler) {
1141 fAvailableSceneHandlers.push_back (pSceneHandler);
1142 fpSceneHandler = pSceneHandler; // Make current.
1143 }
1144 else {
1145 if (fVerbosity >= errors) {
1146 G4cout << "ERROR in G4VisManager::CreateSceneHandler during "
1147 << fpGraphicsSystem -> GetName ()
1148 << " scene handler creation.\n No action taken."
1149 << G4endl;
1150 }
1151 }
1152 }
1153 else PrintInvalidPointers ();
1154}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
void CreateSceneHandler(const G4String &name="")
static Verbosity fVerbosity
void Initialise()
void PrintInvalidPointers() const
G4SceneHandlerList fAvailableSceneHandlers
G4VGraphicsSystem * fpGraphicsSystem
G4bool fInitialised
const char * name(G4int ptype)

References G4VisManager::CreateSceneHandler(), G4VisManager::errors, G4VisManager::fAvailableSceneHandlers, G4VisManager::fInitialised, G4VisManager::fpGraphicsSystem, G4VisManager::fpSceneHandler, G4VisManager::fVerbosity, G4cout, G4endl, G4VisManager::Initialise(), G4InuclParticleNames::name(), and G4VisManager::PrintInvalidPointers().

Referenced by G4VisManager::CreateSceneHandler().

◆ CreateViewer()

void G4VisManager::CreateViewer ( const G4String name = "",
const G4String XGeometry = "" 
)
inherited

Definition at line 1156 of file G4VisManager.cc.

1158{
1159
1160 if (!fInitialised) Initialise ();
1161
1162 if (!fpSceneHandler) {
1164 return;
1165 }
1166
1168
1169 if (!p) {
1170 if (fVerbosity >= errors) {
1171 G4cerr << "ERROR in G4VisManager::CreateViewer: null pointer during "
1172 << fpGraphicsSystem -> GetName ()
1173 << " viewer creation.\n No action taken."
1174 << G4endl;
1175 }
1176 return;
1177 }
1178
1179 if (p -> GetViewId() < 0) {
1180 if (fVerbosity >= errors) {
1181 G4cerr << "ERROR in G4VisManager::CreateViewer during "
1182 << fpGraphicsSystem -> GetName ()
1183 << " viewer instantiation.\n No action taken."
1184 << G4endl;
1185 }
1186 return;
1187 }
1188
1189 // Viewer is created, now we can set geometry parameters
1190 // Before 12/2008, it was done in G4VViewer.cc but it did not have to be there!
1191
1192 G4ViewParameters initialvp = p -> GetViewParameters();
1193 initialvp.SetXGeometryString(XGeometry); //parse string and store parameters
1194 p -> SetViewParameters(initialvp);
1195 p -> Initialise (); // (Viewer itself may change view parameters further.)
1196 if (p -> GetViewId() < 0) {
1197 if (fVerbosity >= errors) {
1198 G4cerr << "ERROR in G4VisManager::CreateViewer during "
1199 << fpGraphicsSystem -> GetName ()
1200 << " viewer initialisation.\n No action taken."
1201 << G4endl;
1202 }
1203 return;
1204 }
1205
1206 fpViewer = p; // Make current.
1207 fpSceneHandler -> AddViewerToList (fpViewer);
1209 if (fVerbosity >= confirmations) {
1210 G4cout << "G4VisManager::CreateViewer: new viewer created."
1211 << G4endl;
1212 }
1213
1215 if (fVerbosity >= parameters) {
1216 G4cout << " view parameters are:\n " << vp << G4endl;
1217 }
1218
1219 if (vp.IsCulling () && vp.IsCullingInvisible ()) {
1220 static G4bool warned = false;
1221 if (fVerbosity >= confirmations) {
1222 if (!warned) {
1223 G4cout <<
1224 "NOTE: objects with visibility flag set to \"false\""
1225 " will not be drawn!"
1226 "\n \"/vis/viewer/set/culling global false\" to Draw such objects."
1227 "\n Also see other \"/vis/viewer/set\" commands."
1228 << G4endl;
1229 warned = true;
1230 }
1231 }
1232 }
1233 if (vp.IsCullingCovered ()) {
1234 static G4bool warned = false;
1235 if (fVerbosity >= warnings) {
1236 if (!warned) {
1237 G4cout <<
1238 "WARNING: covered objects in solid mode will not be rendered!"
1239 "\n \"/vis/viewer/set/culling coveredDaughters false\" to reverse this."
1240 "\n Also see other \"/vis/viewer/set\" commands."
1241 << G4endl;
1242 warned = true;
1243 }
1244 }
1245 }
1246}
bool G4bool
Definition: G4Types.hh:86
G4GLOB_DLL std::ostream G4cerr
const G4ViewParameters & GetViewParameters() const
void SetXGeometryString(const G4String &)
G4bool IsCulling() const
G4bool IsCullingInvisible() const
G4bool IsCullingCovered() const
void SetCurrentViewer(G4VViewer *)
void CreateViewer(const G4String &name="", const G4String &XGeometry="")

References G4VisManager::confirmations, G4VisManager::CreateViewer(), G4VisManager::errors, G4VisManager::fInitialised, G4VisManager::fpGraphicsSystem, G4VisManager::fpSceneHandler, G4VisManager::fpViewer, G4VisManager::fVerbosity, G4cerr, G4cout, G4endl, G4VViewer::GetViewParameters(), G4VisManager::Initialise(), G4ViewParameters::IsCulling(), G4ViewParameters::IsCullingCovered(), G4ViewParameters::IsCullingInvisible(), G4InuclParticleNames::name(), G4VisManager::parameters, G4VisManager::PrintInvalidPointers(), G4VisManager::SetCurrentViewer(), G4ViewParameters::SetXGeometryString(), and G4VisManager::warnings.

Referenced by G4VisManager::CreateViewer().

◆ CurrentTrajDrawModel()

const G4VTrajectoryModel * G4VisManager::CurrentTrajDrawModel ( ) const
inherited

Definition at line 759 of file G4VisManager.cc.

760{
761 assert (0 != fpTrajDrawModelMgr);
762
764
765 if (0 == model) {
766 // No model was registered with the trajectory model manager.
767 // Use G4TrajectoryDrawByCharge as a fallback.
769 if (fVerbosity >= warnings) {
770 G4cout<<"G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model."<<G4endl;
771 G4cout<<"See commands in /vis/modeling/trajectories/ for other options."<<G4endl;
772 }
773 }
774
775 model = fpTrajDrawModelMgr->Current();
776 assert (0 != model); // Should definitely exist now
777
778 return model;
779}
G4VisModelManager< G4VTrajectoryModel > * fpTrajDrawModelMgr
const Model * Current() const
void Register(Model *)

References G4VisModelManager< Model >::Current(), G4VisManager::fpTrajDrawModelMgr, G4VisManager::fVerbosity, G4cout, G4endl, G4VisModelManager< Model >::Register(), and G4VisManager::warnings.

Referenced by G4HepRepFileSceneHandler::BeginModeling(), G4VisManager::BeginOfRun(), and G4VisManager::DispatchToModel().

◆ Disable()

void G4VisManager::Disable ( )
inherited

Definition at line 690 of file G4VisManager.cc.

690 {
692 if (fVerbosity >= confirmations) {
693 G4cout <<
694 "G4VisManager::Disable: visualization disabled."
695 "\n The pointer returned by GetConcreteInstance will be zero."
696 "\n Note that it will become enabled after some valid vis commands."
697 << G4endl;
698 }
699 if (fVerbosity >= warnings) {
700 G4int currentTrajectoryType =
702 if (currentTrajectoryType > 0) {
703 G4cout <<
704 "You may wish to disable trajectory production too:"
705 "\n \"/tracking/storeTrajectory 0\""
706 "\nbut don't forget to re-enable with"
707 "\n \"/vis/enable\""
708 "\n \"/tracking/storeTrajectory " << currentTrajectoryType
709 << "\"\n and maybe \"/vis/viewer/rebuild\""
710 << G4endl;
711 }
712 }
713}
static G4RunManagerKernel * GetRunManagerKernel()
G4TrackingManager * GetTrackingManager() const
G4int GetStoreTrajectory() const
static void SetConcreteInstance(G4VVisManager *)

References G4VisManager::confirmations, G4VisManager::fVerbosity, G4cout, G4endl, G4RunManagerKernel::GetRunManagerKernel(), G4TrackingManager::GetStoreTrajectory(), G4RunManagerKernel::GetTrackingManager(), G4VVisManager::SetConcreteInstance(), and G4VisManager::warnings.

Referenced by G4VisCommandEnable::SetNewValue(), and G4VisCommandReviewKeptEvents::SetNewValue().

◆ DispatchToModel()

void G4VisManager::DispatchToModel ( const G4VTrajectory trajectory)
virtualinherited

Implements G4VVisManager.

Definition at line 1389 of file G4VisManager.cc.

1390{
1391 G4bool visible(true);
1392
1393 // See if trajectory passes filter
1394 G4bool passed = FilterTrajectory(trajectory);
1395
1396 if (!passed) {
1397 // Draw invisible trajectory if trajectory failed filter and
1398 // are filtering in soft mode
1399 if (fpTrajFilterMgr->GetMode() == FilterMode::Soft) visible = false;
1400 else {return;}
1401 }
1402
1403 // Go on to draw trajectory
1404 assert (0 != fpTrajDrawModelMgr);
1405
1406 const G4VTrajectoryModel* trajectoryModel = CurrentTrajDrawModel();
1407
1408 assert (0 != trajectoryModel); // Should exist
1409
1410 if (IsValidView()) {
1411 trajectoryModel->Draw(trajectory, visible);
1412 }
1413}
virtual void Draw(const G4VTrajectory &trajectory, const G4bool &visible=true) const =0
FilterMode::Mode GetMode() const
G4VisFilterManager< G4VTrajectory > * fpTrajFilterMgr
G4bool FilterTrajectory(const G4VTrajectory &)

References G4VisManager::CurrentTrajDrawModel(), G4VTrajectoryModel::Draw(), G4VisManager::FilterTrajectory(), G4VisManager::fpTrajDrawModelMgr, G4VisManager::fpTrajFilterMgr, G4VisFilterManager< T >::GetMode(), G4VisManager::IsValidView(), and FilterMode::Soft.

◆ Draw() [1/12]

void G4VisManager::Draw ( const G4Circle circle,
const G4Transform3D objectTransformation = G4Transform3D() 
)
virtualinherited

Implements G4VVisManager.

Definition at line 950 of file G4VisManager.cc.

952{
953 DrawT (circle, objectTransform);
954}
void DrawT(const T &graphics_primitive, const G4Transform3D &objectTransform)

References G4VisManager::DrawT().

Referenced by G4VisManager::Draw(), and G4VVisCommand::DrawExtent().

◆ Draw() [2/12]

void G4VisManager::Draw ( const G4LogicalVolume logicalVol,
const G4VisAttributes attribs,
const G4Transform3D objectTransformation = G4Transform3D() 
)
virtualinherited

Implements G4VVisManager.

Definition at line 1081 of file G4VisManager.cc.

1083 {
1084#ifdef G4MULTITHREADED
1085 if (G4Threading::IsWorkerThread()) return;
1086#endif
1087 // Find corresponding solid.
1088 G4VSolid* pSol = logicalVol.GetSolid ();
1089 Draw (*pSol, attribs, objectTransform);
1090}
G4VSolid * GetSolid() const
void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())

References G4VisManager::Draw(), G4LogicalVolume::GetSolid(), and G4Threading::IsWorkerThread().

◆ Draw() [3/12]

void G4VisManager::Draw ( const G4Polyhedron polyhedron,
const G4Transform3D objectTransformation = G4Transform3D() 
)
virtualinherited

Implements G4VVisManager.

Definition at line 956 of file G4VisManager.cc.

958{
959 DrawT (polyhedron, objectTransform);
960}

References G4VisManager::DrawT().

◆ Draw() [4/12]

void G4VisManager::Draw ( const G4Polyline line,
const G4Transform3D objectTransformation = G4Transform3D() 
)
virtualinherited

Implements G4VVisManager.

Definition at line 962 of file G4VisManager.cc.

964{
965 DrawT (line, objectTransform);
966}

References G4VisManager::DrawT().

◆ Draw() [5/12]

void G4VisManager::Draw ( const G4Polymarker polymarker,
const G4Transform3D objectTransformation = G4Transform3D() 
)
virtualinherited

Implements G4VVisManager.

Definition at line 968 of file G4VisManager.cc.

970{
971 DrawT (polymarker, objectTransform);
972}

References G4VisManager::DrawT().

◆ Draw() [6/12]

void G4VisManager::Draw ( const G4Square square,
const G4Transform3D objectTransformation = G4Transform3D() 
)
virtualinherited

Implements G4VVisManager.

Definition at line 974 of file G4VisManager.cc.

976{
977 DrawT (square, objectTransform);
978}

References G4VisManager::DrawT().

◆ Draw() [7/12]

void G4VisManager::Draw ( const G4Text text,
const G4Transform3D objectTransformation = G4Transform3D() 
)
virtualinherited

Implements G4VVisManager.

Definition at line 980 of file G4VisManager.cc.

982{
983 DrawT (text, objectTransform);
984}

References G4VisManager::DrawT().

◆ Draw() [8/12]

void G4VisManager::Draw ( const G4VDigi digi)
virtualinherited

Implements G4VVisManager.

Definition at line 1036 of file G4VisManager.cc.

1036 {
1037#ifdef G4MULTITHREADED
1038 if (G4Threading::IsWorkerThread()) return;
1039#endif
1040 if (fIsDrawGroup) {
1041 fpSceneHandler -> AddCompound (digi);
1042 } else {
1043 if (IsValidView ()) {
1045 fpSceneHandler -> AddCompound (digi);
1046 }
1047 }
1048}

References G4VisManager::ClearTransientStoreIfMarked(), G4VisManager::fIsDrawGroup, G4VisManager::fpSceneHandler, G4VisManager::IsValidView(), and G4Threading::IsWorkerThread().

◆ Draw() [9/12]

void G4VisManager::Draw ( const G4VHit hit)
virtualinherited

Implements G4VVisManager.

Definition at line 1022 of file G4VisManager.cc.

1022 {
1023#ifdef G4MULTITHREADED
1024 if (G4Threading::IsWorkerThread()) return;
1025#endif
1026 if (fIsDrawGroup) {
1027 fpSceneHandler -> AddCompound (hit);
1028 } else {
1029 if (IsValidView ()) {
1031 fpSceneHandler -> AddCompound (hit);
1032 }
1033 }
1034}

References G4VisManager::ClearTransientStoreIfMarked(), G4VisManager::fIsDrawGroup, G4VisManager::fpSceneHandler, G4VisManager::IsValidView(), and G4Threading::IsWorkerThread().

◆ Draw() [10/12]

void G4VisManager::Draw ( const G4VPhysicalVolume physicalVol,
const G4VisAttributes attribs,
const G4Transform3D objectTransformation = G4Transform3D() 
)
virtualinherited

Implements G4VVisManager.

Definition at line 1112 of file G4VisManager.cc.

1114 {
1115#ifdef G4MULTITHREADED
1116 if (G4Threading::IsWorkerThread()) return;
1117#endif
1118 // Note: It is tempting to use a temporary model here, as for
1119 // trajectories, in order to get at the G4Atts of the physical
1120 // volume. I tried it (JA). But it's not easy to pass the
1121 // vis attributes. Also other aspects of the model seem not to
1122 // be properly set up. So, the idea has been abandoned for the time
1123 // being. The model pointer will be null. So when picking there
1124 // will be no G4Atts from this physical volume.
1125 //
1126 // If this is called from DrawHit, for example, the user may G4Atts to the
1127 // hit and these will be available with "/vis/scene/add/hits".
1128 //
1129 // Find corresponding logical volume and solid.
1130 G4LogicalVolume* pLV = physicalVol.GetLogicalVolume ();
1131 G4VSolid* pSol = pLV -> GetSolid ();
1132 Draw (*pSol, attribs, objectTransform);
1133}
G4LogicalVolume * GetLogicalVolume() const

References G4VisManager::Draw(), G4VPhysicalVolume::GetLogicalVolume(), and G4Threading::IsWorkerThread().

◆ Draw() [11/12]

void G4VisManager::Draw ( const G4VSolid solid,
const G4VisAttributes attribs,
const G4Transform3D objectTransformation = G4Transform3D() 
)
virtualinherited

Implements G4VVisManager.

Definition at line 1092 of file G4VisManager.cc.

1094 {
1095#ifdef G4MULTITHREADED
1096 if (G4Threading::IsWorkerThread()) return;
1097#endif
1098 if (fIsDrawGroup) {
1099 fpSceneHandler -> PreAddSolid (objectTransform, attribs);
1101 fpSceneHandler -> PostAddSolid ();
1102 } else {
1103 if (IsValidView ()) {
1105 fpSceneHandler -> PreAddSolid (objectTransform, attribs);
1107 fpSceneHandler -> PostAddSolid ();
1108 }
1109 }
1110}
virtual void DescribeYourselfTo(G4VGraphicsScene &scene) const =0

References G4VisManager::ClearTransientStoreIfMarked(), G4VSolid::DescribeYourselfTo(), G4VisManager::fIsDrawGroup, G4VisManager::fpSceneHandler, G4VisManager::IsValidView(), and G4Threading::IsWorkerThread().

◆ Draw() [12/12]

void G4VisManager::Draw ( const G4VTrajectory traj)
virtualinherited

Implements G4VVisManager.

Definition at line 1050 of file G4VisManager.cc.

1050 {
1051#ifdef G4MULTITHREADED
1052 if (G4Threading::IsWorkerThread()) return;
1053#endif
1054 // A trajectory needs a trajectories model to provide G4Atts, etc.
1055 static G4TrajectoriesModel trajectoriesModel;
1056 trajectoriesModel.SetCurrentTrajectory(&traj);
1058 const G4Run* currentRun = runManager->GetCurrentRun();
1059 if (currentRun) {
1060 trajectoriesModel.SetRunID(currentRun->GetRunID());
1061 }
1062 const G4Event* currentEvent =
1064 if (currentEvent) {
1065 trajectoriesModel.SetEventID(currentEvent->GetEventID());
1066 }
1067 if (fIsDrawGroup) {
1068 fpSceneHandler -> SetModel (&trajectoriesModel);
1069 fpSceneHandler -> AddCompound (traj);
1070 fpSceneHandler -> SetModel (0);
1071 } else {
1072 if (IsValidView ()) {
1074 fpSceneHandler -> SetModel (&trajectoriesModel);
1075 fpSceneHandler -> AddCompound (traj);
1076 fpSceneHandler -> SetModel (0);
1077 }
1078 }
1079}
const G4Event * GetConstCurrentEvent()
static G4EventManager * GetEventManager()
G4int GetEventID() const
Definition: G4Event.hh:118
const G4Run * GetCurrentRun() const
Definition: G4Run.hh:49
G4int GetRunID() const
Definition: G4Run.hh:78
void SetCurrentTrajectory(const G4VTrajectory *pTraj)
void SetEventID(G4int eventID)
void SetRunID(G4int runID)

References G4VisManager::ClearTransientStoreIfMarked(), G4VisManager::fIsDrawGroup, G4VisManager::fpSceneHandler, G4EventManager::GetConstCurrentEvent(), G4RunManager::GetCurrentRun(), G4Event::GetEventID(), G4EventManager::GetEventManager(), G4RunManagerFactory::GetMasterRunManager(), G4Run::GetRunID(), G4VisManager::IsValidView(), G4Threading::IsWorkerThread(), G4TrajectoriesModel::SetCurrentTrajectory(), G4TrajectoriesModel::SetEventID(), and G4TrajectoriesModel::SetRunID().

◆ Draw2D() [1/6]

void G4VisManager::Draw2D ( const G4Circle circle,
const G4Transform3D objectTransformation = G4Transform3D() 
)
virtualinherited

Implements G4VVisManager.

Definition at line 986 of file G4VisManager.cc.

988{
989 DrawT2D (circle, objectTransform);
990}
void DrawT2D(const T &graphics_primitive, const G4Transform3D &objectTransform)

References G4VisManager::DrawT2D().

◆ Draw2D() [2/6]

void G4VisManager::Draw2D ( const G4Polyhedron polyhedron,
const G4Transform3D objectTransformation = G4Transform3D() 
)
virtualinherited

Implements G4VVisManager.

Definition at line 992 of file G4VisManager.cc.

994{
995 DrawT2D (polyhedron, objectTransform);
996}

References G4VisManager::DrawT2D().

◆ Draw2D() [3/6]

void G4VisManager::Draw2D ( const G4Polyline line,
const G4Transform3D objectTransformation = G4Transform3D() 
)
virtualinherited

Implements G4VVisManager.

Definition at line 998 of file G4VisManager.cc.

1000{
1001 DrawT2D (line, objectTransform);
1002}

References G4VisManager::DrawT2D().

◆ Draw2D() [4/6]

void G4VisManager::Draw2D ( const G4Polymarker polymarker,
const G4Transform3D objectTransformation = G4Transform3D() 
)
virtualinherited

Implements G4VVisManager.

Definition at line 1004 of file G4VisManager.cc.

1006{
1007 DrawT2D (polymarker, objectTransform);
1008}

References G4VisManager::DrawT2D().

◆ Draw2D() [5/6]

void G4VisManager::Draw2D ( const G4Square square,
const G4Transform3D objectTransformation = G4Transform3D() 
)
virtualinherited

Implements G4VVisManager.

Definition at line 1010 of file G4VisManager.cc.

1012{
1013 DrawT2D (square, objectTransform);
1014}

References G4VisManager::DrawT2D().

◆ Draw2D() [6/6]

void G4VisManager::Draw2D ( const G4Text text,
const G4Transform3D objectTransformation = G4Transform3D() 
)
virtualinherited

Implements G4VVisManager.

Definition at line 1016 of file G4VisManager.cc.

1018{
1019 DrawT2D (text, objectTransform);
1020}

References G4VisManager::DrawT2D().

◆ DrawT()

template<class T >
void G4VisManager::DrawT ( const T &  graphics_primitive,
const G4Transform3D objectTransform 
)
privateinherited

Definition at line 904 of file G4VisManager.cc.

905 {
906#ifdef G4MULTITHREADED
907 if (G4Threading::IsWorkerThread()) return;
908#endif
909 if (fIsDrawGroup) {
910 if (objectTransform != fpSceneHandler->GetObjectTransformation()) {
912 ("G4VSceneHandler::DrawT",
913 "visman0010", FatalException,
914 "Different transform detected in Begin/EndDraw group.");
915 }
916 fpSceneHandler -> AddPrimitive (graphics_primitive);
917 } else {
918 if (IsValidView ()) {
920 fpSceneHandler -> BeginPrimitives (objectTransform);
921 fpSceneHandler -> AddPrimitive (graphics_primitive);
922 fpSceneHandler -> EndPrimitives ();
923 }
924 }
925}
@ FatalException
const G4Transform3D & GetObjectTransformation() const

References G4VisManager::ClearTransientStoreIfMarked(), FatalException, G4VisManager::fIsDrawGroup, G4VisManager::fpSceneHandler, G4Exception(), G4VSceneHandler::GetObjectTransformation(), G4VisManager::IsValidView(), and G4Threading::IsWorkerThread().

Referenced by G4VisManager::Draw().

◆ DrawT2D()

template<class T >
void G4VisManager::DrawT2D ( const T &  graphics_primitive,
const G4Transform3D objectTransform 
)
privateinherited

Definition at line 927 of file G4VisManager.cc.

928 {
929#ifdef G4MULTITHREADED
930 if (G4Threading::IsWorkerThread()) return;
931#endif
932 if (fIsDrawGroup) {
933 if (objectTransform != fpSceneHandler->GetObjectTransformation()) {
935 ("G4VSceneHandler::DrawT",
936 "visman0011", FatalException,
937 "Different transform detected in Begin/EndDraw2D group.");
938 }
939 fpSceneHandler -> AddPrimitive (graphics_primitive);
940 } else {
941 if (IsValidView ()) {
943 fpSceneHandler -> BeginPrimitives2D (objectTransform);
944 fpSceneHandler -> AddPrimitive (graphics_primitive);
945 fpSceneHandler -> EndPrimitives2D ();
946 }
947 }
948}

References G4VisManager::ClearTransientStoreIfMarked(), FatalException, G4VisManager::fIsDrawGroup, G4VisManager::fpSceneHandler, G4Exception(), G4VSceneHandler::GetObjectTransformation(), G4VisManager::IsValidView(), and G4Threading::IsWorkerThread().

Referenced by G4VisManager::Draw2D().

◆ Enable()

void G4VisManager::Enable ( )
inherited

Definition at line 662 of file G4VisManager.cc.

662 {
663 if (IsValidView ()) {
665 if (fVerbosity >= confirmations) {
666 G4cout << "G4VisManager::Enable: visualization enabled." << G4endl;
667 }
668 if (fVerbosity >= warnings) {
669 G4int nKeptEvents = 0;
671 if (run) nKeptEvents = run->GetEventVector()->size();
672 G4cout <<
673 "There are " << nKeptEvents << " kept events."
674 "\n \"/vis/reviewKeptEvents\" to review them one by one."
675 "\n \"/vis/viewer/flush\" or \"/vis/viewer/rebuild\" to see them accumulated."
676 << G4endl;
677 }
678 }
679 else {
680 if (fVerbosity >= warnings) {
681 G4cout <<
682 "G4VisManager::Enable: WARNING: visualization remains disabled for"
683 "\n above reasons. Rectifying with valid vis commands will"
684 "\n automatically enable."
685 << G4endl;
686 }
687 }
688}
static G4RunManager * GetRunManager()
Definition: run.py:1

References G4VisManager::confirmations, G4VisManager::fVerbosity, G4cout, G4endl, G4RunManager::GetCurrentRun(), G4RunManager::GetRunManager(), G4VisManager::IsValidView(), G4VVisManager::SetConcreteInstance(), and G4VisManager::warnings.

Referenced by G4VisCommandEnable::SetNewValue(), and G4VisCommandReviewKeptEvents::SetNewValue().

◆ EndDraw()

void G4VisManager::EndDraw ( )
virtualinherited

Implements G4VVisManager.

Definition at line 851 of file G4VisManager.cc.

852{
853#ifdef G4MULTITHREADED
854 if (G4Threading::IsWorkerThread()) return;
855#endif
857 if (fDrawGroupNestingDepth != 0) {
859 return;
860 }
861 if (IsValidView ()) {
862 fpSceneHandler -> EndPrimitives ();
863 }
864 fIsDrawGroup = false;
865}

References G4VisManager::fDrawGroupNestingDepth, G4VisManager::fIsDrawGroup, G4VisManager::fpSceneHandler, G4VisManager::IsValidView(), and G4Threading::IsWorkerThread().

◆ EndDraw2D()

void G4VisManager::EndDraw2D ( )
virtualinherited

Implements G4VVisManager.

Definition at line 888 of file G4VisManager.cc.

889{
890#ifdef G4MULTITHREADED
891 if (G4Threading::IsWorkerThread()) return;
892#endif
894 if (fDrawGroupNestingDepth != 0) {
896 return;
897 }
898 if (IsValidView ()) {
899 fpSceneHandler -> EndPrimitives2D ();
900 }
901 fIsDrawGroup = false;
902}

References G4VisManager::fDrawGroupNestingDepth, G4VisManager::fIsDrawGroup, G4VisManager::fpSceneHandler, G4VisManager::IsValidView(), and G4Threading::IsWorkerThread().

◆ EndOfEvent()

void G4VisManager::EndOfEvent ( )
privateinherited

Definition at line 1981 of file G4VisManager.cc.

1982{
1983 if (fIgnoreStateChanges) return;
1984
1985 if (!GetConcreteInstance()) return;
1986
1987 // Don't call IsValidView unless there is a scene handler. This
1988 // avoids WARNING message at end of event and run when the user has
1989 // not instantiated a scene handler, e.g., in batch mode.
1990 G4bool valid = fpSceneHandler && IsValidView();
1991 if (!valid) return;
1992
1993// G4cout << "G4VisManager::EndOfEvent: thread: "
1994// << G4Threading::G4GetThreadId() << G4endl;
1995
1996#ifdef G4MULTITHREADED
1997 G4AutoLock al(&visEndOfEventMutex);
1998 // Testing.
1999// std::this_thread::sleep_for(std::chrono::seconds(5));
2000#endif
2001
2003
2004 const G4Run* currentRun = runManager->GetCurrentRun();
2005 if (!currentRun) return;
2006
2007 // This gets the thread-local event manager
2009 const G4Event* currentEvent = eventManager->GetConstCurrentEvent();
2010 if (!currentEvent) return;
2011
2012 // Discard event if fDrawEventOnlyIfToBeKept flag is set unless the
2013 // user has requested the event to be kept.
2015 if (!currentEvent->ToBeKept()) return;
2016 }
2017
2019
2020#ifdef G4MULTITHREADED
2021
2022 // Wait if too many events in the queue.
2023 G4MUTEXLOCK(&mtVisSubThreadMutex);
2024 G4int eventQueueSize = mtVisEventQueue.size();
2025 G4MUTEXUNLOCK(&mtVisSubThreadMutex);
2026// G4cout << "Event queue size (1): " << eventQueueSize << G4endl;
2027
2028 G4bool eventQueueFull = false;
2029 while (fMaxEventQueueSize > 0 && eventQueueSize >= fMaxEventQueueSize) {
2030
2031// G4cout << "Event queue size (2): " << eventQueueSize << G4endl;
2032 if (fWaitOnEventQueueFull) {
2033 static G4bool warned = false;
2034 if (!warned) {
2035 G4cout <<
2036 "WARNING: The number of events in the visualisation queue has exceeded"
2037 "\n the maximum, "
2038 << fMaxEventQueueSize <<
2039 ".\n If, during a multithreaded run, the simulation gets ahead of the"
2040 "\n visualisation by more than this maximum, the simulation is delayed"
2041 "\n until the vis sub-thread has drawn a few more events and removed them"
2042 "\n from the queue. You may change this maximum number of events with"
2043 "\n \"/vis/multithreading/maxEventQueueSize <N>\", where N is the maximum"
2044 "\n number you wish to allow. N <= 0 means \"unlimited\"."
2045 "\n Alternatively you may choose to discard events for drawing by setting"
2046 "\n \"/vis/multithreading/actionOnEventQueueFull discard\"."
2047 "\n To avoid visualisation altogether: \"/vis/disable\"."
2048 "\n And maybe \"/tracking/storeTrajectories 0\"."
2049 << G4endl;
2050 warned = true;
2051 }
2052 // G4cout << "Event queue size (3): " << eventQueueSize << G4endl;
2053 // Wait a while to give event drawing time to reduce the queue...
2054 std::this_thread::sleep_for(std::chrono::milliseconds(100));
2055 // G4cout << "Event queue size (4): " << eventQueueSize << G4endl;
2056 } else {
2057 static G4bool warned = false;
2058 if (!warned) {
2059 G4cout <<
2060 "WARNING: The number of events in the visualisation queue has exceeded"
2061 "\n the maximum, "
2062 << fMaxEventQueueSize <<
2063 ".\n Some events have been discarded for drawing. You may change this"
2064 "\n behaviour with \"/vis/multithreading/actionOnEventQueueFull wait\"."
2065 "\n To avoid visualisation altogether: \"/vis/disable\"."
2066 "\n And maybe \"/tracking/storeTrajectories 0\"."
2067 << G4endl;
2068 warned = true;
2069 }
2070 eventQueueFull = true; // Causes event to be discarded for drawing.
2071 break;
2072 }
2073
2074 G4MUTEXLOCK(&mtVisSubThreadMutex);
2075 eventQueueSize = mtVisEventQueue.size();
2076 G4MUTEXUNLOCK(&mtVisSubThreadMutex);
2077 }
2078
2079 if (!eventQueueFull) {
2080 G4MUTEXLOCK(&mtVisSubThreadMutex);
2081 // Keep event for processing and put event on vis event queue
2082 currentEvent->KeepForPostProcessing();
2084 // Keep one event (cannot know which is last so any will do)
2085 if (fNKeepRequests == 0) {
2086 eventManager->KeepTheCurrentEvent();
2088 }
2089 }
2090 mtVisEventQueue.push_back(currentEvent);
2091 G4MUTEXUNLOCK(&mtVisSubThreadMutex);
2092 }
2093
2094// G4MUTEXLOCK(&mtVisSubThreadMutex);
2095// G4int eQS = mtVisEventQueue.size();
2096// G4MUTEXUNLOCK(&mtVisSubThreadMutex);
2097// G4cout << "Event queue size (5): " << eQS << G4endl;
2098
2099#endif
2100
2101 } else {
2102
2103 // Sequential mode
2104
2105 G4int nEventsToBeProcessed = 0;
2106 G4int nKeptEvents = 0;
2107 G4int eventID = -2; // (If no run manager, triggers ShowView as normal.)
2108 if (currentRun) {
2109 nEventsToBeProcessed = runManager->GetNumberOfEventsToBeProcessed();
2110 eventID = currentEvent->GetEventID();
2111 const std::vector<const G4Event*>* events = currentRun->GetEventVector();
2112 if (events) nKeptEvents = events->size();
2113 }
2114
2115 // We are about to draw the event (trajectories, etc.), but first we
2116 // have to clear the previous event(s) if necessary. If this event
2117 // needs to be drawn afresh, e.g., the first event or any event when
2118 // "accumulate" is not requested, the old event has to be cleared.
2119 // We have postponed this so that, for normal viewers like OGL, the
2120 // previous event(s) stay on screen until this new event comes
2121 // along. For a file-writing viewer the geometry has to be drawn.
2122 // See, for example, G4HepRepFileSceneHandler::ClearTransientStore.
2124
2125 // Now draw the event...
2126 fpSceneHandler->DrawEvent(currentEvent);
2128
2130
2131 // Unless last event (in which case wait end of run)...
2132 if (eventID < nEventsToBeProcessed - 1) {
2133 // ShowView guarantees the view is flushed to the screen. It also
2134 // triggers other features such picking (if enabled) and allows
2135 // file-writing viewers to close the file.
2136 fpViewer->ShowView();
2137 } else { // Last event...
2138 // Keep, but only if user has not kept any...
2139 if (nKeptEvents == 0) {
2140 eventManager->KeepTheCurrentEvent();
2142 }
2143 }
2145
2146 }
2147 }
2148
2149 // Both modes - sequential and MT
2150
2151 if (!(fpScene->GetRefreshAtEndOfEvent())) {
2152
2153 // Accumulating events...
2154
2155 G4int maxNumberOfKeptEvents = fpScene->GetMaxNumberOfKeptEvents();
2156
2157 if (maxNumberOfKeptEvents >= 0 &&
2158 fNKeepRequests >= maxNumberOfKeptEvents) {
2159
2161 static G4bool warned = false;
2162 if (!warned) {
2163 if (fVerbosity >= warnings) {
2164 G4cout <<
2165 "WARNING: G4VisManager::EndOfEvent: Automatic event keeping suspended."
2166 "\n The number of events exceeds the maximum, "
2167 << maxNumberOfKeptEvents <<
2168 ", that may be kept by\n the vis manager."
2169 << G4endl;
2170 }
2171 warned = true;
2172 }
2173
2174 } else if (maxNumberOfKeptEvents != 0) {
2175
2176 // If not disabled nor suspended.
2178// G4cout <<
2179// "Requesting keeping event " << currentEvent->GetEventID()
2180// << G4endl;
2181 eventManager->KeepTheCurrentEvent();
2183 }
2184
2185 }
2186 }
2187}
void KeepTheCurrentEvent()
G4bool ToBeKept() const
Definition: G4Event.hh:102
void KeepForPostProcessing() const
Definition: G4Event.hh:104
const std::vector< const G4Event * > * GetEventVector() const
Definition: G4Run.hh:96
G4bool GetRefreshAtEndOfEvent() const
G4int GetMaxNumberOfKeptEvents() const
void DrawEvent(const G4Event *)
virtual void ShowView()
Definition: G4VViewer.cc:103
G4bool fDrawEventOnlyIfToBeKept
G4Scene * fpScene
const G4double al
Mysterious coefficient that appears in the wavefunctions.

References G4INCL::DeuteronDensity::anonymous_namespace{G4INCLDeuteronDensity.cc}::al, G4VisManager::ClearTransientStoreIfMarked(), G4VSceneHandler::DrawEvent(), G4VisManager::fDrawEventOnlyIfToBeKept, G4VisManager::fEventKeepingSuspended, G4VisManager::fIgnoreStateChanges, G4VisManager::fNKeepRequests, G4VisManager::fNoOfEventsDrawnThisRun, G4VisManager::fpScene, G4VisManager::fpSceneHandler, G4VisManager::fpViewer, G4VisManager::fVerbosity, G4cout, G4endl, G4MUTEXLOCK, G4MUTEXUNLOCK, G4VVisManager::GetConcreteInstance(), G4EventManager::GetConstCurrentEvent(), G4RunManager::GetCurrentRun(), G4Event::GetEventID(), G4EventManager::GetEventManager(), G4Run::GetEventVector(), G4RunManagerFactory::GetMasterRunManager(), G4Scene::GetMaxNumberOfKeptEvents(), G4RunManager::GetNumberOfEventsToBeProcessed(), G4Scene::GetRefreshAtEndOfEvent(), G4Threading::IsMultithreadedApplication(), G4VisManager::IsValidView(), G4Event::KeepForPostProcessing(), G4EventManager::KeepTheCurrentEvent(), G4VSceneHandler::SetMarkForClearingTransientStore(), G4VViewer::ShowView(), G4Event::ToBeKept(), and G4VisManager::warnings.

◆ EndOfRun()

void G4VisManager::EndOfRun ( )
privateinherited

Definition at line 2189 of file G4VisManager.cc.

2190{
2191 if (fIgnoreStateChanges) return;
2192
2193#ifdef G4MULTITHREADED
2194 if (G4Threading::IsWorkerThread()) return;
2195#endif
2196
2197 // G4cout << "G4VisManager::EndOfRun: thread: "
2198 // << G4Threading::G4GetThreadId() << G4endl;
2199
2201
2202 // For a fake run...
2203 G4int nEventsToBeProcessed = runManager->GetNumberOfEventsToBeProcessed();
2204 if (nEventsToBeProcessed == 0) return;
2205
2206 const G4Run* currentRun = runManager->GetCurrentRun();
2207 if (!currentRun) return;
2208
2209#ifdef G4MULTITHREADED
2210 // G4AutoLock al(&visEndOfRunMutex); ???
2212 // Reset flag so that sub-thread exits when it has finished processing.
2213 G4MUTEXLOCK(&mtVisSubThreadMutex);
2214 mtRunInProgress = false;
2215 G4MUTEXUNLOCK(&mtVisSubThreadMutex);
2216 // Wait for sub-thread to finish.
2217 G4THREADJOIN(*mtVisSubThread);
2218 delete mtVisSubThread;
2219 if (fpViewer) fpViewer->SwitchToMasterThread();
2220 }
2221#endif
2222
2223#ifdef G4MULTITHREADED
2224 // Print warning about discarded events, if any.
2225 // Don't call IsValidView unless there is a scene handler. This
2226 // avoids WARNING message from IsValidView() when the user has
2227 // not instantiated a scene handler, e.g., in batch mode.
2228 if (fpSceneHandler && IsValidView()) { // Events should have been drawn
2229 G4int noOfEventsRequested = runManager->GetNumberOfEventsToBeProcessed();
2230 if (fNoOfEventsDrawnThisRun != noOfEventsRequested) {
2231 if (!fWaitOnEventQueueFull && fVerbosity >= warnings) {
2232 G4cout
2233 << "WARNING: Number of events drawn this run, "
2234 << fNoOfEventsDrawnThisRun << ", is different to number requested, "
2235 << noOfEventsRequested <<
2236 ".\n (This is because you requested \"/vis/multithreading/actionOnEventQueueFull discard\".)"
2237 << G4endl;
2238 }
2239 }
2240 }
2241#endif
2242
2243 G4int nKeptEvents = 0;
2244 const std::vector<const G4Event*>* events = currentRun->GetEventVector();
2245 if (events) nKeptEvents = events->size();
2246 if (fVerbosity >= warnings) {
2247 G4cout << nKeptEvents;
2248 if (nKeptEvents == 1) G4cout << " event has";
2249 else G4cout << " events have";
2250 G4cout << " been kept for refreshing and/or reviewing." << G4endl;
2251 if (nKeptEvents != fNKeepRequests) {
2252 G4cout << " (Note: ";
2253 if (fNKeepRequests == 0) {
2254 G4cout << "No keep requests were";
2255 } else if (fNKeepRequests == 1) {
2256 G4cout << "1 keep request was";
2257 } else {
2258 G4cout << fNKeepRequests << " keep requests were";
2259 }
2260 G4cout << " made by the vis manager.";
2261 if (fNKeepRequests == 0) {
2262 G4cout <<
2263 "\n The kept events are those you have asked to be kept in your user action(s).)";
2264 } else {
2265 G4cout <<
2266 "\n The same or further events may have been kept by you in your user action(s).)";
2267 }
2268 G4cout << G4endl;
2269 }
2270 G4cout <<
2271 " \"/vis/reviewKeptEvents\" to review them one by one."
2272 "\n \"/vis/enable\", then \"/vis/viewer/flush\" or \"/vis/viewer/rebuild\" to see them accumulated."
2273 << G4endl;
2274 }
2275
2276 // static G4bool warned = false;
2277 // if (!valid && fVerbosity >= warnings && !warned) {
2278 // G4cout <<
2279 // " Only useful if before starting the run:"
2280 // "\n a) trajectories are stored (\"/vis/scene/add/trajectories [smooth|rich]\"), or"
2281 // "\n b) the Draw method of any hits or digis is implemented."
2282 // "\n To view trajectories, hits or digis:"
2283 // "\n open a viewer, draw a volume, \"/vis/scene/add/trajectories\""
2284 // "\n \"/vis/scene/add/hits\" or \"/vis/scene/add/digitisations\""
2285 // "\n and, possibly, \"/vis/viewer/flush\"."
2286 // "\n To see all events: \"/vis/scene/endOfEventAction accumulate\"."
2287 // "\n (You may need \"/vis/viewer/flush\" or even \"/vis/viewer/rebuild\".)"
2288 // "\n To see events individually: \"/vis/reviewKeptEvents\"."
2289 // << G4endl;
2290 // warned = true;
2291 // }
2292
2294 G4cout <<
2295 "WARNING: G4VisManager::EndOfRun: Automatic event keeping was suspended."
2296 "\n The number of events in the run exceeded the maximum, "
2298 ", that may be\n kept by the vis manager." <<
2299 "\n The number of events kept by the vis manager can be changed with"
2300 "\n \"/vis/scene/endOfEventAction accumulate <N>\", where N is the"
2301 "\n maximum number you wish to allow. N < 0 means \"unlimited\"."
2302 << G4endl;
2303 }
2304
2305 // Don't call IsValidView unless there is a scene handler. This
2306 // avoids WARNING message at end of event and run when the user has
2307 // not instantiated a scene handler, e.g., in batch mode.
2308 G4bool valid = fpSceneHandler && IsValidView();
2309 if (GetConcreteInstance() && valid) {
2310// // ???? I can't remember why
2311// // if (!fpSceneHandler->GetMarkForClearingTransientStore()) {
2312// // is here. It prevents ShowView at end of run, which seems to be OK
2313// // for sequential mode, but MT mode seems to need it (I have not
2314// // figured out why). ???? JA ????
2315// if (!fpSceneHandler->GetMarkForClearingTransientStore()) {
2318 // An extra refresh for auto-refresh viewers.
2319 // ???? I DON'T WHY THIS IS NECESSARY ???? JA ????
2322 }
2323 // ShowView guarantees the view is flushed to the screen. It also
2324 // triggers other features such picking (if enabled) and allows
2325 // file-writing viewers to close the file.
2326 fpViewer->ShowView();
2328 } else {
2331 if (fVerbosity >= warnings) {
2332 G4cout << "\"/vis/viewer/update\" to close file." << G4endl;
2333 }
2334 }
2335 }
2336// }
2337 }
2338 fEventRefreshing = false;
2339}
#define G4THREADJOIN(worker)
Definition: G4Threading.hh:259
G4bool GetRefreshAtEndOfRun() const
Functionality GetFunctionality() const
void RefreshView()
G4bool IsAutoRefresh() const
G4bool fEventRefreshing

References G4VSceneHandler::DrawEndOfRunModels(), G4VisManager::fEventKeepingSuspended, G4VisManager::fEventRefreshing, G4VisManager::fIgnoreStateChanges, G4VGraphicsSystem::fileWriter, G4VisManager::fNKeepRequests, G4VisManager::fNoOfEventsDrawnThisRun, G4VisManager::fpGraphicsSystem, G4VisManager::fpScene, G4VisManager::fpSceneHandler, G4VisManager::fpViewer, G4VisManager::fVerbosity, G4cout, G4endl, G4MUTEXLOCK, G4MUTEXUNLOCK, G4THREADJOIN, G4VVisManager::GetConcreteInstance(), G4RunManager::GetCurrentRun(), G4Run::GetEventVector(), G4VGraphicsSystem::GetFunctionality(), G4RunManagerFactory::GetMasterRunManager(), G4Scene::GetMaxNumberOfKeptEvents(), G4RunManager::GetNumberOfEventsToBeProcessed(), G4Scene::GetRefreshAtEndOfRun(), G4VViewer::GetViewParameters(), G4ViewParameters::IsAutoRefresh(), G4Threading::IsMultithreadedApplication(), G4VisManager::IsValidView(), G4Threading::IsWorkerThread(), G4VViewer::RefreshView(), G4VSceneHandler::SetMarkForClearingTransientStore(), G4VViewer::ShowView(), and G4VisManager::warnings.

◆ FilterDigi()

G4bool G4VisManager::FilterDigi ( const G4VDigi digi)
virtualinherited

Implements G4VVisManager.

Definition at line 1384 of file G4VisManager.cc.

1385{
1386 return fpDigiFilterMgr->Accept(digi);
1387}
bool Accept(const T &)
G4VisFilterManager< G4VDigi > * fpDigiFilterMgr

References G4VisFilterManager< T >::Accept(), and G4VisManager::fpDigiFilterMgr.

◆ FilterHit()

G4bool G4VisManager::FilterHit ( const G4VHit hit)
virtualinherited

Implements G4VVisManager.

Definition at line 1379 of file G4VisManager.cc.

1380{
1381 return fpHitFilterMgr->Accept(hit);
1382}
G4VisFilterManager< G4VHit > * fpHitFilterMgr

References G4VisFilterManager< T >::Accept(), and G4VisManager::fpHitFilterMgr.

◆ FilterTrajectory()

G4bool G4VisManager::FilterTrajectory ( const G4VTrajectory trajectory)
virtualinherited

Implements G4VVisManager.

Definition at line 1374 of file G4VisManager.cc.

1375{
1376 return fpTrajFilterMgr->Accept(trajectory);
1377}

References G4VisFilterManager< T >::Accept(), and G4VisManager::fpTrajFilterMgr.

Referenced by G4VisManager::DispatchToModel().

◆ GeometryHasChanged()

void G4VisManager::GeometryHasChanged ( )
virtualinherited

Implements G4VVisManager.

Definition at line 1248 of file G4VisManager.cc.

1248 {
1249 if (fVerbosity >= confirmations) {
1250 G4cout << "G4VisManager::GeometryHasChanged() called." << G4endl;
1251 }
1252
1253 // Change the world...
1254 G4VPhysicalVolume* pWorld =
1256 -> GetNavigatorForTracking () -> GetWorldVolume ();
1257 if (!pWorld) {
1258 if (fVerbosity >= warnings) {
1259 G4cout << "WARNING: There is no world volume!" << G4endl;
1260 }
1261 }
1262
1263 // Check scenes.
1264 G4SceneList& sceneList = fSceneList;
1265 G4int iScene, nScenes = sceneList.size ();
1266 for (iScene = 0; iScene < nScenes; iScene++) {
1267 G4Scene* pScene = sceneList [iScene];
1268 std::vector<G4Scene::Model>& modelList = pScene -> SetRunDurationModelList ();
1269 if (modelList.size ()) {
1270 G4bool modelInvalid;
1271 do { // Remove, if required, one at a time.
1272 modelInvalid = false;
1273 std::vector<G4Scene::Model>::iterator iterModel;
1274 for (iterModel = modelList.begin();
1275 iterModel != modelList.end();
1276 ++iterModel) {
1277 modelInvalid = !(iterModel->fpModel->Validate(fVerbosity>=warnings));
1278 if (modelInvalid) {
1279 // Model invalid - remove and break.
1280 if (fVerbosity >= warnings) {
1281 G4cout << "WARNING: Model \""
1282 << iterModel->fpModel->GetGlobalDescription ()
1283 <<
1284 "\" is no longer valid - being removed\n from scene \""
1285 << pScene -> GetName () << "\""
1286 << G4endl;
1287 }
1288 modelList.erase (iterModel);
1289 break;
1290 }
1291 }
1292 } while (modelInvalid);
1293
1294 if (modelList.size () == 0) {
1295 if (fVerbosity >= warnings) {
1296 G4cout << "WARNING: No models left in this scene \""
1297 << pScene -> GetName ()
1298 << "\"."
1299 << G4endl;
1300 }
1301 }
1302 else {
1303 pScene->CalculateExtent();
1305 ApplyCommand (G4String("/vis/scene/notifyHandlers " + pScene->GetName()));
1306 }
1307 }
1308 }
1309
1310 // Check the manager's current scene...
1311 if (fpScene && fpScene -> GetRunDurationModelList ().size () == 0) {
1312 if (fVerbosity >= warnings) {
1313 G4cout << "WARNING: The current scene \""
1314 << fpScene -> GetName ()
1315 << "\" has no run duration models."
1316 << "\n Use \"/vis/scene/add/volume\" or create a new scene."
1317 << G4endl;
1318 }
1319 // Clean up
1320 if (fpSceneHandler) {
1323 if (fpViewer) {
1325 fpViewer->SetView();
1328 }
1329 }
1330 }
1331}
void CalculateExtent()
Definition: G4Scene.cc:62
const G4String & GetName() const
static G4TransportationManager * GetTransportationManager()
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:77
virtual void ClearStore()
void NeedKernelVisit()
Definition: G4VViewer.cc:78
virtual void FinishView()
Definition: G4VViewer.cc:101
virtual void ClearView()=0
virtual void SetView()=0
G4SceneList fSceneList

References G4Scene::CalculateExtent(), G4VSceneHandler::ClearStore(), G4VSceneHandler::ClearTransientStore(), G4VViewer::ClearView(), G4VisManager::confirmations, G4VViewer::FinishView(), G4VisManager::fpScene, G4VisManager::fpSceneHandler, G4VisManager::fpViewer, G4VisManager::fSceneList, G4VisManager::fVerbosity, G4cout, G4endl, G4Scene::GetName(), G4TransportationManager::GetTransportationManager(), G4UImanager::GetUIpointer(), G4VViewer::NeedKernelVisit(), G4VViewer::SetView(), and G4VisManager::warnings.

◆ GetAbortReviewKeptEvents()

G4bool G4VisManager::GetAbortReviewKeptEvents ( ) const
inherited

◆ GetAvailableGraphicsSystems()

const G4GraphicsSystemList & G4VisManager::GetAvailableGraphicsSystems ( )
inherited

Definition at line 715 of file G4VisManager.cc.

715 {
716 G4int nSystems = fAvailableGraphicsSystems.size ();
717 if (nSystems == 0) {
718 if (fVerbosity >= warnings) {
719 G4cout << "G4VisManager::GetAvailableGraphicsSystems: WARNING: no"
720 "\n graphics system available!"
721 "\n 1) Did you have environment variables G4VIS_BUILD_xxxx_DRIVER set"
722 "\n when you compiled/built the visualization code?"
723 "\n 2) Did you instantiate your own Visualization Manager and forget"
724 "\n to implement RegisterGraphicsSystems correctly?"
725 "\n 3) You can register your own graphics system, e.g.,"
726 "\n visManager->RegisterGraphicsSystem(new MyGraphicsSystem);)"
727 "\n after instantiating your vis manager and before"
728 "\n visManager->Initialize()."
729 << G4endl;
730 }
731 }
733}
G4GraphicsSystemList fAvailableGraphicsSystems

References G4VisManager::fAvailableGraphicsSystems, G4VisManager::fVerbosity, G4cout, G4endl, and G4VisManager::warnings.

◆ GetAvailableSceneHandlers()

const G4SceneHandlerList & G4VisManager::GetAvailableSceneHandlers ( ) const
inherited

◆ GetConcreteInstance()

G4VVisManager * G4VVisManager::GetConcreteInstance ( )
staticinherited

Definition at line 41 of file G4VVisManager.cc.

42{
43 return fpConcreteInstance;
44}

References G4VVisManager::fpConcreteInstance.

Referenced by G4VisManager::BeginOfEvent(), G4TheMTRayTracer::CreateBitMap(), G4TheRayTracer::CreateBitMap(), G4RunManagerKernel::DefineWorldVolume(), G4TrajectoriesModel::DescribeYourselfTo(), G4Event::Draw(), G4ScoringBox::Draw(), G4ScoringCylinder::Draw(), G4VScoreColorMap::DrawColorChart(), G4ScoringBox::DrawColumn(), G4ScoringCylinder::DrawColumn(), G4VTrajectory::DrawTrajectory(), G4DrawVoxels::DrawVoxels(), G4TrajectoryDrawerUtils::DrawWithoutTime(), G4TrajectoryDrawerUtils::DrawWithTime(), G4VisManager::EndOfEvent(), G4VisManager::EndOfRun(), G4WorkerRunManager::G4WorkerRunManager(), G4RunManager::InitializeGeometry(), G4VSceneHandler::ProcessScene(), G4RunManager::ReinitializeGeometry(), G4WorkerRunManager::RunInitialization(), G4WorkerTaskRunManager::RunInitialization(), G4RunManagerKernel::RunInitialization(), G4VisCommandReviewKeptEvents::SetNewValue(), G4VisCommandDrawTree::SetNewValue(), G4VisCommandManagerMode< Manager >::SetNewValue(), G4ModelCmdApplyStringColour< M >::SetNewValue(), G4ModelCmdApplyColour< M >::SetNewValue(), G4ModelCmdApplyBool< M >::SetNewValue(), G4ModelCmdApplyNull< M >::SetNewValue(), G4ModelCmdApplyDouble< M >::SetNewValue(), G4ModelCmdApplyDoubleAndUnit< M >::SetNewValue(), G4ModelCmdApplyInteger< M >::SetNewValue(), G4ModelCmdApplyString< M >::SetNewValue(), and G4RunManagerKernel::WorkerDefineWorldVolume().

◆ GetCurrentGraphicsSystem()

G4VGraphicsSystem * G4VisManager::GetCurrentGraphicsSystem ( ) const
inherited

◆ GetCurrentScene()

G4Scene * G4VisManager::GetCurrentScene ( ) const
inherited

Referenced by G4RayTracerSceneHandler::G4RayTracerSceneHandler(), G4VisCommandReviewKeptEvents::SetNewValue(), G4VisCommandDrawTree::SetNewValue(), G4VisCommandSceneActivateModel::SetNewValue(), G4VisCommandSceneEndOfEventAction::SetNewValue(), G4VisCommandSceneEndOfRunAction::SetNewValue(), G4VisCommandSceneRemoveModel::SetNewValue(), G4VisCommandSceneAddArrow::SetNewValue(), G4VisCommandSceneAddArrow2D::SetNewValue(), G4VisCommandSceneAddAxes::SetNewValue(), G4VisCommandSceneAddDate::SetNewValue(), G4VisCommandSceneAddDigis::SetNewValue(), G4VisCommandSceneAddEventID::SetNewValue(), G4VisCommandSceneAddExtent::SetNewValue(), G4VisCommandSceneAddElectricField::SetNewValue(), G4VisCommandSceneAddFrame::SetNewValue(), G4VisCommandSceneAddGPS::SetNewValue(), G4VisCommandSceneAddHits::SetNewValue(), G4VisCommandSceneAddLine::SetNewValue(), G4VisCommandSceneAddLine2D::SetNewValue(), G4VisCommandSceneAddLocalAxes::SetNewValue(), G4VisCommandSceneAddLogicalVolume::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4VisCommandSceneAddLogo2D::SetNewValue(), G4VisCommandSceneAddMagneticField::SetNewValue(), G4VisCommandSceneAddPSHits::SetNewValue(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneAddText::SetNewValue(), G4VisCommandSceneAddText2D::SetNewValue(), G4VisCommandSceneAddTrajectories::SetNewValue(), G4VisCommandSceneAddUserAction::SetNewValue(), G4VisCommandSceneAddVolume::SetNewValue(), G4VisCommandSceneAddPlotter::SetNewValue(), and G4VisCommandsTouchable::SetNewValue().

◆ GetCurrentSceneHandler()

G4VSceneHandler * G4VisManager::GetCurrentSceneHandler ( ) const
inherited

◆ GetCurrentViewer()

G4VViewer * G4VisManager::GetCurrentViewer ( ) const
inherited

◆ GetDefaultViewParameters()

const G4ViewParameters & G4VisManager::GetDefaultViewParameters ( ) const
inherited

◆ GetDrawEventOnlyIfToBeKept()

G4bool G4VisManager::GetDrawEventOnlyIfToBeKept ( ) const
inherited

◆ GetEndOfEventUserVisActions()

const std::vector< UserVisAction > & G4VisManager::GetEndOfEventUserVisActions ( ) const
inherited

◆ GetEndOfRunUserVisActions()

const std::vector< UserVisAction > & G4VisManager::GetEndOfRunUserVisActions ( ) const
inherited

◆ GetInstance()

G4VisManager * G4VisManager::GetInstance ( )
staticinherited

◆ GetNKeepRequests()

G4int G4VisManager::GetNKeepRequests ( ) const
inherited

◆ GetRequestedEvent()

const G4Event * G4VisManager::GetRequestedEvent ( ) const
inherited

◆ GetReviewingKeptEvents()

G4bool G4VisManager::GetReviewingKeptEvents ( ) const
inherited

◆ GetRunDurationUserVisActions()

const std::vector< UserVisAction > & G4VisManager::GetRunDurationUserVisActions ( ) const
inherited

◆ GetSceneList()

const G4SceneList & G4VisManager::GetSceneList ( ) const
inherited

◆ GetTransientsDrawnThisEvent()

G4bool G4VisManager::GetTransientsDrawnThisEvent ( ) const
inherited

◆ GetTransientsDrawnThisRun()

G4bool G4VisManager::GetTransientsDrawnThisRun ( ) const
inherited

◆ GetUserVisActionExtents()

const std::map< G4VUserVisAction *, G4VisExtent > & G4VisManager::GetUserVisActionExtents ( ) const
inherited

◆ GetVerbosity()

G4VisManager::Verbosity G4VisManager::GetVerbosity ( )
staticinherited

Definition at line 2450 of file G4VisManager.cc.

2450 {
2451 return fVerbosity;
2452}

References G4VisManager::fVerbosity.

Referenced by G4OpenGLSceneHandler::AddCompound(), G4Qt3DSceneHandler::AddCompound(), G4GMocrenFileSceneHandler::AddPrimitive(), G4GMocrenFileSceneHandler::AddSolid(), G4GMocrenFileSceneHandler::BeginPrimitives(), G4DAWNFILESceneHandler::BeginSavingG4Prim(), G4GMocrenFileSceneHandler::BeginSavingGdd(), G4RayTracerSceneHandler::BuildVisAttsMap(), G4VVisCommand::CheckSceneAndNotifyHandlers(), G4VVisCommand::CheckView(), G4DAWNFILEViewer::ClearView(), G4GMocrenFileViewer::ClearView(), G4VRML2FileViewer::ClearView(), G4VRML2FileSceneHandler::closePort(), G4VRML2FileSceneHandler::connectPort(), G4VVisCommand::ConvertToColour(), G4VVisCommand::ConvertToDoublePair(), G4OpenGLXViewer::CreateGLXContext(), G4OpenGLXViewer::CreateMainWindow(), G4VSceneHandler::CreateModelingParameters(), G4DAWNFILEViewer::DrawView(), G4GMocrenFileViewer::DrawView(), G4VRML2FileViewer::DrawView(), G4GMocrenFileSceneHandler::EndPrimitives(), G4DAWNFILESceneHandler::EndSavingG4Prim(), G4GMocrenFileSceneHandler::EndSavingGdd(), export_G4VisManager(), G4VRML2FileViewer::FinishView(), G4DAWNFILESceneHandler::FRBeginModeling(), G4OpenInventorQtViewer::G4OpenInventorQtViewer(), G4OpenInventorWinViewer::G4OpenInventorWinViewer(), G4OpenInventorXtExtendedViewer::G4OpenInventorXtExtendedViewer(), G4OpenInventorXtViewer::G4OpenInventorXtViewer(), G4GMocrenIO::getDetector(), GMocrenDetector::getEdge(), G4GMocrenIO::getShortDoseDist(), GMocrenTrack::getStep(), G4GMocrenIO::getTrack(), G4GMocrenFileSceneHandler::GFBeginModeling(), G4GMocrenFileSceneHandler::GFEndModeling(), G4GMocrenIO::mergeDoseDist(), GMocrenDataPrimitive< T >::operator+(), GMocrenDataPrimitive< T >::operator+=(), G4VSceneHandler::ProcessScene(), G4VVisCommand::ProvideValueOfUnit(), G4VVisCommand::RefreshIfRequired(), G4VSceneHandler::RequestPrimitives(), G4GMocrenIO::retrieveData(), G4GMocrenIO::retrieveData2(), G4GMocrenIO::retrieveData3(), G4GMocrenIO::retrieveData4(), G4DAWNFILEViewer::SendViewParameters(), G4VRML2FileViewer::SendViewParameters(), G4VVisCommandGeometrySet::Set(), G4DAWNFILESceneHandler::SetG4PrimFileName(), G4GMocrenFileSceneHandler::SetGddFileName(), G4VVisCommandGeometrySet::SetLVVisAtts(), G4ToolsSGViewer< SG_SESSION, SG_VIEWER >::Messenger::SetNewValue(), G4VisCommandDrawOnlyToBeKeptEvents::SetNewValue(), G4VisCommandReviewKeptEvents::SetNewValue(), G4VisCommandDrawTree::SetNewValue(), G4VisCommandDrawView::SetNewValue(), G4VisCommandDrawLogicalVolume::SetNewValue(), G4VisCommandDrawVolume::SetNewValue(), G4VisCommandOpen::SetNewValue(), G4VisCommandSpecify::SetNewValue(), G4VisCommandGeometryList::SetNewValue(), G4VisCommandGeometryRestore::SetNewValue(), G4VisCommandGeometrySetDaughtersInvisible::SetNewValue(), G4VisCommandGeometrySetVisibility::SetNewValue(), G4VisCommandSceneActivateModel::SetNewValue(), G4VisCommandSceneCreate::SetNewValue(), G4VisCommandSceneEndOfEventAction::SetNewValue(), G4VisCommandSceneEndOfRunAction::SetNewValue(), G4VisCommandSceneNotifyHandlers::SetNewValue(), G4VisCommandSceneRemoveModel::SetNewValue(), G4VisCommandSceneSelect::SetNewValue(), G4VisCommandSceneShowExtents::SetNewValue(), G4VisCommandSceneAddArrow::SetNewValue(), G4VisCommandSceneAddArrow2D::SetNewValue(), G4VisCommandSceneAddAxes::SetNewValue(), G4VisCommandSceneAddDate::SetNewValue(), G4VisCommandSceneAddDigis::SetNewValue(), G4VisCommandSceneAddEventID::SetNewValue(), G4VisCommandSceneAddExtent::SetNewValue(), G4VisCommandSceneAddElectricField::SetNewValue(), G4VisCommandSceneAddFrame::SetNewValue(), G4VisCommandSceneAddGPS::SetNewValue(), G4VisCommandSceneAddHits::SetNewValue(), G4VisCommandSceneAddLine::SetNewValue(), G4VisCommandSceneAddLine2D::SetNewValue(), G4VisCommandSceneAddLocalAxes::SetNewValue(), G4VisCommandSceneAddLogicalVolume::SetNewValue(), G4VisCommandSceneAddLogo::SetNewValue(), G4VisCommandSceneAddLogo2D::SetNewValue(), G4VisCommandSceneAddMagneticField::SetNewValue(), G4VisCommandSceneAddPSHits::SetNewValue(), G4VisCommandSceneAddScale::SetNewValue(), G4VisCommandSceneAddText::SetNewValue(), G4VisCommandSceneAddText2D::SetNewValue(), G4VisCommandSceneAddTrajectories::SetNewValue(), G4VisCommandSceneAddUserAction::SetNewValue(), G4VisCommandSceneAddVolume::SetNewValue(), G4VisCommandSceneAddPlotter::SetNewValue(), G4VisCommandSceneHandlerAttach::SetNewValue(), G4VisCommandSceneHandlerCreate::SetNewValue(), G4VisCommandSceneHandlerSelect::SetNewValue(), G4VisCommandSetArrow3DLineSegmentsPerCircle::SetNewValue(), G4VisCommandSetColour::SetNewValue(), G4VisCommandSetExtentForField::SetNewValue(), G4VisCommandSetLineWidth::SetNewValue(), G4VisCommandSetTextColour::SetNewValue(), G4VisCommandSetTextLayout::SetNewValue(), G4VisCommandSetTextSize::SetNewValue(), G4VisCommandSetTouchable::SetNewValue(), G4VisCommandSetVolumeForField::SetNewValue(), G4VisCommandsTouchable::SetNewValue(), G4VisCommandsTouchableSet::SetNewValue(), G4VisCommandViewerAddCutawayPlane::SetNewValue(), G4VisCommandViewerCentreOn::SetNewValue(), G4VisCommandViewerChangeCutawayPlane::SetNewValue(), G4VisCommandViewerClear::SetNewValue(), G4VisCommandViewerClearCutawayPlanes::SetNewValue(), G4VisCommandViewerClearTransients::SetNewValue(), G4VisCommandViewerClearVisAttributesModifiers::SetNewValue(), G4VisCommandViewerClone::SetNewValue(), G4VisCommandViewerColourByDensity::SetNewValue(), G4VisCommandViewerCopyViewFrom::SetNewValue(), G4VisCommandViewerCreate::SetNewValue(), G4VisCommandViewerDolly::SetNewValue(), G4VisCommandViewerFlush::SetNewValue(), G4VisCommandViewerInterpolate::SetNewValue(), G4VisCommandViewerPan::SetNewValue(), G4VisCommandViewerReset::SetNewValue(), G4VisCommandViewerRefresh::SetNewValue(), G4VisCommandViewerRebuild::SetNewValue(), G4VisCommandViewerSave::SetNewValue(), G4VisCommandViewerScale::SetNewValue(), G4VisCommandViewerSelect::SetNewValue(), G4VisCommandViewerUpdate::SetNewValue(), G4VisCommandViewerZoom::SetNewValue(), G4VisCommandViewerDefaultHiddenEdge::SetNewValue(), G4VisCommandViewerDefaultStyle::SetNewValue(), G4VisCommandsViewerSet::SetNewValue(), G4VisCommandGeometrySetVisibility::SetNewValueOnLV(), G4DAWNFILEViewer::SetView(), G4GMocrenFileViewer::SetView(), G4VRML2FileViewer::SetView(), G4DAWNFILEViewer::ShowView(), G4GMocrenFileViewer::ShowView(), G4VRML2FileViewer::ShowView(), G4GMocrenIO::storeData3(), G4DAWNFILESceneHandler::~G4DAWNFILESceneHandler(), G4GMocrenFileSceneHandler::~G4GMocrenFileSceneHandler(), and G4VRML2FileSceneHandler::~G4VRML2FileSceneHandler().

◆ GetVerbosityValue() [1/2]

G4VisManager::Verbosity G4VisManager::GetVerbosityValue ( const G4String verbosityString)
staticinherited

Definition at line 2411 of file G4VisManager.cc.

2411 {
2412 G4String ss = G4StrUtil::to_lower_copy(verbosityString);
2413 Verbosity verbosity;
2414 if (ss[0] == 'q') verbosity = quiet;
2415 else if (ss[0] == 's') verbosity = startup;
2416 else if (ss[0] == 'e') verbosity = errors;
2417 else if (ss[0] == 'w') verbosity = warnings;
2418 else if (ss[0] == 'c') verbosity = confirmations;
2419 else if (ss[0] == 'p') verbosity = parameters;
2420 else if (ss[0] == 'a') verbosity = all;
2421 else {
2422 G4int intVerbosity;
2423 std::istringstream is(ss);
2424 is >> intVerbosity;
2425 if (!is) {
2426 G4cerr << "ERROR: G4VisManager::GetVerbosityValue: invalid verbosity \""
2427 << verbosityString << "\"";
2428 for (size_t i = 0; i < VerbosityGuidanceStrings.size(); ++i) {
2429 G4cerr << '\n' << VerbosityGuidanceStrings[i];
2430 }
2431 verbosity = warnings;
2432 G4cerr << "\n Returning " << VerbosityString(verbosity)
2433 << G4endl;
2434 }
2435 else {
2436 verbosity = GetVerbosityValue(intVerbosity);
2437 }
2438 }
2439 return verbosity;
2440}
static std::vector< G4String > VerbosityGuidanceStrings
static G4String VerbosityString(Verbosity)
static Verbosity GetVerbosityValue(const G4String &)
G4String to_lower_copy(G4String str)
Return lowercased copy of string.

References G4VisManager::all, G4VisManager::confirmations, G4VisManager::errors, G4cerr, G4endl, G4VisManager::GetVerbosityValue(), G4VisManager::parameters, G4VisManager::quiet, G4VisManager::startup, G4StrUtil::to_lower_copy(), G4VisManager::VerbosityGuidanceStrings, G4VisManager::VerbosityString(), and G4VisManager::warnings.

Referenced by G4VisManager::G4VisManager(), G4VisManager::GetVerbosityValue(), G4VisCommandList::SetNewValue(), G4VisCommandVerbose::SetNewValue(), G4VisCommandSceneList::SetNewValue(), G4VisCommandSceneHandlerList::SetNewValue(), G4VisCommandViewerList::SetNewValue(), and G4VisManager::SetVerboseLevel().

◆ GetVerbosityValue() [2/2]

G4VisManager::Verbosity G4VisManager::GetVerbosityValue ( G4int  intVerbosity)
staticinherited

Definition at line 2442 of file G4VisManager.cc.

2442 {
2443 Verbosity verbosity;
2444 if (intVerbosity < quiet) verbosity = quiet;
2445 else if (intVerbosity > all) verbosity = all;
2446 else verbosity = Verbosity(intVerbosity);
2447 return verbosity;
2448}

References G4VisManager::all, and G4VisManager::quiet.

◆ GetViewer()

G4VViewer * G4VisManager::GetViewer ( const G4String viewerName) const
inherited

Definition at line 2372 of file G4VisManager.cc.

2372 {
2373 G4String viewerShortName = ViewerShortName (viewerName);
2374 size_t nHandlers = fAvailableSceneHandlers.size ();
2375 size_t iHandler, iViewer;
2376 G4VViewer* viewer = 0;
2377 G4bool found = false;
2378 for (iHandler = 0; iHandler < nHandlers; iHandler++) {
2379 G4VSceneHandler* sceneHandler = fAvailableSceneHandlers [iHandler];
2380 const G4ViewerList& viewerList = sceneHandler -> GetViewerList ();
2381 for (iViewer = 0; iViewer < viewerList.size (); iViewer++) {
2382 viewer = viewerList [iViewer];
2383 if (viewerShortName == viewer -> GetShortName ()) {
2384 found = true;
2385 break;
2386 }
2387 }
2388 if (found) break;
2389 }
2390 if (found) return viewer;
2391 else return 0;
2392}
G4String ViewerShortName(const G4String &viewerName) const

References G4VisManager::fAvailableSceneHandlers, and G4VisManager::ViewerShortName().

Referenced by G4VisCommandsViewerSet::SetNewValue().

◆ IgnoreStateChanges()

void G4VisManager::IgnoreStateChanges ( G4bool  val)
virtualinherited

Reimplemented from G4VVisManager.

Definition at line 2588 of file G4VisManager.cc.

2589{
2590 fIgnoreStateChanges = val;
2591}

References G4VisManager::fIgnoreStateChanges.

◆ Initialise()

void G4VisManager::Initialise ( )
inherited

Definition at line 253 of file G4VisManager.cc.

253 {
254
255 if (fInitialised && fVerbosity >= warnings) {
256 G4cout << "WARNING: G4VisManager::Initialise: already initialised."
257 << G4endl;
258 return;
259 }
260
261 if (fVerbosity >= startup) {
262 G4cout << "Visualization Manager initialising..." << G4endl;
263 }
264
265 if (fVerbosity >= parameters) {
266 G4cout <<
267 "\nYou have instantiated your own Visualization Manager, inheriting"
268 "\n G4VisManager and implementing RegisterGraphicsSystems(), in which"
269 "\n you should, normally, instantiate drivers which do not need"
270 "\n external packages or libraries, and, optionally, drivers under"
271 "\n control of environment variables."
272 "\n Also you should implement RegisterModelFactories()."
273 "\n See visualization/management/include/G4VisExecutive.hh/icc, for example."
274 "\n In your main() you will have something like:"
275 "\n G4VisManager* visManager = new G4VisExecutive;"
276 "\n visManager -> SetVerboseLevel (Verbose);"
277 "\n visManager -> Initialize ();"
278 "\n (Don't forget to delete visManager;)"
279 "\n"
280 << G4endl;
281 }
282
283 if (fVerbosity >= startup) {
284 G4cout << "Registering graphics systems..." << G4endl;
285 }
286
288
289 if (fVerbosity >= startup) {
290 G4cout <<
291 "\nYou have successfully registered the following graphics systems."
292 << G4endl;
294 G4cout << G4endl;
295 }
296
297 // Make command directories for commands instantiated in the
298 // modeling subcategory...
299 G4UIcommand* directory;
300 directory = new G4UIdirectory ("/vis/modeling/");
301 directory -> SetGuidance ("Modeling commands.");
302 fDirectoryList.push_back (directory);
303 directory = new G4UIdirectory ("/vis/modeling/trajectories/");
304 directory -> SetGuidance ("Trajectory model commands.");
305 fDirectoryList.push_back (directory);
306 directory = new G4UIdirectory ("/vis/modeling/trajectories/create/");
307 directory -> SetGuidance ("Create trajectory models and messengers.");
308 fDirectoryList.push_back (directory);
309
310 // Filtering command directory
311 directory = new G4UIdirectory ("/vis/filtering/");
312 directory -> SetGuidance ("Filtering commands.");
313 fDirectoryList.push_back (directory);
314 directory = new G4UIdirectory ("/vis/filtering/trajectories/");
315 directory -> SetGuidance ("Trajectory filtering commands.");
316 fDirectoryList.push_back (directory);
317 directory = new G4UIdirectory ("/vis/filtering/trajectories/create/");
318 directory -> SetGuidance ("Create trajectory filters and messengers.");
319 fDirectoryList.push_back (directory);
320 directory = new G4UIdirectory ("/vis/filtering/hits/");
321 directory -> SetGuidance ("Hit filtering commands.");
322 fDirectoryList.push_back (directory);
323 directory = new G4UIdirectory ("/vis/filtering/hits/create/");
324 directory -> SetGuidance ("Create hit filters and messengers.");
325 fDirectoryList.push_back (directory);
326 directory = new G4UIdirectory ("/vis/filtering/digi/");
327 directory -> SetGuidance ("Digi filtering commands.");
328 fDirectoryList.push_back (directory);
329 directory = new G4UIdirectory ("/vis/filtering/digi/create/");
330 directory -> SetGuidance ("Create digi filters and messengers.");
331 fDirectoryList.push_back (directory);
332
334
335 if (fVerbosity >= startup) {
336 G4cout << "Registering model factories..." << G4endl;
337 }
338
340
341 if (fVerbosity >= startup) {
342 G4cout <<
343 "\nYou have successfully registered the following model factories."
344 << G4endl;
346 G4cout << G4endl;
347 }
348
349 if (fVerbosity >= startup) {
351 G4cout << G4endl;
352 }
353
355
356 if (fVerbosity >= startup) {
357 G4cout <<
358 "Some /vis commands (optionally) take a string to specify colour."
359 "\n\"/vis/list\" to see available colours."
360 << G4endl;
361 }
362
363 fInitialised = true;
364}
std::vector< G4UIcommand * > fDirectoryList
virtual void RegisterGraphicsSystems()=0
void InitialiseG4ColourMap() const
void PrintAvailableModels(Verbosity) const
void PrintAvailableGraphicsSystems(Verbosity) const
virtual void RegisterModelFactories()
void RegisterMessengers()
void PrintAvailableUserVisActions(Verbosity) const

References G4VisManager::fDirectoryList, G4VisManager::fInitialised, G4VisManager::fVerbosity, G4cout, G4endl, G4VisManager::InitialiseG4ColourMap(), G4VisManager::parameters, G4VisManager::PrintAvailableGraphicsSystems(), G4VisManager::PrintAvailableModels(), G4VisManager::PrintAvailableUserVisActions(), G4VisManager::RegisterGraphicsSystems(), G4VisManager::RegisterMessengers(), G4VisManager::RegisterModelFactories(), G4VisManager::startup, and G4VisManager::warnings.

Referenced by G4VisManager::CreateSceneHandler(), G4VisManager::CreateViewer(), and G4VisManager::IsValidView().

◆ InitialiseG4ColourMap()

void G4VisManager::InitialiseG4ColourMap ( ) const
privateinherited

Definition at line 366 of file G4VisManager.cc.

367{
368 G4Colour::InitialiseColourMap(); // Initialises (if not already initialised)
369
370 // our forever 65 named colors taken long time ago from X11.
371 // Extracted from g4tools/include/tools/colors
372 // Copyright (C) 2010, Guy Barrand. All rights reserved.
373 // See the file tools.license for terms.
374
375#define TOOLS_COLORS_STAT(name,r,g,b) \
376G4Colour::AddToMap(#name, G4Colour(r,g,b));
377
378 //0-9
379 TOOLS_COLORS_STAT(aquamarine,0.496101F,0.996109F,0.828138F)
380 TOOLS_COLORS_STAT(mediumaquamarine,0.398444F,0.800793F,0.664073F)
381 // TOOLS_COLORS_STAT(black,0,0,0) (already defined)
382 // TOOLS_COLORS_STAT(blue,0,0,1) (already defined)
383 TOOLS_COLORS_STAT(cadetblue,0.371099F,0.617197F,0.62501F)
384 TOOLS_COLORS_STAT(cornflowerblue,0.390631F,0.58204F,0.925795F)
385 TOOLS_COLORS_STAT(darkslateblue,0.281254F,0.238285F,0.542977F)
386 TOOLS_COLORS_STAT(lightblue,0.675792F,0.843763F,0.898451F)
387 TOOLS_COLORS_STAT(lightsteelblue,0.68751F,0.765637F,0.867201F)
388 TOOLS_COLORS_STAT(mediumblue,0,0,0.800793F)
389
390 //10-19
391 TOOLS_COLORS_STAT(mediumslateblue,0.480476F,0.406256F,0.929702F)
392 TOOLS_COLORS_STAT(midnightblue,0.0976577F,0.0976577F,0.437507F)
393 TOOLS_COLORS_STAT(navyblue,0,0,0.500008F)
394 TOOLS_COLORS_STAT(navy,0,0,0.500008F)
395 TOOLS_COLORS_STAT(skyblue,0.527352F,0.8047F,0.917983F)
396 TOOLS_COLORS_STAT(slateblue,0.414069F,0.351568F,0.800793F)
397 TOOLS_COLORS_STAT(steelblue,0.273442F,0.50782F,0.703136F)
398 TOOLS_COLORS_STAT(coral,0.996109F,0.496101F,0.312505F)
399 // TOOLS_COLORS_STAT(cyan,0,1,1) (already defined)
400 TOOLS_COLORS_STAT(firebrick,0.695323F,0.132815F,0.132815F)
401
402 //20-29
403 // TOOLS_COLORS_STAT(brown,0.644541F,0.164065F,0.164065F) (already defined)
404 TOOLS_COLORS_STAT(gold,0.996109F,0.839857F,0)
405 TOOLS_COLORS_STAT(goldenrod,0.851575F,0.644541F,0.125002F)
406 // TOOLS_COLORS_STAT(green,0,1,0) (already defined)
407 TOOLS_COLORS_STAT(darkgreen,0,0.390631F,0)
408 TOOLS_COLORS_STAT(darkolivegreen,0.332036F,0.417975F,0.183597F)
409 TOOLS_COLORS_STAT(forestgreen,0.132815F,0.542977F,0.132815F)
410 TOOLS_COLORS_STAT(limegreen,0.195315F,0.800793F,0.195315F)
411 TOOLS_COLORS_STAT(mediumseagreen,0.234379F,0.699229F,0.441413F)
412 TOOLS_COLORS_STAT(mediumspringgreen,0,0.976577F,0.601572F)
413
414 //30-39
415 TOOLS_COLORS_STAT(palegreen,0.593759F,0.980484F,0.593759F)
416 TOOLS_COLORS_STAT(seagreen,0.17969F,0.542977F,0.339849F)
417 TOOLS_COLORS_STAT(springgreen,0,0.996109F,0.496101F)
418 TOOLS_COLORS_STAT(yellowgreen,0.601572F,0.800793F,0.195315F)
419 TOOLS_COLORS_STAT(darkslategrey,0.183597F,0.308598F,0.308598F)
420 TOOLS_COLORS_STAT(dimgrey,0.410163F,0.410163F,0.410163F)
421 TOOLS_COLORS_STAT(lightgrey,0.824231F,0.824231F,0.824231F)
422 // TOOLS_COLORS_STAT(grey,0.750011F,0.750011F,0.750011F) (already defined)
423 TOOLS_COLORS_STAT(khaki,0.937514F,0.898451F,0.546883F)
424 // TOOLS_COLORS_STAT(magenta,1,0,1) (already defined)
425
426 //40-49
427 TOOLS_COLORS_STAT(maroon,0.68751F,0.187503F,0.375006F)
428 TOOLS_COLORS_STAT(orange,0.996109F,0.644541F,0)
429 TOOLS_COLORS_STAT(orchid,0.851575F,0.437507F,0.83595F)
430 TOOLS_COLORS_STAT(darkorchid,0.597665F,0.195315F,0.796887F)
431 TOOLS_COLORS_STAT(mediumorchid,0.726574F,0.332036F,0.824231F)
432 TOOLS_COLORS_STAT(pink,0.996109F,0.750011F,0.792981F)
433 TOOLS_COLORS_STAT(plum,0.863294F,0.62501F,0.863294F)
434 // TOOLS_COLORS_STAT(red,1,0,0) (already defined)
435 TOOLS_COLORS_STAT(indianred,0.800793F,0.35938F,0.35938F)
436 TOOLS_COLORS_STAT(mediumvioletred,0.777356F,0.0820325F,0.519539F)
437
438 //50-59
439 TOOLS_COLORS_STAT(orangered,0.996109F,0.269535F,0)
440 TOOLS_COLORS_STAT(violetred,0.812512F,0.125002F,0.562509F)
441 TOOLS_COLORS_STAT(salmon,0.976577F,0.500008F,0.445319F)
442 TOOLS_COLORS_STAT(sienna,0.62501F,0.320317F,0.175784F)
443 TOOLS_COLORS_STAT(tan,0.820325F,0.703136F,0.546883F)
444 TOOLS_COLORS_STAT(thistle,0.843763F,0.746105F,0.843763F)
445 TOOLS_COLORS_STAT(turquoise,0.250004F,0.875013F,0.812512F)
446 TOOLS_COLORS_STAT(darkturquoise,0,0.8047F,0.816419F)
447 TOOLS_COLORS_STAT(mediumturquoise,0.281254F,0.816419F,0.796887F)
448 TOOLS_COLORS_STAT(violet,0.929702F,0.50782F,0.929702F)
449
450 //60-64
451 TOOLS_COLORS_STAT(blueviolet,0.539071F,0.167971F,0.882826F)
452 TOOLS_COLORS_STAT(wheat,0.957046F,0.867201F,0.699229F)
453 // TOOLS_COLORS_STAT(white,1,1,1) (already defined)
454 // TOOLS_COLORS_STAT(yellow,1,1,0) (already defined)
455 TOOLS_COLORS_STAT(greenyellow,0.675792F,0.996109F,0.18359F)
456
457#undef TOOLS_COLORS_STAT
458}
#define TOOLS_COLORS_STAT(name, r, g, b)
static void InitialiseColourMap()
Definition: G4Colour.cc:141

References G4Colour::InitialiseColourMap(), and TOOLS_COLORS_STAT.

Referenced by G4VisManager::Initialise().

◆ Initialize()

void G4VisManager::Initialize ( )
inherited

◆ IsValidView()

G4bool G4VisManager::IsValidView ( )
privateinherited

Definition at line 2462 of file G4VisManager.cc.

2462 {
2463
2464 if (!fInitialised) Initialise ();
2465
2466 static G4bool noGSPrinting = true;
2467 if (!fpGraphicsSystem) {
2468 // Limit printing - we do not want printing if the user simply does
2469 // not want to use graphics, e.g., in batch mode.
2470 if (noGSPrinting) {
2471 noGSPrinting = false;
2472 if (fVerbosity >= warnings) {
2473 G4cout <<
2474 "WARNING: G4VisManager::IsValidView(): Attempt to draw when no graphics system"
2475 "\n has been instantiated. Use \"/vis/open\" or \"/vis/sceneHandler/create\"."
2476 "\n Alternatively, to avoid this message, suppress instantiation of vis"
2477 "\n manager (G4VisExecutive) and ensure drawing code is executed only if"
2478 "\n G4VVisManager::GetConcreteInstance() is non-zero."
2479 << G4endl;
2480 }
2481 }
2482 return false;
2483 }
2484
2485 if ((!fpScene) || (!fpSceneHandler) || (!fpViewer)) {
2486 if (fVerbosity >= errors) {
2487 G4cerr <<
2488 "ERROR: G4VisManager::IsValidView(): Current view is not valid."
2489 << G4endl;
2491 }
2492 return false;
2493 }
2494
2495 if (fpScene != fpSceneHandler -> GetScene ()) {
2496 if (fVerbosity >= errors) {
2497 G4cerr << "ERROR: G4VisManager::IsValidView ():";
2498 if (fpSceneHandler -> GetScene ()) {
2499 G4cout <<
2500 "\n The current scene \""
2501 << fpScene -> GetName ()
2502 << "\" is not handled by"
2503 "\n the current scene handler \""
2504 << fpSceneHandler -> GetName ()
2505 << "\""
2506 "\n (it currently handles scene \""
2507 << fpSceneHandler -> GetScene () -> GetName ()
2508 << "\")."
2509 "\n Either:"
2510 "\n (a) attach it to the scene handler with"
2511 "\n /vis/sceneHandler/attach "
2512 << fpScene -> GetName ()
2513 << ", or"
2514 "\n (b) create a new scene handler with "
2515 "\n /vis/sceneHandler/create <graphics-system>,"
2516 "\n in which case it should pick up the the new scene."
2517 << G4endl;
2518 }
2519 else {
2520 G4cout << "\n Scene handler \""
2521 << fpSceneHandler -> GetName ()
2522 << "\" has null scene pointer."
2523 "\n Attach a scene with /vis/sceneHandler/attach [<scene-name>]"
2524 << G4endl;
2525 }
2526 }
2527 return false;
2528 }
2529
2530 const G4ViewerList& viewerList = fpSceneHandler -> GetViewerList ();
2531 if (viewerList.size () == 0) {
2532 if (fVerbosity >= errors) {
2533 G4cerr <<
2534 "ERROR: G4VisManager::IsValidView (): the current scene handler\n \""
2535 << fpSceneHandler -> GetName ()
2536 << "\" has no viewers. Do /vis/viewer/create."
2537 << G4endl;
2538 }
2539 return false;
2540 }
2541
2542 G4bool isValid = true;
2543 if (fpScene -> IsEmpty ()) { // Add world by default if possible...
2544 G4bool warn(fVerbosity >= warnings);
2545 G4bool successful = fpScene -> AddWorldIfEmpty (warn);
2546 if (!successful || fpScene -> IsEmpty ()) { // If still empty...
2547 if (fVerbosity >= errors) {
2548 G4cerr << "ERROR: G4VisManager::IsValidView ():";
2549 G4cerr <<
2550 "\n Attempt at some drawing operation when scene is empty."
2551 "\n Maybe the geometry has not yet been defined."
2552 " Try /run/initialize."
2553 "\n Or use \"/vis/scene/add/extent\"."
2554 << G4endl;
2555 }
2556 isValid = false;
2557 }
2558 else {
2559 G4UImanager::GetUIpointer()->ApplyCommand ("/vis/scene/notifyHandlers");
2560 if (fVerbosity >= warnings) {
2561 G4cout <<
2562 "WARNING: G4VisManager: the scene was empty, \"world\" has been"
2563 "\n added and the scene handlers notified.";
2564 G4cout << G4endl;
2565 }
2566 }
2567 }
2568 return isValid;
2569}
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:485

References G4UImanager::ApplyCommand(), G4VisManager::errors, G4VisManager::fInitialised, G4VisManager::fpGraphicsSystem, G4VisManager::fpScene, G4VisManager::fpSceneHandler, G4VisManager::fpViewer, G4VisManager::fVerbosity, G4cerr, G4cout, G4endl, G4UImanager::GetUIpointer(), G4VisManager::Initialise(), G4VisManager::PrintInvalidPointers(), and G4VisManager::warnings.

Referenced by G4VisManager::BeginDraw(), G4VisManager::BeginDraw2D(), G4VisManager::DispatchToModel(), G4VisManager::Draw(), G4VisManager::DrawT(), G4VisManager::DrawT2D(), G4VisManager::Enable(), G4VisManager::EndDraw(), G4VisManager::EndDraw2D(), G4VisManager::EndOfEvent(), G4VisManager::EndOfRun(), G4VisManager::NotifyHandlers(), G4VisManager::SetCurrentSceneHandler(), and G4VisManager::SetCurrentViewer().

◆ NotifyHandlers()

void G4VisManager::NotifyHandlers ( )
virtualinherited

Reimplemented from G4VVisManager.

Definition at line 1333 of file G4VisManager.cc.

1333 {
1334
1335 if (fVerbosity >= confirmations) {
1336 G4cout << "G4VisManager::NotifyHandler() called." << G4endl;
1337 }
1338
1339 if (IsValidView()) {
1340
1341 // Check scenes.
1342 G4SceneList& sceneList = fSceneList;
1343 G4int iScene, nScenes = sceneList.size ();
1344 for (iScene = 0; iScene < nScenes; iScene++) {
1345 G4Scene* pScene = sceneList [iScene];
1346 std::vector<G4Scene::Model>& modelList = pScene -> SetRunDurationModelList ();
1347
1348 if (modelList.size ()) {
1349 pScene->CalculateExtent();
1351 ApplyCommand (G4String("/vis/scene/notifyHandlers " + pScene->GetName()));
1352 }
1353 }
1354
1355 // Check the manager's current scene...
1356 if (fpScene && fpScene -> GetRunDurationModelList ().size () == 0) {
1357 if (fVerbosity >= warnings) {
1358 G4cout << "WARNING: The current scene \""
1359 << fpScene -> GetName ()
1360 << "\" has no run duration models."
1361 << "\n Use \"/vis/scene/add/volume\" or create a new scene."
1362 << G4endl;
1363 }
1367 fpViewer->SetView();
1370 }
1371 }
1372}

References G4Scene::CalculateExtent(), G4VSceneHandler::ClearStore(), G4VSceneHandler::ClearTransientStore(), G4VViewer::ClearView(), G4VisManager::confirmations, G4VViewer::FinishView(), G4VisManager::fpScene, G4VisManager::fpSceneHandler, G4VisManager::fpViewer, G4VisManager::fSceneList, G4VisManager::fVerbosity, G4cout, G4endl, G4Scene::GetName(), G4UImanager::GetUIpointer(), G4VisManager::IsValidView(), G4VViewer::NeedKernelVisit(), G4VViewer::SetView(), and G4VisManager::warnings.

◆ PrintAvailableColours()

void G4VisManager::PrintAvailableColours ( Verbosity  ) const
privateinherited

Definition at line 1747 of file G4VisManager.cc.

1747 {
1748 G4cout <<
1749 "Some /vis commands (optionally) take a string to specify colour."
1750 "\nAvailable colours:\n ";
1751 const std::map<G4String, G4Colour>& map = G4Colour::GetMap();
1752 for (std::map<G4String, G4Colour>::const_iterator i = map.begin();
1753 i != map.end();) {
1754 G4cout << i->first;
1755 if (++i != map.end()) G4cout << ", ";
1756 }
1757 G4cout << G4endl;
1758}
static const std::map< G4String, G4Colour > & GetMap()
Definition: G4Colour.cc:178

References G4cout, G4endl, G4Colour::GetMap(), and anonymous_namespace{G4QuasiElRatios.cc}::map.

Referenced by G4VisCommandList::SetNewValue().

◆ PrintAvailableGraphicsSystems()

void G4VisManager::PrintAvailableGraphicsSystems ( Verbosity  verbosity) const
protectedinherited

Definition at line 1623 of file G4VisManager.cc.

1624{
1625 G4cout << "Registered graphics systems are:\n";
1626 if (fAvailableGraphicsSystems.size ()) {
1627 for (const auto& gs: fAvailableGraphicsSystems) {
1628 const G4String& name = gs->GetName();
1629 const std::vector<G4String>& nicknames = gs->GetNicknames();
1630 if (verbosity <= warnings) {
1631 // Brief output
1632 G4cout << " " << name << " (";
1633 for (size_t i = 0; i < nicknames.size(); ++i) {
1634 if (i != 0) {
1635 G4cout << ", ";
1636 }
1637 G4cout << nicknames[i];
1638 }
1639 G4cout << ')';
1640 } else {
1641 // Full output
1642 G4cout << *gs;
1643 }
1644 G4cout << G4endl;
1645 }
1646 } else {
1647 G4cout << " NONE!!! None registered - yet! Mmmmm!" << G4endl;
1648 }
1649}

References G4VisManager::fAvailableGraphicsSystems, G4cout, G4endl, G4InuclParticleNames::name(), and G4VisManager::warnings.

Referenced by G4VisManager::Initialise(), and G4VisCommandList::SetNewValue().

◆ PrintAvailableModels()

void G4VisManager::PrintAvailableModels ( Verbosity  verbosity) const
privateinherited

Definition at line 1651 of file G4VisManager.cc.

1652{
1653 {
1654 //fpTrajDrawModelMgr->Print(G4cout);
1655 G4cout << "Registered model factories:" << G4endl;
1656 const std::vector<G4VModelFactory<G4VTrajectoryModel>*>& factoryList =
1658 if (factoryList.empty()) G4cout << " None" << G4endl;
1659 else {
1660 std::vector<G4VModelFactory<G4VTrajectoryModel>*>::const_iterator i;
1661 for (i = factoryList.begin(); i != factoryList.end(); ++i) {
1662 (*i)->Print(G4cout);
1663 }
1664 }
1665 G4cout << "\nRegistered models:" << G4endl;
1666 const G4VisListManager<G4VTrajectoryModel>* listManager =
1668 const std::map<G4String, G4VTrajectoryModel*>& modelMap =
1669 listManager->Map();
1670 if (modelMap.empty()) G4cout << " None" << G4endl;
1671 else {
1672 std::map<G4String, G4VTrajectoryModel*>::const_iterator i;
1673 for (i = modelMap.begin(); i != modelMap.end(); ++i) {
1674 G4cout << " " << i->second->Name();
1675 if (i->second == listManager->Current()) G4cout << " (Current)";
1676 G4cout << G4endl;
1677 if (verbosity >= parameters) i->second->Print(G4cout);
1678 }
1679 }
1680 }
1681
1682 G4cout << G4endl;
1683
1684 {
1685 //fpTrajFilterMgr->Print(G4cout);
1686 G4cout << "Registered filter factories:" << G4endl;
1687 const std::vector<G4VModelFactory<G4VFilter<G4VTrajectory> >*>&
1688 factoryList = fpTrajFilterMgr->FactoryList();
1689 if (factoryList.empty()) G4cout << " None" << G4endl;
1690 else {
1691 std::vector<G4VModelFactory<G4VFilter<G4VTrajectory> >*>::const_iterator i;
1692 for (i = factoryList.begin(); i != factoryList.end(); ++i) {
1693 (*i)->Print(G4cout);
1694 }
1695 }
1696
1697 G4cout << "\nRegistered filters:" << G4endl;
1698 const std::vector<G4VFilter<G4VTrajectory>*>&
1699 filterList = fpTrajFilterMgr->FilterList();
1700 if (filterList.empty()) G4cout << " None" << G4endl;
1701 else {
1702 std::vector<G4VFilter<G4VTrajectory>*>::const_iterator i;
1703 for (i = filterList.begin(); i != filterList.end(); ++i) {
1704 G4cout << " " << (*i)->GetName() << G4endl;
1705 if (verbosity >= parameters) (*i)->PrintAll(G4cout);
1706 }
1707 }
1708 }
1709}
const std::vector< Filter * > & FilterList() const
const std::vector< Factory * > & FactoryList() const
const std::map< G4String, T * > & Map() const
const T * Current() const
const List * ListManager() const
const std::vector< Factory * > & FactoryList() const

References G4VisListManager< T >::Current(), G4VisFilterManager< T >::FactoryList(), G4VisModelManager< Model >::FactoryList(), G4VisFilterManager< T >::FilterList(), G4VisManager::fpTrajDrawModelMgr, G4VisManager::fpTrajFilterMgr, G4cout, G4endl, G4VisModelManager< Model >::ListManager(), G4VisListManager< T >::Map(), and G4VisManager::parameters.

Referenced by G4VisManager::Initialise(), and G4VisCommandList::SetNewValue().

◆ PrintAvailableUserVisActions()

void G4VisManager::PrintAvailableUserVisActions ( Verbosity  ) const
privateinherited

Definition at line 1711 of file G4VisManager.cc.

1712{
1713 G4cout <<
1714 "You have successfully registered the following user vis actions."
1715 << G4endl;
1716 G4cout << "Run Duration User Vis Actions:";
1717 if (fRunDurationUserVisActions.empty()) G4cout << " none" << G4endl;
1718 else {
1719 G4cout << G4endl;
1720 for (size_t i = 0; i < fRunDurationUserVisActions.size(); i++) {
1721 const G4String& name = fRunDurationUserVisActions[i].fName;
1722 G4cout << " " << name << G4endl;
1723 }
1724 }
1725
1726 G4cout << "End of Event User Vis Actions:";
1727 if (fEndOfEventUserVisActions.empty()) G4cout << " none" << G4endl;
1728 else {
1729 G4cout << G4endl;
1730 for (size_t i = 0; i < fEndOfEventUserVisActions.size(); i++) {
1731 const G4String& name = fEndOfEventUserVisActions[i].fName;
1732 G4cout << " " << name << G4endl;
1733 }
1734 }
1735
1736 G4cout << "End of Run User Vis Actions:";
1737 if (fEndOfRunUserVisActions.empty()) G4cout << " none" << G4endl;
1738 else {
1739 G4cout << G4endl;
1740 for (size_t i = 0; i < fEndOfRunUserVisActions.size(); i++) {
1741 const G4String& name = fEndOfRunUserVisActions[i].fName;
1742 G4cout << " " << name << G4endl;
1743 }
1744 }
1745}
std::vector< UserVisAction > fRunDurationUserVisActions
std::vector< UserVisAction > fEndOfRunUserVisActions
std::vector< UserVisAction > fEndOfEventUserVisActions

References G4VisManager::fEndOfEventUserVisActions, G4VisManager::fEndOfRunUserVisActions, G4VisManager::fRunDurationUserVisActions, G4cout, G4endl, and G4InuclParticleNames::name().

Referenced by G4VisManager::Initialise(), and G4VisCommandList::SetNewValue().

◆ PrintInvalidPointers()

void G4VisManager::PrintInvalidPointers ( ) const
privateinherited

Definition at line 1760 of file G4VisManager.cc.

1760 {
1761 if (fVerbosity >= errors) {
1762 G4cerr << "ERROR: G4VisManager::PrintInvalidPointers:";
1763 if (!fpGraphicsSystem) {
1764 G4cerr << "\n null graphics system pointer.";
1765 }
1766 else {
1767 G4cerr << "\n Graphics system is " << fpGraphicsSystem -> GetName ()
1768 << " but:";
1769 if (!fpScene)
1770 G4cerr <<
1771 "\n Null scene pointer. Use \"/vis/drawVolume\" or"
1772 " \"/vis/scene/create\".";
1773 if (!fpSceneHandler)
1774 G4cerr <<
1775 "\n Null scene handler pointer. Use \"/vis/open\" or"
1776 " \"/vis/sceneHandler/create\".";
1777 if (!fpViewer )
1778 G4cerr <<
1779 "\n Null viewer pointer. Use \"/vis/viewer/create\".";
1780 }
1781 G4cerr << G4endl;
1782 }
1783}

References G4VisManager::errors, G4VisManager::fpGraphicsSystem, G4VisManager::fpScene, G4VisManager::fpSceneHandler, G4VisManager::fpViewer, G4VisManager::fVerbosity, G4cerr, and G4endl.

Referenced by G4VisManager::CreateSceneHandler(), G4VisManager::CreateViewer(), and G4VisManager::IsValidView().

◆ RegisterEndOfEventUserVisAction()

void G4VisManager::RegisterEndOfEventUserVisAction ( const G4String name,
G4VUserVisAction pVisAction,
const G4VisExtent extent = G4VisExtent() 
)
inherited

Definition at line 1436 of file G4VisManager.cc.

1439 {
1440 fEndOfEventUserVisActions.push_back(UserVisAction(name,pVisAction));
1441 if (extent.GetExtentRadius() > 0.) {
1442 fUserVisActionExtents[pVisAction] = extent;
1443 } else {
1444 if (fVerbosity >= warnings) {
1445 G4cout <<
1446 "WARNING: No extent set for user vis action \"" << name << "\"."
1447 << G4endl;
1448 }
1449 }
1450 if (fVerbosity >= confirmations) {
1451 G4cout
1452 << "End of event user vis action \"" << name << "\" registered"
1453 << G4endl;
1454 }
1455}
G4double GetExtentRadius() const
Definition: G4VisExtent.cc:75
std::map< G4VUserVisAction *, G4VisExtent > fUserVisActionExtents

References G4VisManager::confirmations, G4VisManager::fEndOfEventUserVisActions, G4VisManager::fUserVisActionExtents, G4VisManager::fVerbosity, G4cout, G4endl, G4VisExtent::GetExtentRadius(), G4InuclParticleNames::name(), and G4VisManager::warnings.

◆ RegisterEndOfRunUserVisAction()

void G4VisManager::RegisterEndOfRunUserVisAction ( const G4String name,
G4VUserVisAction pVisAction,
const G4VisExtent extent = G4VisExtent() 
)
inherited

Definition at line 1457 of file G4VisManager.cc.

1460 {
1461 fEndOfRunUserVisActions.push_back(UserVisAction(name,pVisAction));
1462 if (extent.GetExtentRadius() > 0.) {
1463 fUserVisActionExtents[pVisAction] = extent;
1464 } else {
1465 if (fVerbosity >= warnings) {
1466 G4cout <<
1467 "WARNING: No extent set for user vis action \"" << name << "\"."
1468 << G4endl;
1469 }
1470 }
1471 if (fVerbosity >= confirmations) {
1472 G4cout
1473 << "End of run user vis action \"" << name << "\" registered"
1474 << G4endl;
1475 }
1476}

References G4VisManager::confirmations, G4VisManager::fEndOfRunUserVisActions, G4VisManager::fUserVisActionExtents, G4VisManager::fVerbosity, G4cout, G4endl, G4VisExtent::GetExtentRadius(), G4InuclParticleNames::name(), and G4VisManager::warnings.

◆ RegisterGraphicsSystem()

G4bool G4VisManager::RegisterGraphicsSystem ( G4VGraphicsSystem pSystem)
inherited

Definition at line 735 of file G4VisManager.cc.

735 {
736 G4bool happy = true;
737 if (pSystem) {
738 fAvailableGraphicsSystems.push_back (pSystem);
739 if (fVerbosity >= confirmations) {
740 G4cout << "G4VisManager::RegisterGraphicsSystem: "
741 << pSystem -> GetName ();
742 if (pSystem -> GetNickname () != "") {
743 G4cout << " (" << pSystem -> GetNickname () << ")";
744 }
745 G4cout << " registered." << G4endl;
746 }
747 }
748 else {
749 if (fVerbosity >= errors) {
750 G4cout << "G4VisManager::RegisterGraphicsSystem: null pointer!"
751 << G4endl;
752 }
753 happy=false;
754 }
755 return happy;
756}

References G4VisManager::confirmations, G4VisManager::errors, G4VisManager::fAvailableGraphicsSystems, G4VisManager::fVerbosity, G4cout, and G4endl.

Referenced by export_G4VisManager().

◆ RegisterGraphicsSystems()

virtual void PyG4VisManager::RegisterGraphicsSystems ( )
inlinevirtual

Implements G4VisManager.

Definition at line 49 of file pyG4VisManager.cc.

49{ }

◆ RegisterMessenger()

void G4VisManager::RegisterMessenger ( G4UImessenger messenger)
inherited

◆ RegisterMessengers()

void G4VisManager::RegisterMessengers ( )
protectedinherited

Definition at line 460 of file G4VisManager.cc.

460 {
461
462 // Instantiate individual messengers/commands (often - but not
463 // always - one command per messenger).
464
465 G4UIcommand* directory;
466
467 directory = new G4UIdirectory ("/vis/geometry/");
468 directory -> SetGuidance("Operations on vis attributes of Geant4 geometry.");
469 fDirectoryList.push_back (directory);
472
473 directory = new G4UIdirectory ("/vis/geometry/set/");
474 directory -> SetGuidance("Set vis attributes of Geant4 geometry.");
475 fDirectoryList.push_back (directory);
486
487#ifdef G4MULTITHREADED
488 directory = new G4UIdirectory ("/vis/multithreading/");
489 directory -> SetGuidance("Commands unique to multithreading mode.");
490 fDirectoryList.push_back (directory);
491 RegisterMessenger(new G4VisCommandMultithreadingActionOnEventQueueFull);
492 RegisterMessenger(new G4VisCommandMultithreadingMaxEventQueueSize);
493#endif
494
495 directory = new G4UIdirectory ("/vis/set/");
496 directory -> SetGuidance
497 ("Set quantities for use in future commands where appropriate.");
498 fDirectoryList.push_back (directory);
508
509 directory = new G4UIdirectory ("/vis/scene/");
510 directory -> SetGuidance ("Operations on Geant4 scenes.");
511 fDirectoryList.push_back (directory);
521
522 directory = new G4UIdirectory ("/vis/scene/add/");
523 directory -> SetGuidance ("Add model to current scene.");
524 fDirectoryList.push_back (directory);
551
552 RegisterMessenger(new G4VisCommandPlotterCreate);
553 RegisterMessenger(new G4VisCommandPlotterSetLayout);
554 RegisterMessenger(new G4VisCommandPlotterAddStyle);
555 RegisterMessenger(new G4VisCommandPlotterAddRegionStyle);
556 RegisterMessenger(new G4VisCommandPlotterAddRegionParameter);
557 RegisterMessenger(new G4VisCommandPlotterClear);
558 RegisterMessenger(new G4VisCommandPlotterClearRegion);
559 RegisterMessenger(new G4VisCommandPlotterList);
560 RegisterMessenger(new G4VisCommandPlotterAddRegionH1);
561 RegisterMessenger(new G4VisCommandPlotterAddRegionH2);
562
563 directory = new G4UIdirectory ("/vis/sceneHandler/");
564 directory -> SetGuidance ("Operations on Geant4 scene handlers.");
565 fDirectoryList.push_back (directory);
570
571 directory = new G4UIdirectory ("/vis/touchable/");
572 directory -> SetGuidance ("Operations on touchables.");
573 fDirectoryList.push_back (directory);
575
576 directory = new G4UIdirectory ("/vis/touchable/set/");
577 directory -> SetGuidance ("Set vis attributes of current touchable.");
578 fDirectoryList.push_back (directory);
580
581 directory = new G4UIdirectory ("/vis/viewer/");
582 directory -> SetGuidance ("Operations on Geant4 viewers.");
583 fDirectoryList.push_back (directory);
608
609 directory = new G4UIdirectory ("/vis/viewer/default/");
610 directory -> SetGuidance("Set default values for future viewers.");
611 fDirectoryList.push_back (directory);
614
615 directory = new G4UIdirectory ("/vis/viewer/set/");
616 directory -> SetGuidance ("Set view parameters of current viewer.");
617 fDirectoryList.push_back (directory);
619
620 // *Basic* top level commands were instantiated in the constructor
621 // so that they can be used immediately after instantiation of the
622 // vis manager. Other top level commands, including "compound commands"
623 // (i.e., commands that invoke other commands) are instantiated here.
624
636
637 // List manager commands
642
643 // Trajectory filter manager commands
648
649 // Hit filter manager commands
654
655 // Digi filter manager commands
660}
G4String Placement() const
void RegisterMessenger(G4UImessenger *messenger)
G4String Placement() const

References G4VisManager::fDirectoryList, G4VisManager::fpDigiFilterMgr, G4VisManager::fpHitFilterMgr, G4VisManager::fpTrajDrawModelMgr, G4VisManager::fpTrajFilterMgr, G4VisFilterManager< T >::Placement(), G4VisModelManager< Model >::Placement(), and G4VisManager::RegisterMessenger().

Referenced by G4VisManager::Initialise().

◆ RegisterModel() [1/4]

void G4VisManager::RegisterModel ( G4VFilter< G4VDigi > *  filter)
inherited

Definition at line 814 of file G4VisManager.cc.

815{
817}

References G4VisManager::fpDigiFilterMgr, and G4VisFilterManager< T >::Register().

◆ RegisterModel() [2/4]

void G4VisManager::RegisterModel ( G4VFilter< G4VHit > *  filter)
inherited

Definition at line 803 of file G4VisManager.cc.

804{
805 fpHitFilterMgr->Register(model);
806}

References G4VisManager::fpHitFilterMgr, and G4VisFilterManager< T >::Register().

◆ RegisterModel() [3/4]

void G4VisManager::RegisterModel ( G4VFilter< G4VTrajectory > *  filter)
inherited

Definition at line 792 of file G4VisManager.cc.

793{
795}

References G4VisManager::fpTrajFilterMgr, and G4VisFilterManager< T >::Register().

◆ RegisterModel() [4/4]

void G4VisManager::RegisterModel ( G4VTrajectoryModel model)
inherited

◆ RegisterModelFactories()

virtual void PyG4VisManager::RegisterModelFactories ( )
inlinevirtual

◆ RegisterModelFactory() [1/4]

void G4VisManager::RegisterModelFactory ( G4DigiFilterFactory factory)
inherited

◆ RegisterModelFactory() [2/4]

void G4VisManager::RegisterModelFactory ( G4HitFilterFactory factory)
inherited

◆ RegisterModelFactory() [3/4]

void G4VisManager::RegisterModelFactory ( G4TrajDrawModelFactory factory)
inherited

◆ RegisterModelFactory() [4/4]

void G4VisManager::RegisterModelFactory ( G4TrajFilterFactory factory)
inherited

◆ RegisterRunDurationUserVisAction()

void G4VisManager::RegisterRunDurationUserVisAction ( const G4String name,
G4VUserVisAction pVisAction,
const G4VisExtent extent = G4VisExtent() 
)
inherited

Definition at line 1415 of file G4VisManager.cc.

1418 {
1419 fRunDurationUserVisActions.push_back(UserVisAction(name,pVisAction));
1420 if (extent.GetExtentRadius() > 0.) {
1421 fUserVisActionExtents[pVisAction] = extent;
1422 } else {
1423 if (fVerbosity >= warnings) {
1424 G4cout <<
1425 "WARNING: No extent set for user vis action \"" << name << "\"."
1426 << G4endl;
1427 }
1428 }
1429 if (fVerbosity >= confirmations) {
1430 G4cout
1431 << "Run duration user vis action \"" << name << "\" registered"
1432 << G4endl;
1433 }
1434}

References G4VisManager::confirmations, G4VisManager::fRunDurationUserVisActions, G4VisManager::fUserVisActionExtents, G4VisManager::fVerbosity, G4cout, G4endl, G4VisExtent::GetExtentRadius(), G4InuclParticleNames::name(), and G4VisManager::warnings.

◆ ResetTransientsDrawnFlags()

void G4VisManager::ResetTransientsDrawnFlags ( )
inherited

Definition at line 2355 of file G4VisManager.cc.

2356{
2360 for (i = fAvailableSceneHandlers.begin();
2361 i != fAvailableSceneHandlers.end(); ++i) {
2362 (*i)->SetTransientsDrawnThisEvent(false);
2363 (*i)->SetTransientsDrawnThisRun(false);
2364 }
2365}
std::vector< G4VSceneHandler * >::const_iterator G4SceneHandlerListConstIterator

References G4VisManager::fAvailableSceneHandlers, G4VisManager::fTransientsDrawnThisEvent, and G4VisManager::fTransientsDrawnThisRun.

Referenced by G4VisManager::SetCurrentScene(), G4VisCommandSceneEndOfEventAction::SetNewValue(), G4VisCommandSceneEndOfRunAction::SetNewValue(), and G4VisCommandViewerClearTransients::SetNewValue().

◆ SelectTrajectoryModel()

void G4VisManager::SelectTrajectoryModel ( const G4String model)
inherited

Definition at line 825 of file G4VisManager.cc.

826{
828}
void SetCurrent(const G4String &)

References G4VisManager::fpTrajDrawModelMgr, and G4VisModelManager< Model >::SetCurrent().

◆ SetAbortReviewKeptEvents()

void G4VisManager::SetAbortReviewKeptEvents ( G4bool  )
inherited

◆ SetAvailableSceneHandlers()

G4SceneHandlerList & G4VisManager::SetAvailableSceneHandlers ( )
inherited

◆ SetConcreteInstance()

void G4VVisManager::SetConcreteInstance ( G4VVisManager man)
staticprotectedinherited

◆ SetCurrentGraphicsSystem()

void G4VisManager::SetCurrentGraphicsSystem ( G4VGraphicsSystem pSystem)
inherited

Definition at line 1487 of file G4VisManager.cc.

1487 {
1488 fpGraphicsSystem = pSystem;
1489 if (fVerbosity >= confirmations) {
1490 G4cout << "G4VisManager::SetCurrentGraphicsSystem: system now "
1491 << pSystem -> GetName () << G4endl;
1492 }
1493 // If current scene handler is of same graphics system, leave unchanged.
1494 // Else find the most recent scene handler of same graphics system.
1495 // Or clear pointers.
1496 if (!(fpSceneHandler && fpSceneHandler -> GetGraphicsSystem () == pSystem)) {
1497 const G4SceneHandlerList& sceneHandlerList = fAvailableSceneHandlers;
1498 G4int nSH = sceneHandlerList.size (); // No. of scene handlers.
1499 G4int iSH;
1500 for (iSH = nSH - 1; iSH >= 0; iSH--) {
1501 if (sceneHandlerList [iSH] -> GetGraphicsSystem () == pSystem) break;
1502 }
1503 if (iSH >= 0) {
1504 fpSceneHandler = sceneHandlerList [iSH];
1505 if (fVerbosity >= confirmations) {
1506 G4cout << " Scene Handler now "
1507 << fpSceneHandler -> GetName () << G4endl;
1508 }
1509 if (fpScene != fpSceneHandler -> GetScene ()) {
1510 fpScene = fpSceneHandler -> GetScene ();
1511 if (fVerbosity >= confirmations) {
1512 G4cout << " Scene now \""
1513 << fpScene -> GetName () << "\"" << G4endl;
1514 }
1515 }
1516 const G4ViewerList& viewerList = fpSceneHandler -> GetViewerList ();
1517 if (viewerList.size ()) {
1518 fpViewer = viewerList [0];
1519 if (fVerbosity >= confirmations) {
1520 G4cout << " Viewer now " << fpViewer -> GetName () << G4endl;
1521 }
1522 }
1523 else {
1524 fpViewer = 0;
1525 }
1526 }
1527 else {
1528 fpSceneHandler = 0;
1529 fpViewer = 0;
1530 }
1531 }
1532}

References G4VisManager::confirmations, G4VisManager::fAvailableSceneHandlers, G4VisManager::fpGraphicsSystem, G4VisManager::fpScene, G4VisManager::fpSceneHandler, G4VisManager::fpViewer, G4VisManager::fVerbosity, G4cout, and G4endl.

Referenced by G4VisCommandDrawTree::SetNewValue().

◆ SetCurrentScene()

void G4VisManager::SetCurrentScene ( G4Scene pScene)
inherited

Definition at line 1478 of file G4VisManager.cc.

1478 {
1479 if (pScene != fpScene) {
1480 // A change of scene. Therefore reset transients drawn flags. All
1481 // memory of previous transient proceessing thereby erased...
1483 }
1484 fpScene = pScene;
1485}
void ResetTransientsDrawnFlags()

References G4VisManager::fpScene, and G4VisManager::ResetTransientsDrawnFlags().

Referenced by G4RayTracerSceneHandler::G4RayTracerSceneHandler(), and G4VisCommandDrawTree::SetNewValue().

◆ SetCurrentSceneHandler()

void G4VisManager::SetCurrentSceneHandler ( G4VSceneHandler pSceneHandler)
inherited

Definition at line 1534 of file G4VisManager.cc.

1534 {
1535 fpSceneHandler = pSceneHandler;
1536 if (fVerbosity >= confirmations) {
1537 G4cout << "G4VisManager::SetCurrentSceneHandler: scene handler now \""
1538 << pSceneHandler -> GetName () << "\"" << G4endl;
1539 }
1540 if (fpScene != fpSceneHandler -> GetScene ()) {
1541 fpScene = fpSceneHandler -> GetScene ();
1542 if (fVerbosity >= confirmations) {
1543 G4cout << " Scene now \""
1544 << fpScene -> GetName () << "\"" << G4endl;
1545 }
1546 }
1547 if (fpGraphicsSystem != pSceneHandler -> GetGraphicsSystem ()) {
1548 fpGraphicsSystem = pSceneHandler -> GetGraphicsSystem ();
1549 if (fVerbosity >= confirmations) {
1550 G4cout << " Graphics system now \""
1551 << fpGraphicsSystem -> GetName () << "\"" << G4endl;
1552 }
1553 }
1554 const G4ViewerList& viewerList = fpSceneHandler -> GetViewerList ();
1555 G4int nViewers = viewerList.size ();
1556 if (nViewers) {
1557 G4int iViewer;
1558 for (iViewer = 0; iViewer < nViewers; iViewer++) {
1559 if (fpViewer == viewerList [iViewer]) break;
1560 }
1561 if (iViewer >= nViewers) {
1562 fpViewer = viewerList [0];
1563 if (fVerbosity >= confirmations) {
1564 G4cout << " Viewer now \"" << fpViewer -> GetName () << "\""
1565 << G4endl;
1566 }
1567 }
1568 if (!IsValidView ()) {
1569 if (fVerbosity >= warnings) {
1570 G4cout <<
1571 "WARNING: Problem setting scene handler - please report circumstances."
1572 << G4endl;
1573 }
1574 }
1575 }
1576 else {
1577 fpViewer = 0;
1578 if (fVerbosity >= warnings) {
1579 G4cout <<
1580 "WARNING: No viewers for this scene handler - please create one."
1581 << G4endl;
1582 }
1583 }
1584}

References G4VisManager::confirmations, G4VisManager::fpGraphicsSystem, G4VisManager::fpScene, G4VisManager::fpSceneHandler, G4VisManager::fpViewer, G4VisManager::fVerbosity, G4cout, G4endl, G4VisManager::IsValidView(), and G4VisManager::warnings.

Referenced by G4VisCommandDrawTree::SetNewValue().

◆ SetCurrentViewer()

void G4VisManager::SetCurrentViewer ( G4VViewer pViewer)
inherited

Definition at line 1586 of file G4VisManager.cc.

1586 {
1587 fpViewer = pViewer;
1588 if (fpViewer == nullptr) {
1589 if (fVerbosity >= confirmations) {
1590 G4cout << "G4VisManager::SetCurrentViewer: current viewer pointer zeroed "
1591 << G4endl;
1592 }
1593 return;
1594 }
1595 if (fVerbosity >= confirmations) {
1596 G4cout << "G4VisManager::SetCurrentViewer: viewer now "
1597 << pViewer -> GetName ()
1598 << G4endl;
1599 }
1600 fpSceneHandler = fpViewer -> GetSceneHandler ();
1601 if (!fpSceneHandler) {
1602 if (fVerbosity >= warnings) {
1603 G4cout <<
1604 "WARNING: No scene handler for this viewer - please create one."
1605 << G4endl;
1606 }
1607 return;
1608 }
1609 // JA: I don't think we need this. Setview will be called when needed.
1610 // fpViewer->SetView();
1611 fpSceneHandler -> SetCurrentViewer (pViewer);
1612 fpScene = fpSceneHandler -> GetScene ();
1613 fpGraphicsSystem = fpSceneHandler -> GetGraphicsSystem ();
1614 if (!IsValidView ()) {
1615 if (fVerbosity >= warnings) {
1616 G4cout <<
1617 "WARNING: Problem setting viewer - please report circumstances."
1618 << G4endl;
1619 }
1620 }
1621}

References G4VisManager::confirmations, G4VisManager::fpGraphicsSystem, G4VisManager::fpScene, G4VisManager::fpSceneHandler, G4VisManager::fpViewer, G4VisManager::fVerbosity, G4cout, G4endl, G4VisManager::IsValidView(), G4VisManager::SetCurrentViewer(), and G4VisManager::warnings.

Referenced by G4VisManager::CreateViewer(), G4VisManager::SetCurrentViewer(), and G4VisCommandDrawTree::SetNewValue().

◆ SetDefaultViewParameters()

void G4VisManager::SetDefaultViewParameters ( const G4ViewParameters )
inherited

◆ SetDrawEventOnlyIfToBeKept()

void G4VisManager::SetDrawEventOnlyIfToBeKept ( G4bool  )
inherited

◆ SetEventRefreshing()

void G4VisManager::SetEventRefreshing ( G4bool  )
inherited

◆ SetRequestedEvent()

void G4VisManager::SetRequestedEvent ( const G4Event )
inherited

◆ SetReviewingKeptEvents()

void G4VisManager::SetReviewingKeptEvents ( G4bool  )
inherited

◆ SetSceneList()

G4SceneList & G4VisManager::SetSceneList ( )
inherited

◆ SetTransientsDrawnThisEvent()

void G4VisManager::SetTransientsDrawnThisEvent ( G4bool  )
inherited

◆ SetTransientsDrawnThisRun()

void G4VisManager::SetTransientsDrawnThisRun ( G4bool  )
inherited

◆ SetVerboseLevel() [1/3]

void G4VisManager::SetVerboseLevel ( const G4String verbosityString)
inherited

Definition at line 2458 of file G4VisManager.cc.

2458 {
2459 fVerbosity = GetVerbosityValue(verbosityString);
2460}

References G4VisManager::fVerbosity, and G4VisManager::GetVerbosityValue().

◆ SetVerboseLevel() [2/3]

void G4VisManager::SetVerboseLevel ( G4int  intVerbosity)
inherited

◆ SetVerboseLevel() [3/3]

void G4VisManager::SetVerboseLevel ( Verbosity  )
inherited

◆ VerbosityString()

G4String G4VisManager::VerbosityString ( Verbosity  verbosity)
staticinherited

Definition at line 2396 of file G4VisManager.cc.

2396 {
2397 G4String rs;
2398 switch (verbosity) {
2399 case quiet: rs = "quiet (0)"; break;
2400 case startup: rs = "startup (1)"; break;
2401 case errors: rs = "errors (2)"; break;
2402 case warnings: rs = "warnings (3)"; break;
2403 case confirmations: rs = "confirmations (4)"; break;
2404 case parameters: rs = "parameters (5)"; break;
2405 case all: rs = "all (6)"; break;
2406 }
2407 return rs;
2408}

References G4VisManager::all, G4VisManager::confirmations, G4VisManager::errors, G4VisManager::parameters, G4VisManager::quiet, G4VisManager::startup, and G4VisManager::warnings.

Referenced by G4VisManager::G4VisManager(), G4VisManager::GetVerbosityValue(), and G4VisCommandVerbose::SetNewValue().

◆ ViewerShortName()

G4String G4VisManager::ViewerShortName ( const G4String viewerName) const
inherited

Definition at line 2367 of file G4VisManager.cc.

2367 {
2368 G4String viewerShortName = viewerName.substr(0, viewerName.find (' '));
2369 return G4StrUtil::strip_copy(viewerShortName);
2370}
G4String strip_copy(G4String str, char c=' ')
Return copy of string with leading and trailing characters removed.

References G4StrUtil::strip_copy().

Referenced by G4VisManager::GetViewer().

Field Documentation

◆ fAbortReviewKeptEvents

G4bool G4VisManager::fAbortReviewKeptEvents
privateinherited

Definition at line 522 of file G4VisManager.hh.

◆ fAvailableGraphicsSystems

G4GraphicsSystemList G4VisManager::fAvailableGraphicsSystems
privateinherited

◆ fAvailableSceneHandlers

G4SceneHandlerList G4VisManager::fAvailableSceneHandlers
privateinherited

◆ fDefaultViewParameters

G4ViewParameters G4VisManager::fDefaultViewParameters
privateinherited

Definition at line 523 of file G4VisManager.hh.

◆ fDirectoryList

std::vector<G4UIcommand*> G4VisManager::fDirectoryList
privateinherited

◆ fDrawEventOnlyIfToBeKept

G4bool G4VisManager::fDrawEventOnlyIfToBeKept
privateinherited

Definition at line 519 of file G4VisManager.hh.

Referenced by G4VisManager::EndOfEvent().

◆ fDrawGroupNestingDepth

G4int G4VisManager::fDrawGroupNestingDepth
privateinherited

◆ fEndOfEventUserVisActions

std::vector<UserVisAction> G4VisManager::fEndOfEventUserVisActions
privateinherited

◆ fEndOfRunUserVisActions

std::vector<UserVisAction> G4VisManager::fEndOfRunUserVisActions
privateinherited

◆ fEventKeepingSuspended

G4bool G4VisManager::fEventKeepingSuspended
privateinherited

◆ fEventRefreshing

G4bool G4VisManager::fEventRefreshing
privateinherited

Definition at line 513 of file G4VisManager.hh.

Referenced by G4VisManager::EndOfRun().

◆ fIgnoreStateChanges

G4bool G4VisManager::fIgnoreStateChanges
privateinherited

◆ fInitialised

G4bool G4VisManager::fInitialised
privateinherited

◆ fIsDrawGroup

G4bool G4VisManager::fIsDrawGroup
privateinherited

◆ fMessengerList

std::vector<G4UImessenger*> G4VisManager::fMessengerList
privateinherited

Definition at line 510 of file G4VisManager.hh.

Referenced by G4VisManager::~G4VisManager().

◆ fNKeepRequests

G4int G4VisManager::fNKeepRequests
privateinherited

◆ fNoOfEventsDrawnThisRun

G4int G4VisManager::fNoOfEventsDrawnThisRun
privateinherited

◆ fpConcreteInstance

G4VVisManager * G4VVisManager::fpConcreteInstance = 0
staticprotectedinherited

◆ fpDigiFilterMgr

G4VisFilterManager<G4VDigi>* G4VisManager::fpDigiFilterMgr
privateinherited

◆ fpGraphicsSystem

G4VGraphicsSystem* G4VisManager::fpGraphicsSystem
privateinherited

◆ fpHitFilterMgr

G4VisFilterManager<G4VHit>* G4VisManager::fpHitFilterMgr
privateinherited

◆ fpInstance

G4VisManager * G4VisManager::fpInstance = 0
staticprivateinherited

◆ fpRequestedEvent

const G4Event* G4VisManager::fpRequestedEvent
privateinherited

Definition at line 520 of file G4VisManager.hh.

◆ fpScene

G4Scene* G4VisManager::fpScene
privateinherited

◆ fpSceneHandler

G4VSceneHandler* G4VisManager::fpSceneHandler
privateinherited

◆ fpStateDependent

G4VisStateDependent* G4VisManager::fpStateDependent
privateinherited

Definition at line 512 of file G4VisManager.hh.

Referenced by G4VisManager::G4VisManager().

◆ fpTrajDrawModelMgr

G4VisModelManager<G4VTrajectoryModel>* G4VisManager::fpTrajDrawModelMgr
privateinherited

◆ fpTrajFilterMgr

G4VisFilterManager<G4VTrajectory>* G4VisManager::fpTrajFilterMgr
privateinherited

◆ fpViewer

G4VViewer* G4VisManager::fpViewer
privateinherited

◆ fReviewingKeptEvents

G4bool G4VisManager::fReviewingKeptEvents
privateinherited

Definition at line 521 of file G4VisManager.hh.

◆ fRunDurationUserVisActions

std::vector<UserVisAction> G4VisManager::fRunDurationUserVisActions
privateinherited

◆ fSceneList

G4SceneList G4VisManager::fSceneList
privateinherited

◆ fTransientsDrawnThisEvent

G4bool G4VisManager::fTransientsDrawnThisEvent
privateinherited

◆ fTransientsDrawnThisRun

G4bool G4VisManager::fTransientsDrawnThisRun
privateinherited

◆ fUserVisActionExtents

std::map<G4VUserVisAction*,G4VisExtent> G4VisManager::fUserVisActionExtents
privateinherited

◆ fVerbose

const G4int G4VisManager::fVerbose
protectedinherited

Definition at line 468 of file G4VisManager.hh.

◆ fVerbosity

G4VisManager::Verbosity G4VisManager::fVerbosity = G4VisManager::warnings
staticprivateinherited

◆ VerbosityGuidanceStrings

std::vector< G4String > G4VisManager::VerbosityGuidanceStrings
staticinherited

The documentation for this class was generated from the following file: