79 #ifdef G4MULTITHREADED 
   96   fEventRefreshing          (false),
 
   97   fTransientsDrawnThisRun   (false),
 
   98   fTransientsDrawnThisEvent (false),
 
  100   fEventKeepingSuspended    (false),
 
  101   fKeptLastEvent            (false),
 
  102   fpRequestedEvent          (0),
 
  103   fAbortReviewKeptEvents    (false),
 
  104   fIsDrawGroup              (false),
 
  105   fDrawGroupNestingDepth    (0),
 
  106   fIgnoreStateChanges       (false)
 
  115     (
"Simple graded message scheme - digit or string (1st character defines):");
 
  117     (
"  0) quiet,         // Nothing is printed.");
 
  119     (
"  1) startup,       // Startup and endup messages are printed...");
 
  121     (
"  2) errors,        // ...and errors...");
 
  123     (
"  3) warnings,      // ...and warnings...");
 
  125     (
"  4) confirmations, // ...and confirming messages...");
 
  127     (
"  5) parameters,    // ...and parameters of scenes and views...");
 
  129     (
"  6) all            // ...and everything available.");
 
  133       (
"G4VisManager::G4VisManager",
 
  135        "Attempt to Construct more than one VisManager");
 
  147         << 
"Visualization Manager instantiating with verbosity \"" 
  180   directory -> SetGuidance (
"Visualization commands.");
 
  210     G4cout << 
"Visualization Manager deleting..." << 
G4endl;
 
  228       (
"G4VisManager::GetInstance",
 
  237     G4cout << 
"WARNING: G4VisManager::Initialise: already initialised." 
  243     G4cout << 
"Visualization Manager initialising..." << 
G4endl;
 
  248       "\nYou have instantiated your own Visualization Manager, inheriting" 
  249       "\n  G4VisManager and implementing RegisterGraphicsSystems(), in which" 
  250       "\n  you should, normally, instantiate drivers which do not need" 
  251       "\n  external packages or libraries, and, optionally, drivers under" 
  252       "\n  control of environment variables." 
  253       "\n  Also you should implement RegisterModelFactories()." 
  254       "\n  See visualization/include/G4VisExecutive.hh/icc, for example." 
  255       "\n  In your main() you will have something like:" 
  256       "\n  #ifdef G4VIS_USE" 
  257       "\n    G4VisManager* visManager = new G4VisExecutive;" 
  258       "\n    visManager -> SetVerboseLevel (Verbose);" 
  259       "\n    visManager -> Initialize ();" 
  261       "\n  (Don't forget to delete visManager;)" 
  274       "\nYou have successfully registered the following graphics systems." 
  284   directory -> SetGuidance (
"Modeling commands.");
 
  286   directory = 
new G4UIdirectory (
"/vis/modeling/trajectories/");
 
  287   directory -> SetGuidance (
"Trajectory model commands.");
 
  289   directory = 
new G4UIdirectory (
"/vis/modeling/trajectories/create/");
 
  290   directory -> SetGuidance (
"Create trajectory models and messengers.");
 
  295   directory -> SetGuidance (
"Filtering commands.");
 
  297   directory = 
new G4UIdirectory (
"/vis/filtering/trajectories/");
 
  298   directory -> SetGuidance (
"Trajectory filtering commands.");
 
  300   directory = 
new G4UIdirectory (
"/vis/filtering/trajectories/create/");
 
  301   directory -> SetGuidance (
"Create trajectory filters and messengers.");
 
  304   directory -> SetGuidance (
"Hit filtering commands.");
 
  306   directory = 
new G4UIdirectory (
"/vis/filtering/hits/create/");
 
  307   directory -> SetGuidance (
"Create hit filters and messengers.");
 
  310   directory -> SetGuidance (
"Digi filtering commands.");
 
  312   directory = 
new G4UIdirectory (
"/vis/filtering/digi/create/");
 
  313   directory -> SetGuidance (
"Create digi filters and messengers.");
 
  326       "\nYou have successfully registered the following model factories." 
  371   directory -> SetGuidance(
"Operations on vis attributes of Geant4 geometry.");
 
  377   directory -> SetGuidance(
"Set vis attributes of Geant4 geometry.");
 
  390   directory -> SetGuidance
 
  391     (
"Set quantities for use in future commands where appropriate.");
 
  400   directory -> SetGuidance (
"Operations on Geant4 scenes.");
 
  411   directory -> SetGuidance (
"Add model to current scene.");
 
  436   directory -> SetGuidance (
"Operations on Geant4 scene handlers.");
 
  444   directory -> SetGuidance (
"Operations on touchables.");
 
  447   directory -> SetGuidance (
"Set vis attributes of current touchable.");
 
  452   directory -> SetGuidance (
"Operations on Geant4 viewers.");
 
  476   directory -> SetGuidance(
"Set default values for future viewers.");
 
  482   directory -> SetGuidance (
"Set view parameters of current viewer.");
 
  515       G4cout << 
"G4VisManager::Enable: visualization enabled." << 
G4endl;
 
  521         "G4VisManager::Enable: WARNING: visualization remains disabled for" 
  522         "\n  above reasons.  Rectifying with valid vis commands will" 
  523         "\n  automatically enable." 
  533       "G4VisManager::Disable: visualization disabled." 
  534       "\n  The pointer returned by GetConcreteInstance will be zero." 
  535       "\n  Note that it will become enabled after some valid vis commands." 
  544       G4cout << 
"G4VisManager::GetAvailableGraphicsSystems: WARNING: no" 
  545         "\n graphics system available!" 
  546         "\n  1) Did you have environment variables G4VIS_BUILD_xxxx_DRIVER set" 
  547         "\n     when you compiled/built the visualization code?" 
  548         "\n  2) Did you instantiate your own Visualization Manager and forget" 
  549         "\n     to implement RegisterGraphicsSystems correctly?" 
  550         "\n  3) You can register your own graphics system, e.g.," 
  551         "\n     visManager->RegisterGraphicsSystem(new MyGraphicsSystem);)" 
  552         "\n     after instantiating your vis manager and before" 
  553         "\n     visManager->Initialize()." 
  565       G4cout << 
"G4VisManager::RegisterGraphicsSystem: " 
  566              << pSystem -> GetName ();
 
  567       if (pSystem -> GetNickname () != 
"") {
 
  568         G4cout << 
" (" << pSystem -> GetNickname () << 
")";
 
  575       G4cout << 
"G4VisManager::RegisterGraphicsSystem: null pointer!" 
  596       G4cout<<
"G4VisManager: Using G4TrajectoryDrawByCharge as default trajectory model."<<
G4endl;
 
  597       G4cout<<
"See commands in /vis/modeling/trajectories/ for other options."<<
G4endl;
 
  658 #ifdef G4MULTITHREADED 
  664       (
"G4VSceneHandler::BeginDraw",
 
  666        "Nesting detected. It is illegal to nest Begin/EndDraw." 
  679 #ifdef G4MULTITHREADED 
  695 #ifdef G4MULTITHREADED 
  701       (
"G4VSceneHandler::BeginDraw2D",
 
  703        "Nesting detected. It is illegal to nest Begin/EndDraw2D." 
  716 #ifdef G4MULTITHREADED 
  732 #ifdef G4MULTITHREADED 
  736     if (objectTransform != fpSceneHandler->GetObjectTransformation()) {
 
  738         (
"G4VSceneHandler::DrawT",
 
  740          "Different transform detected in Begin/EndDraw group.");
 
  742     fpSceneHandler -> AddPrimitive (graphics_primitive);
 
  744     if (IsValidView ()) {
 
  745       ClearTransientStoreIfMarked();
 
  746       fpSceneHandler -> BeginPrimitives (objectTransform);
 
  747       fpSceneHandler -> AddPrimitive (graphics_primitive);
 
  748       fpSceneHandler -> EndPrimitives ();
 
  755 #ifdef G4MULTITHREADED 
  759     if (objectTransform != fpSceneHandler->GetObjectTransformation()) {
 
  761         (
"G4VSceneHandler::DrawT",
 
  763          "Different transform detected in Begin/EndDraw2D group.");
 
  765     fpSceneHandler -> AddPrimitive (graphics_primitive);
 
  767     if (IsValidView ()) {
 
  768       ClearTransientStoreIfMarked();
 
  769       fpSceneHandler -> BeginPrimitives2D (objectTransform);
 
  770       fpSceneHandler -> AddPrimitive (graphics_primitive);
 
  771       fpSceneHandler -> EndPrimitives2D ();
 
  779   DrawT (circle, objectTransform);
 
  785   DrawT (polyhedron, objectTransform);
 
  791   DrawT (line, objectTransform);
 
  797   DrawT (polymarker, objectTransform);
 
  803   DrawT (scale, objectTransform);
 
  809   DrawT (square, objectTransform);
 
  815   DrawT (text, objectTransform);
 
  821   DrawT2D (circle, objectTransform);
 
  827   DrawT2D (polyhedron, objectTransform);
 
  833   DrawT2D (line, objectTransform);
 
  839   DrawT2D (polymarker, objectTransform);
 
  845   DrawT2D (square, objectTransform);
 
  851   DrawT2D (text, objectTransform);
 
  855 #ifdef G4MULTITHREADED 
  869 #ifdef G4MULTITHREADED 
  883 #ifdef G4MULTITHREADED 
  901 #ifdef G4MULTITHREADED 
  906   Draw (*pSol, attribs, objectTransform);
 
  912 #ifdef G4MULTITHREADED 
  933 #ifdef G4MULTITHREADED 
  937   G4VSolid*        pSol = pLV -> GetSolid ();
 
  938   Draw (*pSol, attribs, objectTransform);
 
  952         G4cout << 
"ERROR in G4VisManager::CreateSceneHandler during " 
  954                << 
" scene handler creation.\n  No action taken." 
  966   if (!fInitialised) Initialise ();
 
  968   if (!fpSceneHandler) {
 
  969     PrintInvalidPointers ();
 
  973   G4VViewer* p = fpGraphicsSystem -> CreateViewer (*fpSceneHandler, name);
 
  976     if (fVerbosity >= errors) {
 
  977       G4cout << 
"ERROR in G4VisManager::CreateViewer during " 
  978              << fpGraphicsSystem -> GetName ()
 
  979              << 
" viewer creation.\n  No action taken." 
  985   if (p -> GetViewId() < 0) {
 
  986     if (fVerbosity >= errors) {
 
  987       G4cout << 
"ERROR in G4VisManager::CreateViewer during " 
  988              << fpGraphicsSystem -> GetName ()
 
  989              << 
" viewer initialisation.\n  No action taken." 
 1000   p -> SetViewParameters(initialvp);
 
 1004   fpSceneHandler -> AddViewerToList (fpViewer);
 
 1005   fpSceneHandler -> SetCurrentViewer (fpViewer);
 
 1006   if (fVerbosity >= confirmations) {
 
 1007     G4cout << 
"G4VisManager::CreateViewer: new viewer created." 
 1012   if (fVerbosity >= parameters) {
 
 1017     static G4bool warned = 
false;
 
 1018     if (fVerbosity >= confirmations) {
 
 1021   "NOTE: objects with visibility flag set to \"false\"" 
 1022   " will not be drawn!" 
 1023   "\n  \"/vis/viewer/set/culling global false\" to Draw such objects." 
 1024   "\n  Also see other \"/vis/viewer/set\" commands." 
 1031     static G4bool warned = 
false;
 
 1032     if (fVerbosity >= warnings) {
 
 1035   "WARNING: covered objects in solid mode will not be rendered!" 
 1036   "\n  \"/vis/viewer/set/culling coveredDaughters false\" to reverse this." 
 1037   "\n  Also see other \"/vis/viewer/set\" commands." 
 1047     G4cout << 
"G4VisManager::GeometryHasChanged() called." << 
G4endl;
 
 1053     -> GetNavigatorForTracking () -> GetWorldVolume ();
 
 1056       G4cout << 
"WARNING: There is no world volume!" << 
G4endl;
 
 1062   G4int iScene, nScenes = sceneList.size ();
 
 1063   for (iScene = 0; iScene < nScenes; iScene++) {
 
 1064     G4Scene* pScene = sceneList [iScene];
 
 1065     std::vector<G4Scene::Model>& modelList = pScene -> SetRunDurationModelList ();
 
 1066     if (modelList.size ()) {
 
 1069         modelInvalid = 
false;
 
 1070         std::vector<G4Scene::Model>::iterator iterModel;
 
 1071         for (iterModel = modelList.begin();
 
 1072              iterModel != modelList.end();
 
 1078               G4cout << 
"WARNING: Model \"" 
 1079                      << iterModel->fpModel->GetGlobalDescription ()
 
 1081                 "\" is no longer valid - being removed\n  from scene \"" 
 1082                      << pScene -> GetName () << 
"\"" 
 1085             modelList.erase (iterModel);
 
 1089       } 
while (modelInvalid);
 
 1091       if (modelList.size () == 0) {
 
 1093           G4cout << 
"WARNING: No models left in this scene \"" 
 1094                  << pScene -> GetName ()
 
 1102           ApplyCommand (
G4String(
"/vis/scene/notifyHandlers " + pScene->
GetName()));
 
 1108   if (
fpScene && 
fpScene -> GetRunDurationModelList ().size () == 0) {
 
 1110       G4cout << 
"WARNING: The current scene \"" 
 1112              << 
"\" has no models." 
 1121     G4cout << 
"G4VisManager::NotifyHandler() called." << 
G4endl;
 
 1126   G4int iScene, nScenes = sceneList.size ();
 
 1127   for (iScene = 0; iScene < nScenes; iScene++) {
 
 1128     G4Scene* pScene = sceneList [iScene];
 
 1129     std::vector<G4Scene::Model>& modelList = pScene -> SetRunDurationModelList ();
 
 1131     if (modelList.size ()) {
 
 1134         ApplyCommand (
G4String(
"/vis/scene/notifyHandlers " + pScene->
GetName()));
 
 1139   if (
fpScene && 
fpScene -> GetRunDurationModelList ().size () == 0) {
 
 1141       G4cout << 
"WARNING: The current scene \"" 
 1143              << 
"\" has no models." 
 1183   assert (0 != trajectoryModel); 
 
 1186       trajectoryModel->
Draw(trajectory, visible);
 
 1194   fRunDurationUserVisActions.push_back(
UserVisAction(name,pVisAction));
 
 1196     fUserVisActionExtents[pVisAction] = extent;
 
 1198     if (fVerbosity >= warnings) {
 
 1200         "WARNING: No extent set for user vis action \"" << name << 
"\"." 
 1210   fEndOfEventUserVisActions.push_back(
UserVisAction(name,pVisAction));
 
 1212     fUserVisActionExtents[pVisAction] = extent;
 
 1214     if (fVerbosity >= warnings) {
 
 1216         "WARNING: No extent set for user vis action \"" << name << 
"\"." 
 1226   fEndOfRunUserVisActions.push_back(
UserVisAction(name,pVisAction));
 
 1228     fUserVisActionExtents[pVisAction] = extent;
 
 1230     if (fVerbosity >= warnings) {
 
 1232         "WARNING: No extent set for user vis action \"" << name << 
"\"." 
 1250     G4cout << 
"G4VisManager::SetCurrentGraphicsSystem: system now " 
 1251            << pSystem -> GetName () << 
G4endl;
 
 1258     G4int nSH = sceneHandlerList.size ();  
 
 1260     for (iSH = nSH - 1; iSH >= 0; iSH--) {
 
 1261       if (sceneHandlerList [iSH] -> GetGraphicsSystem () == pSystem) 
break;
 
 1266         G4cout << 
"  Scene Handler now " 
 1272           G4cout << 
"  Scene now \"" 
 1277       if (viewerList.size ()) {
 
 1297     G4cout << 
"G4VisManager::SetCurrentSceneHandler: scene handler now \"" 
 1298            << pSceneHandler -> GetName () << 
"\"" << 
G4endl;
 
 1303       G4cout << 
"  Scene now \"" 
 1310       G4cout << 
"  Graphics system now \"" 
 1315   G4int nViewers = viewerList.size ();
 
 1318     for (iViewer = 0; iViewer < nViewers; iViewer++) {
 
 1319       if (
fpViewer == viewerList [iViewer]) 
break;
 
 1321     if (iViewer >= nViewers) {
 
 1331   "WARNING: Problem setting scene handler - please report circumstances." 
 1340         "WARNING: No viewers for this scene handler - please create one." 
 1349     G4cout << 
"G4VisManager::SetCurrentViewer: viewer now " 
 1350            << pViewer -> GetName ()
 
 1360         "WARNING: Problem setting viewer - please report circumstances." 
 1367   struct NicknameComparison {
 
 1369     {
return lhs.length()<rhs.length();}
 
 1375   G4cout << 
"Current available graphics systems are:";
 
 1380     std::map<G4String,std::set<G4String,NicknameComparison> > systemMap;
 
 1381     for (
G4int i = 0; i < nSystems; i++) {
 
 1386     std::map<G4String,std::set<G4String,NicknameComparison> >::const_iterator i;
 
 1387     for (i = systemMap.begin(); i != systemMap.end(); ++i) {
 
 1388       G4cout << 
"\n  " << i->first << 
" (";
 
 1389       const std::set<G4String,NicknameComparison>& nicknames = i->second;
 
 1390       std::set<G4String,NicknameComparison>::const_iterator j;
 
 1391       for (j = nicknames.begin(); j != nicknames.end(); ++j) {
 
 1392         if (j != nicknames.begin()) 
G4cout << 
", ";
 
 1399     G4cout << 
"\n  NONE!!!  None registered - yet!  Mmmmm!";
 
 1409     const std::vector<G4VModelFactory<G4VTrajectoryModel>*>& factoryList =
 
 1411     if (factoryList.empty()) 
G4cout << 
"  None" << G4endl;
 
 1413       std::vector<G4VModelFactory<G4VTrajectoryModel>*>::const_iterator i;
 
 1414       for (i = factoryList.begin(); i != factoryList.end(); ++i)
 
 1419     const std::map<G4String, G4VTrajectoryModel*>& modelMap =
 
 1421     if (!modelMap.empty()) {
 
 1423       std::map<G4String, G4VTrajectoryModel*>::const_iterator i;
 
 1424       for (i = modelMap.begin(); i != modelMap.end(); ++i) {
 
 1425         G4cout << 
"  " << i->second->Name();
 
 1426         if (i->second == listManager->
Current()) 
G4cout << 
" (Current)";
 
 1438     const std::vector<G4VModelFactory<G4VFilter<G4VTrajectory> >*>&
 
 1440     if (factoryList.empty()) 
G4cout << 
"  None" << G4endl;
 
 1442       std::vector<G4VModelFactory<G4VFilter<G4VTrajectory> >*>::const_iterator i;
 
 1443       for (i = factoryList.begin(); i != factoryList.end(); ++i)
 
 1446     const std::vector<G4VFilter<G4VTrajectory>*>&
 
 1448     if (!filterList.empty()) {
 
 1450       std::vector<G4VFilter<G4VTrajectory>*>::const_iterator i;
 
 1451       for (i = filterList.begin(); i != filterList.end(); ++i) {
 
 1462     "You have successfully registered the following user vis actions." 
 1464   G4cout << 
"Run Duration User Vis Actions:";
 
 1474   G4cout << 
"End of Event User Vis Actions:";
 
 1484   G4cout << 
"End of Run User Vis Actions:";
 
 1497     "Some /vis commands (optionally) take a string to specify colour." 
 1498     "\nAvailable colours:\n  ";
 
 1500   for (std::map<G4String, G4Colour>::const_iterator i = map.begin();
 
 1503     if (++i != map.end()) 
G4cout << 
", ";
 
 1510     G4cout << 
"ERROR: G4VisManager::PrintInvalidPointers:";
 
 1512       G4cout << 
"\n null graphics system pointer.";
 
 1519           "\n  Null scene pointer. Use \"/vis/drawVolume\" or" 
 1520           " \"/vis/scene/create\".";
 
 1523           "\n  Null scene handler pointer. Use \"/vis/open\" or" 
 1524           " \"/vis/sceneHandler/create\".";
 
 1527           "\n  Null viewer pointer. Use \"/vis/viewer/create\".";
 
 1533 #ifdef G4MULTITHREADED 
 1590     if (maxNumberOfKeptEvents > 0 && 
fNKeepRequests >= maxNumberOfKeptEvents) {
 
 1592       static G4bool warned = 
false;
 
 1596           "WARNING: G4VisManager::EndOfEvent: Automatic event keeping suspended." 
 1597           "\n  The number of events exceeds the maximum, " 
 1598           << maxNumberOfKeptEvents <<
 
 1599           ", that may be kept by \n the vis manager." 
 1604     } 
else if (maxNumberOfKeptEvents != 0) {
 
 1628   if (!currentRun) 
return;
 
 1630   const std::vector<const G4Event*>*
 
 1632   G4int nKeptEvents = eventsFromThreads ? eventsFromThreads->size() : 0;
 
 1635       G4cout << 
"WARNING: " << nKeptEvents;
 
 1636       if (nKeptEvents == 1) 
G4cout << 
" event has";
 
 1637       else G4cout << 
" events have";
 
 1638       G4cout << 
" been kept for refreshing and/or reviewing." << 
G4endl;
 
 1642           G4cout << 
"No keep requests were";
 
 1644           G4cout << 
"Only 1 keep request was";
 
 1650       G4cout << 
"  \"/vis/reviewKeptEvents\" to review them." << 
G4endl;
 
 1656     "WARNING: G4VisManager::EndOfRun: Automatic event keeping was suspended." 
 1657     "\n  The number of events in the run exceeded the maximum, " 
 1659     ", that may be\n  kept by the vis manager." <<
 
 1660     "\n  The number of events kept by the vis manager can be changed with" 
 1661     "\n  \"/vis/scene/endOfEventAction [accumulate|refresh] <N>\", where N" 
 1662     "\n  is the maximum number you wish to allow.  N < 0 means \"unlimited\"." 
 1667     std::vector<const G4Event*>::const_iterator i;
 
 1669       for (i = eventsFromThreads->begin(); i != eventsFromThreads->end(); ++i) {
 
 1671           G4cout << 
"Drawing event " << (*i)->GetEventID() << 
G4endl;
 
 1686         std::vector<G4Scene::Model> tmpEoeModels = eoeModels;
 
 1687         std::vector<G4Scene::Model>::iterator iEoe;
 
 1688         for (iEoe = eoeModels.begin(); iEoe != eoeModels.end(); ++iEoe) {
 
 1689           iEoe->fActive = 
false;
 
 1692         std::vector<G4Scene::Model> tmpEorModels = eorModels;
 
 1693         std::vector<G4Scene::Model>::iterator iEor;
 
 1694         for (iEor = eoeModels.begin(); iEor != eoeModels.end(); ++iEor) {
 
 1695           iEor->fActive = 
false;
 
 1699         eoeModels = tmpEoeModels;
 
 1700         eorModels = tmpEorModels;
 
 1727       std::vector<G4Scene::Model> tmpEoeModels = eoeModels;
 
 1728       std::vector<G4Scene::Model>::iterator iEoe;
 
 1729       for (iEoe = eoeModels.begin(); iEoe != eoeModels.end(); ++iEoe) {
 
 1730         iEoe->fActive = 
false;
 
 1733       std::vector<G4Scene::Model> tmpEorModels = eorModels;
 
 1734       std::vector<G4Scene::Model>::iterator iEor;
 
 1735       for (iEor = eoeModels.begin(); iEor != eoeModels.end(); ++iEor) {
 
 1736         iEor->fActive = 
false;
 
 1740       eoeModels = tmpEoeModels;
 
 1741       eorModels = tmpEorModels;
 
 1745       for (i = eventsFromThreads->begin(); i != eventsFromThreads->end(); ++i) {
 
 1747           G4cout << 
"Drawing event " << (*i)->GetEventID() << 
G4endl;
 
 1801   if (!currentEvent) 
return;
 
 1805   if (!currentRun) 
return;
 
 1822   G4int nEventsToBeProcessed = 0;
 
 1823   G4int nKeptEvents = 0;
 
 1828     const std::vector<const G4Event*>* events =
 
 1830     if (events) nKeptEvents = events->size();
 
 1836     if (eventID < nEventsToBeProcessed - 1) {
 
 1855     if (maxNumberOfKeptEvents > 0 && 
fNKeepRequests >= maxNumberOfKeptEvents) {
 
 1857       static G4bool warned = 
false;
 
 1861  "WARNING: G4VisManager::EndOfEvent: Automatic event keeping suspended." 
 1862  "\n  The number of events exceeds the maximum, " 
 1863                  << maxNumberOfKeptEvents <<
 
 1864  ", that may be kept by\n  the vis manager." 
 1869     } 
else if (maxNumberOfKeptEvents != 0) {
 
 1888   G4int nKeptEvents = 0;
 
 1889   const std::vector<const G4Event*>* events =
 
 1891   if (events) nKeptEvents = events->size();
 
 1895       G4cout << 
"WARNING: " << nKeptEvents;
 
 1896       if (nKeptEvents == 1) 
G4cout << 
" event has";
 
 1897       else G4cout << 
" events have";
 
 1898       G4cout << 
" been kept for refreshing and/or reviewing." << 
G4endl;
 
 1902           G4cout << 
"No keep requests were";
 
 1904           G4cout << 
"Only 1 keep request was";
 
 1910       G4cout << 
"  \"/vis/reviewKeptEvents\" to review them." << 
G4endl;
 
 1931     "WARNING: G4VisManager::EndOfRun: Automatic event keeping was suspended." 
 1932     "\n  The number of events in the run exceeded the maximum, " 
 1934     ", that may be\n  kept by the vis manager." <<
 
 1935     "\n  The number of events kept by the vis manager can be changed with" 
 1936     "\n  \"/vis/scene/endOfEventAction accumulate <N>\", where N is the" 
 1937     "\n  maximum number you wish to allow.  N < 0 means \"unlimited\"." 
 1965 #endif  // End of sequential versions of Begin/EndOfRun/Event. 
 1988     (*i)->SetTransientsDrawnThisEvent(
false);
 
 1989     (*i)->SetTransientsDrawnThisRun(
false);
 
 1994   G4String viewerShortName (viewerName);
 
 1995   viewerShortName = viewerShortName (0, viewerShortName.find (
' '));
 
 1996   return viewerShortName.
strip ();
 
 2002   size_t iHandler, iViewer;
 
 2005   for (iHandler = 0; iHandler < nHandlers; iHandler++) {
 
 2007     const G4ViewerList& viewerList = sceneHandler -> GetViewerList ();
 
 2008     for (iViewer = 0; iViewer < viewerList.size (); iViewer++) {
 
 2009       viewer = viewerList [iViewer];
 
 2010       if (viewerShortName == viewer -> GetShortName ()) {
 
 2017   if (found) 
return viewer;
 
 2025   switch (verbosity) {
 
 2026   case         quiet: rs = 
"quiet (0)"; 
break;
 
 2027   case       startup: rs = 
"startup (1)"; 
break;
 
 2028   case        errors: rs = 
"errors (2)"; 
break;
 
 2029   case      warnings: rs = 
"warnings (3)"; 
break;
 
 2031   case    parameters: rs = 
"parameters (5)"; 
break;
 
 2032   case           all: rs = 
"all (6)"; 
break;
 
 2041   if      (ss(0) == 
'q') verbosity = 
quiet;
 
 2042   else if (ss(0) == 
's') verbosity = 
startup;
 
 2043   else if (ss(0) == 
'e') verbosity = 
errors;
 
 2044   else if (ss(0) == 
'w') verbosity = 
warnings;
 
 2046   else if (ss(0) == 
'p') verbosity = 
parameters;
 
 2047   else if (ss(0) == 
'a') verbosity = 
all;
 
 2050     std::istringstream is(ss);
 
 2053       G4cout << 
"ERROR: G4VisManager::GetVerbosityValue: invalid verbosity \"" 
 2054              << verbosityString << 
"\"";
 
 2072   else if (intVerbosity > 
all)   verbosity = 
all;
 
 2073   else                           verbosity = 
Verbosity(intVerbosity);
 
 2093   static G4bool noGSPrinting = 
true;
 
 2098       noGSPrinting = 
false;
 
 2101   "WARNING: G4VisManager::IsValidView(): Attempt to draw when no graphics system" 
 2102   "\n  has been instantiated.  Use \"/vis/open\" or \"/vis/sceneHandler/create\"." 
 2103   "\n  Alternatively, to avoid this message, suppress instantiation of vis" 
 2104   "\n  manager (G4VisExecutive), possibly by setting G4VIS_NONE, and ensure" 
 2105   "\n  drawing code is executed only if G4VVisManager::GetConcreteInstance()" 
 2116         "ERROR: G4VisManager::IsValidView(): Current view is not valid." 
 2125       G4cout << 
"ERROR: G4VisManager::IsValidView ():";
 
 2128           "\n  The current scene \"" 
 2130                << 
"\" is not handled by" 
 2131           "\n  the current scene handler \"" 
 2134           "\n  (it currently handles scene \"" 
 2138           "\n  (a) attach it to the scene handler with" 
 2139           "\n      /vis/sceneHandler/attach " 
 2142           "\n  (b) create a new scene handler with " 
 2143           "\n      /vis/sceneHandler/create <graphics-system>," 
 2144           "\n      in which case it should pick up the the new scene." 
 2148         G4cout << 
"\n  Scene handler \"" 
 2150                << 
"\" has null scene pointer." 
 2151           "\n  Attach a scene with /vis/sceneHandler/attach [<scene-name>]" 
 2159   if (viewerList.size () == 0) {
 
 2162         "ERROR: G4VisManager::IsValidView (): the current scene handler\n  \"" 
 2164              << 
"\" has no viewers.  Do /vis/viewer/create." 
 2174     if (!successful || 
fpScene -> IsEmpty ()) {        
 
 2176         G4cout << 
"ERROR: G4VisManager::IsViewValid ():";
 
 2178           "\n  Attempt at some drawing operation when scene is empty." 
 2179           "\n  Maybe the geometry has not yet been defined." 
 2180           "  Try /run/initialize." 
 2189           "WARNING: G4VisManager: the scene was empty, \"world\" has been" 
 2190           "\n  added and the scene handlers notified.";
 
 2202     G4cout<<
"G4VisManager: No model factories registered with G4VisManager."<<
G4endl;
 
 2203     G4cout<<
"G4VisManager::RegisterModelFactories() should be overridden in derived"<<
G4endl;
 
 2204     G4cout<<
"class. See G4VisExecutive for an example."<<
G4endl;
 
 2208 #ifdef G4MULTITHREADED 
 2209 void G4VisManager::SetUpForAThread()
 
G4bool FilterDigi(const G4VDigi &)
 
void RegisterEndOfEventUserVisAction(const G4String &name, G4VUserVisAction *, const G4VisExtent &=G4VisExtent::NullExtent)
 
void RegisterModelFactory(G4TrajDrawModelFactory *factory)
 
G4VisFilterManager< G4VTrajectory > * fpTrajFilterMgr
 
static Verbosity fVerbosity
 
const std::vector< Factory * > & FactoryList() const 
 
void PrintAvailableColours(Verbosity) const 
 
G4VisFilterManager< G4VHit > * fpHitFilterMgr
 
void PrintAvailableUserVisActions(Verbosity) const 
 
virtual void RegisterModelFactories()
 
void PrintAvailableModels(Verbosity) const 
 
void SetCurrentSceneHandler(G4VSceneHandler *)
 
G4TrajectoriesModel dummyTrajectoriesModel
 
static G4VVisManager * GetConcreteInstance()
 
G4String strip(G4int strip_Type=trailing, char c=' ')
 
G4bool IsCullingInvisible() const 
 
void RegisterEndOfRunUserVisAction(const G4String &name, G4VUserVisAction *, const G4VisExtent &=G4VisExtent::NullExtent)
 
G4VisStateDependent * fpStateDependent
 
void PrintInvalidPointers() const 
 
void SetVerboseLevel(G4int)
 
const G4ViewParameters & GetViewParameters() const 
 
void GeometryHasChanged()
 
const std::vector< const G4Event * > * GetEventVector() const 
 
const Model * Current() const 
 
void SetCurrentScene(G4Scene *)
 
std::vector< Model > & SetEndOfRunModelList()
 
G4bool GetMarkForClearingTransientStore() const 
 
G4bool GetRefreshAtEndOfEvent() const 
 
static std::vector< G4String > VerbosityGuidanceStrings
 
const G4String & GetName() const 
 
static Verbosity GetVerbosityValue(const G4String &)
 
const G4Run * GetCurrentRun() const 
 
#define G4MUTEX_INITIALIZER
 
void BeginDraw(const G4Transform3D &objectTransformation=G4Transform3D())
 
const G4VTrajectoryModel * CurrentTrajDrawModel() const 
 
G4bool fTransientsDrawnThisEvent
 
const std::vector< Filter * > & FilterList() const 
 
std::vector< G4UIcommand * > fDirectoryList
 
std::vector< G4UImessenger * > fMessengerList
 
static G4UImanager * GetUIpointer()
 
void RegisterMessengers()
 
std::vector< G4VSceneHandler * >::const_iterator G4SceneHandlerListConstIterator
 
static G4VisManager * fpInstance
 
G4String Placement() const 
 
void RegisterMessenger(G4UImessenger *messenger)
 
void SelectTrajectoryModel(const G4String &model)
 
G4VSceneHandler * fpSceneHandler
 
void PrintAvailableGraphicsSystems() const 
 
void SetTransientsDrawnThisEvent(G4bool)
 
std::vector< UserVisAction > fEndOfRunUserVisActions
 
G4double GetExtentRadius() const 
 
G4int fDrawGroupNestingDepth
 
virtual void IgnoreStateChanges(G4bool)
 
G4bool fEventKeepingSuspended
 
G4String ViewerShortName(const G4String &viewerName) const 
 
friend class G4VisStateDependent
 
G4GLOB_DLL std::ostream G4cout
 
std::vector< UserVisAction > fRunDurationUserVisActions
 
G4VisModelManager< G4VTrajectoryModel > * fpTrajDrawModelMgr
 
G4SceneHandlerList fAvailableSceneHandlers
 
const std::map< G4String, T * > & Map() const 
 
G4bool FilterTrajectory(const G4VTrajectory &)
 
virtual void Draw(const G4VTrajectory &trajectory, const G4bool &visible=true) const =0
 
G4bool GetRefreshAtEndOfRun() const 
 
void ResetTransientsDrawnFlags()
 
G4bool GetTransientsDrawnThisRun() const 
 
static G4VisManager * GetInstance()
 
void SetCurrentGraphicsSystem(G4VGraphicsSystem *)
 
void SetXGeometryString(const G4String &)
 
const T * Current() const 
 
void DrawEndOfRunModels()
 
G4bool GetTransientsDrawnThisEvent() const 
 
G4bool IsCullingCovered() const 
 
G4VisFilterManager< G4VDigi > * fpDigiFilterMgr
 
const G4String & GetNickname() const 
 
G4String Placement() const 
 
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
 
static G4TransportationManager * GetTransportationManager()
 
void RegisterRunDurationUserVisAction(const G4String &name, G4VUserVisAction *, const G4VisExtent &=G4VisExtent::NullExtent)
 
void SetCurrentViewer(G4VViewer *)
 
virtual void DescribeYourselfTo(G4VGraphicsScene &scene) const =0
 
static G4RunManager * GetRunManager()
 
G4Scene * GetScene() const 
 
void SetCurrent(const G4String &)
 
G4GraphicsSystemList fAvailableGraphicsSystems
 
const G4String & GetName() const 
 
G4VisManager(const G4String &verbosityString="warnings")
 
G4bool FilterHit(const G4VHit &)
 
G4LogicalVolume * GetLogicalVolume() const 
 
void DrawEvent(const G4Event *)
 
G4VViewer * GetViewer(const G4String &viewerName) const 
 
void DrawT(const T &graphics_primitive, const G4Transform3D &objectTransform)
 
std::vector< UserVisAction > fEndOfEventUserVisActions
 
std::vector< Model > & SetEndOfEventModelList()
 
void BeginDraw2D(const G4Transform3D &objectTransformation=G4Transform3D())
 
static G4String VerbosityString(Verbosity)
 
static G4EventManager * GetEventManager()
 
const List * ListManager() const 
 
FilterMode::Mode GetMode() const 
 
static Verbosity GetVerbosity()
 
G4bool fIgnoreStateChanges
 
void Draw(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())
 
static void SetVisManager(G4VisManager *)
 
virtual void RegisterGraphicsSystems()=0
 
G4int GetNumberOfEventToBeProcessed() const 
 
void RegisterModel(G4VTrajectoryModel *model)
 
const std::vector< Factory * > & FactoryList() const 
 
G4bool RegisterGraphicsSystem(G4VGraphicsSystem *)
 
void DispatchToModel(const G4VTrajectory &)
 
static const std::map< G4String, G4Colour > & GetMap()
 
void CreateViewer(const G4String &name="", const G4String &XGeometry="")
 
virtual void ClearTransientStore()
 
void SetTransientsDrawnThisRun(G4bool)
 
const G4Event * GetConstCurrentEvent()
 
void CreateSceneHandler(const G4String &name="")
 
G4VGraphicsSystem * fpGraphicsSystem
 
void DrawT2D(const T &graphics_primitive, const G4Transform3D &objectTransform)
 
const G4GraphicsSystemList & GetAvailableGraphicsSystems()
 
G4int GetMaxNumberOfKeptEvents() const 
 
static void SetConcreteInstance(G4VVisManager *)
 
void Draw2D(const G4Circle &, const G4Transform3D &objectTransformation=G4Transform3D())
 
void ClearTransientStoreIfMarked()
 
void SetMarkForClearingTransientStore(G4bool)
 
void KeepTheCurrentEvent()
 
G4bool IsAutoRefresh() const 
 
G4int ApplyCommand(const char *aCommand)
 
G4VSolid * GetSolid() const 
 
G4bool fTransientsDrawnThisRun