Changeset 1170 for trunk/source/visualization/management/src
- Timestamp:
- Nov 16, 2009, 4:56:12 PM (15 years ago)
- Location:
- trunk/source/visualization/management/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/management/src/G4Scene.cc
r1136 r1170 25 25 // 26 26 // 27 // $Id: G4Scene.cc,v 1.2 3 2006/11/26 15:51:12allison Exp $27 // $Id: G4Scene.cc,v 1.24 2009/11/04 12:49:16 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 50 50 G4bool G4Scene::AddRunDurationModel (G4VModel* pModel, G4bool warn) { 51 51 std::vector<G4VModel*>::const_iterator i; 52 #ifdef G4DEBUG_VIS_MANAGEMENT53 printf("G4Scene::AddRunDurationModel\n");54 #endif55 52 for (i = fRunDurationModelList.begin (); 56 53 i != fRunDurationModelList.end (); ++i) { … … 59 56 } 60 57 if (i != fRunDurationModelList.end ()) { 61 #ifdef G4DEBUG_VIS_MANAGEMENT62 printf("G4Scene::AddRunDurationModel i != fRunDurationModelList.end ()\n");63 #endif64 58 if (warn) { 65 59 G4cout << "G4Scene::AddRunDurationModel: model \"" … … 78 72 79 73 void G4Scene::CalculateExtent () { 80 #ifdef G4DEBUG_VIS_MANAGEMENT81 printf("G4Scene::CalculateExtent\n");82 #endif83 74 G4int nModels = fRunDurationModelList.size (); 84 75 G4BoundingSphereScene boundingSphereScene; … … 93 84 fExtent = boundingSphereScene.GetBoundingSphereExtent (); 94 85 fStandardTargetPoint = fExtent.GetExtentCentre (); 95 #ifdef G4DEBUG_VIS_MANAGEMENT96 printf("G4Scene::CalculateExtent END\n");97 #endif98 86 } 99 87 … … 157 145 } 158 146 147 G4bool G4Scene::AddEndOfRunModel (G4VModel* pModel, G4bool warn) { 148 G4int i, nModels = fEndOfRunModelList.size (); 149 for (i = 0; i < nModels; i++) { 150 if (pModel -> GetGlobalDescription () == 151 fEndOfRunModelList [i] -> GetGlobalDescription ()) break; 152 } 153 if (i < nModels) { 154 delete fEndOfRunModelList[i]; 155 fEndOfRunModelList[i] = pModel; 156 if (warn) { 157 G4cout << "G4Scene::AddEndOfRunModel: a model \"" 158 << pModel -> GetGlobalDescription () 159 << "\"\n is already in the end-of-run list of scene \"" 160 << fName << 161 "\".\n The old model has been deleted; this new model replaces it." 162 << G4endl; 163 } 164 return true; // Model replaced sucessfully. 165 } 166 fEndOfRunModelList.push_back (pModel); 167 return true; 168 } 169 159 170 std::ostream& operator << (std::ostream& os, const G4Scene& s) { 160 171 … … 171 182 for (i = 0; i < s.fEndOfEventModelList.size (); i++) { 172 183 os << "\n " << *(s.fEndOfEventModelList[i]); 184 } 185 186 os << "\n End-of-run model list:"; 187 for (i = 0; i < s.fEndOfRunModelList.size (); i++) { 188 os << "\n " << *(s.fEndOfRunModelList[i]); 173 189 } 174 190 -
trunk/source/visualization/management/src/G4VViewer.cc
r959 r1170 111 111 void G4VViewer::ProcessView () 112 112 { 113 #ifdef G4DEBUG_VIS_MANAGEMENT114 printf("G4VViewer::ProcessView\n");115 #endif116 117 113 // If ClearStore has been requested, e.g., if the scene has changed, 118 114 // or if the concrete viewer has decided that it necessary to visit … … 121 117 // DrawView)... 122 118 if (fNeedKernelVisit) { 123 #ifdef G4DEBUG_VIS_MANAGEMENT124 printf("G4VViewer::ProcessView : NeedKernelVisit\n");125 #endif126 119 // Reset flag. This must be done before ProcessScene to prevent 127 120 // recursive calls when recomputing transients... -
trunk/source/visualization/management/src/G4VisCommandsScene.cc
r1050 r1170 556 556 // Re-draw, forcing rebuild of graphics database, if any... 557 557 aViewer -> NeedKernelVisit(); 558 #ifdef G4DEBUG_VIS_MANAGEMENT559 G4cout << "G4VisCommandSceneNotifyHandlers::SetNewValue." << G4endl;560 printf("\n\nG4VisCommandSceneNotifyHandlers::SetNewValue ---%s--- Call SetView() 1\n",newValue.data());561 #endif562 558 aViewer -> SetView (); 563 #ifdef G4DEBUG_VIS_MANAGEMENT564 printf("G4VisCommandSceneNotifyHandlers::SetNewValue Call SetView() END 2\n");565 printf("G4VisCommandSceneNotifyHandlers::SetNewValue Call ClearView() 3\n");566 #endif567 559 aViewer -> ClearView (); 568 #ifdef G4DEBUG_VIS_MANAGEMENT569 printf("G4VisCommandSceneNotifyHandlers::SetNewValue Call ClearView() END 4\n");570 printf("G4VisCommandSceneNotifyHandlers::SetNewValue Call DrawView() 5\n");571 #endif572 560 aViewer -> DrawView (); 573 #ifdef G4DEBUG_VIS_MANAGEMENT574 printf("G4VisCommandSceneNotifyHandlers::SetNewValue Call DrawView() END 6\n");575 #endif576 561 if (flush) aViewer -> ShowView (); 577 562 if (verbosity >= G4VisManager::confirmations) { … … 629 614 pCurrentSceneHandler -> SetCurrentViewer (pCurrentViewer); 630 615 if (pCurrentViewer && pCurrentSceneHandler->GetScene()) { 631 #ifdef G4DEBUG_VIS_MANAGEMENT632 printf("G4VisCommandSceneNotifyHandlers::SetNewValue Call SetView() 7\n");633 #endif634 616 pCurrentViewer -> SetView (); 635 #ifdef G4DEBUG_VIS_MANAGEMENT 636 printf("G4VisCommandSceneNotifyHandlers::SetNewValue Call SetView() END 8\n"); 637 #endif 638 } 639 } 640 } 641 #ifdef G4DEBUG_VIS_MANAGEMENT 642 G4cout << "G4VisCommandSceneNotifyHandlers::SetNewValue. END" << G4endl; 643 printf("G4VisCommandSceneNotifyHandlers::SetNewValue END 99\n\n\n"); 644 #endif 617 } 618 } 619 } 645 620 } 646 621 -
trunk/source/visualization/management/src/G4VisCommandsSceneAdd.cc
r1140 r1170 25 25 // 26 26 // 27 // $Id: G4VisCommandsSceneAdd.cc,v 1.7 6 2009/10/30 15:58:50allison Exp $27 // $Id: G4VisCommandsSceneAdd.cc,v 1.77 2009/11/04 13:15:02 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // /vis/scene commands - John Allison 9th August 1998 … … 898 898 899 899 G4VisCommandSceneAddPSHits::G4VisCommandSceneAddPSHits () { 900 fpCommand = new G4UIcmdWithoutParameter ("/vis/scene/add/psHits", this); 900 G4bool omitable; 901 fpCommand = new G4UIcmdWithAString ("/vis/scene/add/psHits", this); 901 902 fpCommand -> SetGuidance 902 903 ("Adds Primitive Scorer Hits (PSHits) to current scene."); … … 904 905 ("PSHits are drawn at end of run when the scene in which" 905 906 "\nthey are added is current."); 907 fpCommand -> SetGuidance 908 ("Optional parameter specifies name of scoring map. By default all" 909 "\nscoring maps registered with the G4ScoringManager are drawn."); 910 fpCommand -> SetParameterName ("mapname", omitable = true); 911 fpCommand -> SetDefaultValue ("all"); 906 912 } 907 913 … … 914 920 } 915 921 916 void G4VisCommandSceneAddPSHits::SetNewValue (G4UIcommand*, G4String) { 917 922 void G4VisCommandSceneAddPSHits::SetNewValue 923 (G4UIcommand*, G4String newValue) 924 { 918 925 G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity(); 919 926 G4bool warn(verbosity >= G4VisManager::warnings); … … 927 934 } 928 935 929 G4PSHitsModel* model = new G4PSHitsModel ;936 G4PSHitsModel* model = new G4PSHitsModel(newValue); 930 937 const G4String& currentSceneName = pScene -> GetName (); 931 G4bool successful = pScene -> AddEndOf EventModel (model, warn);938 G4bool successful = pScene -> AddEndOfRunModel (model, warn); 932 939 if (successful) { 933 940 if (verbosity >= G4VisManager::confirmations) { 934 G4cout << "Primitive Scorer hits will be drawn in scene \"" 941 if (newValue == "all") { 942 G4cout << "All Primitive Scorer hits"; 943 } else { 944 G4cout << "Hits of Primitive Scorer \"" << newValue << '"'; 945 } 946 G4cout << " will be drawn at end of run in scene \"" 935 947 << currentSceneName << "\"." 936 948 << G4endl; … … 1249 1261 void G4VisCommandSceneAddText::SetNewValue (G4UIcommand*, G4String newValue) { 1250 1262 1251 #ifdef G4DEBUG_VIS_MANAGEMENT1252 printf("G4VisCommandSceneAddText::SetNewValue -%s-\n",newValue.c_str());1253 #endif1254 1263 G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity(); 1255 1264 G4bool warn = verbosity >= G4VisManager::warnings; … … 1282 1291 const G4String& currentSceneName = pScene -> GetName (); 1283 1292 G4bool successful = pScene -> AddRunDurationModel (model, warn); 1284 #ifdef G4DEBUG_VIS_MANAGEMENT1285 printf("G4VisCommandSceneAddText::SetNewValue success? :%d--\n",successful);1286 #endif1287 1293 if (successful) { 1288 1294 if (verbosity >= G4VisManager::confirmations) { -
trunk/source/visualization/management/src/G4VisCommandsSceneHandler.cc
r1041 r1170 113 113 G4VViewer* pViewer = pSceneHandler -> GetCurrentViewer(); 114 114 if (pViewer && pViewer -> GetViewParameters().IsAutoRefresh()) { 115 #ifdef G4DEBUG_VIS_MANAGEMENT 116 printf("G4VisCommandSceneHandlerAttach::SetNewValue Call SetView()\n"); 117 #endif 118 pViewer -> SetView (); 119 #ifdef G4DEBUG_VIS_MANAGEMENT 120 printf("G4VisCommandSceneHandlerAttach::SetNewValue Call SetView() END\n"); 121 printf("G4VisCommandSceneHandlerAttach::SetNewValue Call ClearView()\n"); 122 #endif 123 pViewer -> ClearView (); 124 #ifdef G4DEBUG_VIS_MANAGEMENT 125 printf("G4VisCommandSceneHandlerAttach::SetNewValue Call ClearView() END\n"); 126 printf("G4VisCommandSceneHandlerAttach::SetNewValue Call DrawView()\n"); 127 #endif 128 pViewer -> DrawView (); 129 #ifdef G4DEBUG_VIS_MANAGEMENT 130 printf("G4VisCommandSceneHandlerAttach::SetNewValue Call DrawView() END\n"); 131 #endif 115 pViewer -> SetView (); 116 pViewer -> ClearView (); 117 pViewer -> DrawView (); 132 118 } 133 119 if (verbosity >= G4VisManager::confirmations) { -
trunk/source/visualization/management/src/G4VisCommandsViewer.cc
r1136 r1170 269 269 } 270 270 271 #ifdef G4DEBUG_VIS_MANAGEMENT272 printf("G4VisCommandViewerClear::SetNewValue Call ClearView()\n");273 #endif274 271 viewer->ClearView(); 275 #ifdef G4DEBUG_VIS_MANAGEMENT276 printf("G4VisCommandViewerClear::SetNewValue Call ClearView() END\n");277 printf("G4VisCommandViewerClear::SetNewValue Call FinishView()\n");278 #endif279 272 viewer->FinishView(); 280 #ifdef G4DEBUG_VIS_MANAGEMENT281 printf("G4VisCommandViewerClear::SetNewValue Call FinishView() END\n");282 #endif283 273 if (verbosity >= G4VisManager::confirmations) { 284 274 G4cout << "Viewer \"" << clearName << "\" cleared." << G4endl; … … 564 554 void G4VisCommandViewerCreate::SetNewValue (G4UIcommand*, G4String newValue) { 565 555 566 #ifdef G4DEBUG_VIS_MANAGEMENT567 printf("G4VisCommandViewerCreate::SetNewValue : %s\n",newValue.c_str());568 #endif569 556 G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity(); 570 557 … … 1150 1137 << G4endl; 1151 1138 } 1152 #ifdef G4DEBUG_VIS_MANAGEMENT1153 printf("G4VisCommandViewerRefresh::SetNewValue Call SetView()\n");1154 #endif1155 1139 viewer -> SetView (); 1156 #ifdef G4DEBUG_VIS_MANAGEMENT1157 printf("G4VisCommandViewerRefresh::SetNewValue Call SetView() END\n");1158 printf("G4VisCommandViewerRefresh::SetNewValue Call ClearView()\n");1159 #endif1160 1140 viewer -> ClearView (); 1161 #ifdef G4DEBUG_VIS_MANAGEMENT1162 printf("G4VisCommandViewerRefresh::SetNewValue Call ClearView() END\n");1163 printf("G4VisCommandViewerRefresh::SetNewValue Call DrawView()\n");1164 #endif1165 1141 viewer -> DrawView (); 1166 #ifdef G4DEBUG_VIS_MANAGEMENT1167 printf("G4VisCommandViewerRefresh::SetNewValue Call DrawView() END\n");1168 #endif1169 1142 if (verbosity >= G4VisManager::confirmations) { 1170 1143 G4cout << "Viewer \"" << viewer -> GetName () << "\"" << " refreshed." -
trunk/source/visualization/management/src/G4VisCommandsViewerSet.cc
r1050 r1170 26 26 // 27 27 // $Id: G4VisCommandsViewerSet.cc,v 1.50 2009/05/13 18:17:25 allison Exp $ 28 // GEANT4 tag $Name: HEAD$28 // GEANT4 tag $Name: $ 29 29 30 30 // /vis/viewer/set commands - John Allison 16th May 2000 -
trunk/source/visualization/management/src/G4VisManager.cc
r1140 r1170 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VisManager.cc,v 1.12 1 2009/10/30 16:03:41allison Exp $26 // $Id: G4VisManager.cc,v 1.122 2009/11/04 12:58:00 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 87 87 fpSceneHandler (0), 88 88 fpViewer (0), 89 fVerbosity ( all),//warnings),89 fVerbosity (warnings), 90 90 fpStateDependent (0), 91 91 fEventRefreshing (false), … … 98 98 // All other objects use default constructors. 99 99 { 100 101 #ifdef G4DEBUG_VIS_MANAGEMENT102 printf("G4VisManager::G4VisManager\n");103 #endif104 100 fpTrajDrawModelMgr = new G4VisModelManager<G4VTrajectoryModel>("/vis/modeling/trajectories"); 105 101 fpTrajFilterMgr = new G4VisFilterManager<G4VTrajectory>("/vis/filtering/trajectories"); … … 178 174 179 175 G4VisManager::~G4VisManager () { 176 printf("G4VisManager::~G4VisManager DELETING \n"); 180 177 fpInstance = 0; 181 178 size_t i; 182 179 for (i = 0; i < fSceneList.size (); ++i) { 180 printf("G4VisManager::~G4VisManager DELETING 1 \n"); 183 181 delete fSceneList[i]; 184 182 } 185 183 for (i = 0; i < fAvailableSceneHandlers.size (); ++i) { 184 printf("G4VisManager::~G4VisManager DELETING 2\n"); 185 if (fAvailableSceneHandlers[i] != NULL) { 186 186 delete fAvailableSceneHandlers[i]; 187 187 } 188 } 188 189 for (i = 0; i < fAvailableGraphicsSystems.size (); ++i) { 189 delete fAvailableGraphicsSystems[i]; 190 printf("G4VisManager::~G4VisManager DELETING 3\n"); 191 if (fAvailableGraphicsSystems[i]) { 192 delete fAvailableGraphicsSystems[i]; 193 } 190 194 } 191 195 if (fVerbosity >= startup) { … … 194 198 } 195 199 for (i = 0; i < fMessengerList.size (); ++i) { 200 printf("G4VisManager::~G4VisManager DELETING 4\n"); 196 201 delete fMessengerList[i]; 197 202 } 198 203 for (i = 0; i < fDirectoryList.size (); ++i) { 204 printf("G4VisManager::~G4VisManager DELETING 5\n"); 199 205 delete fDirectoryList[i]; 200 206 } 201 207 208 printf("G4VisManager::~G4VisManager DELETING 6\n"); 202 209 delete fpTrajDrawModelMgr; 210 printf("G4VisManager::~G4VisManager DELETING 7\n"); 203 211 delete fpTrajFilterMgr; 212 printf("G4VisManager::~G4VisManager DELETING 8\n"); 204 213 delete fpHitFilterMgr; 214 printf("G4VisManager::~G4VisManager DELETING 9\n"); 205 215 } 206 216 … … 379 389 } 380 390 391 392 381 393 const G4VTrajectoryModel* 382 394 G4VisManager::CurrentTrajDrawModel() const … … 665 677 666 678 void G4VisManager::CreateViewer (G4String name,G4String XGeometry) { 667 printf("G4VisManager::CreateViewer -------------------- %s ----%s\n",name.c_str(),XGeometry.c_str());668 679 669 680 if (!fInitialised) Initialise (); … … 674 685 } 675 686 676 printf("G4VisManager::CreateViewer 1-------------------- %s ----%s\n",name.c_str(),XGeometry.c_str());677 687 G4VViewer* p = fpGraphicsSystem -> CreateViewer (*fpSceneHandler, name); 678 printf("G4VisManager::CreateViewer 2-------------------- %s ----%s\n",name.c_str(),XGeometry.c_str());679 688 680 689 if (!p) { … … 749 758 750 759 void G4VisManager::GeometryHasChanged () { 751 #ifdef G4DEBUG_VIS_MANAGEMENT752 printf("G4VisManager::GeometryHasChanged \n");753 #endif754 760 if (fVerbosity >= confirmations) { 755 761 G4cout << "G4VisManager::GeometryHasChanged() called." << G4endl; … … 816 822 // Check the manager's current scene... 817 823 if (fpScene && fpScene -> GetRunDurationModelList ().size () == 0) { 818 #ifdef G4DEBUG_VIS_MANAGEMENT819 printf("G4VisManager::GeometryHasChanged NO MODELS\n");820 #endif821 824 if (fVerbosity >= warnings) { 822 825 G4cout << "WARNING: The current scene \"" … … 827 830 } 828 831 829 }832 } 830 833 void G4VisManager::NotifyHandlers () { 831 834 832 #ifdef G4DEBUG_VIS_MANAGEMENT833 printf("G4VisManager::NotifyHandlers \n");834 #endif835 835 if (fVerbosity >= confirmations) { 836 836 G4cout << "G4VisManager::NotifyHandler() called." << G4endl; … … 861 861 } 862 862 863 #ifdef G4DEBUG_VIS_MANAGEMENT864 printf("G4VisManager::NotifyHandlers END\n");865 #endif866 863 } 867 864 … … 1266 1263 void G4VisManager::EndOfEvent () 1267 1264 { 1268 printf("G4VisManager::EndOfEvent \n");1269 1270 1265 //G4cout << "G4VisManager::EndOfEvent" << G4endl; 1271 1266 … … 1283 1278 if (!currentEvent) return; 1284 1279 1285 // FIXME : OK1286 printf("G4VisManager::EndOfEvent 0\n");1287 1280 ClearTransientStoreIfMarked(); 1288 printf("G4VisManager::EndOfEvent 1\n");1289 // FIXME : OK1290 1281 fpSceneHandler->DrawEvent(currentEvent); 1291 1282 … … 1293 1284 G4int nKeptEvents = 0; 1294 1285 G4int eventID = -2; // (If no run manager, triggers ShowView as normal.) 1295 printf("G4VisManager::EndOfEvent 2\n");1296 1286 if (currentRun) { 1297 printf("G4VisManager::EndOfEvent currentRun?\n");1298 1287 nEventsToBeProcessed = currentRun->GetNumberOfEventToBeProcessed(); 1299 1288 eventID = currentEvent->GetEventID(); … … 1302 1291 if (events) nKeptEvents = events->size(); 1303 1292 } 1304 1293 1305 1294 if (fpScene->GetRefreshAtEndOfEvent()) { 1306 printf("G4VisManager::EndOfEvent GetRefreshAtEndOfEvent()\n");1307 1295 1308 1296 // Unless last event (in which case wait end of run)... 1309 1297 if (eventID < nEventsToBeProcessed - 1) { 1310 printf("G4VisManager::EndOfEvent 3 \n");1311 1298 fpViewer->ShowView(); 1312 1299 fpSceneHandler->SetMarkForClearingTransientStore(true); 1313 1300 } else { // Last event... 1314 printf("G4VisManager::EndOfEvent 4 \n");1315 1301 // Keep, but only if user has not kept any... 1316 1302 if (!nKeptEvents) { … … 1321 1307 1322 1308 } else { // Accumulating events... 1323 printf("G4VisManager::EndOfEvent NOT GetRefreshAtEndOfEvent()\n");1324 1309 1325 1310 G4int maxNumberOfKeptEvents = fpScene->GetMaxNumberOfKeptEvents(); 1326 1311 if (maxNumberOfKeptEvents > 0 && nKeptEvents >= maxNumberOfKeptEvents) { 1327 printf("G4VisManager::EndOfEvent 5 \n");1328 1312 fEventKeepingSuspended = true; 1329 1313 static G4bool warned = false; 1330 1314 if (!warned) { 1331 printf("G4VisManager::EndOfEvent 6 \n");1332 1315 if (fVerbosity >= warnings) { 1333 printf("G4VisManager::EndOfEvent 7 \n");1334 1316 G4cout << 1335 1317 "WARNING: G4VisManager::EndOfEvent: Automatic event keeping suspended." … … 1342 1324 } 1343 1325 } else if (maxNumberOfKeptEvents != 0) { 1344 printf("G4VisManager::EndOfEvent 8 \n");1345 1326 eventManager->KeepTheCurrentEvent(); 1346 1327 } 1347 1328 } 1348 printf("G4VisManager::EndOfEvent 9 \n");1349 1329 } 1350 1330 … … 1352 1332 { 1353 1333 //G4cout << "G4VisManager::EndOfRun" << G4endl; 1354 printf("G4VisManager::EndOfRun 1\n"); 1334 1355 1335 // Don't call IsValidView unless there is a scene handler. This 1356 1336 // avoids WARNING message at end of event and run when the user has 1357 1337 // not instantiated a scene handler, e.g., in batch mode. 1358 1338 G4bool valid = GetConcreteInstance() && fpSceneHandler && IsValidView(); 1359 printf("G4VisManager::EndOfRun 2\n");1360 1339 if (valid) { 1361 printf("G4VisManager::EndOfRun 3\n");1362 1340 if (!fpSceneHandler->GetMarkForClearingTransientStore()) { 1363 printf("G4VisManager::EndOfRun 4\n");1364 1341 if (fpScene->GetRefreshAtEndOfRun()) { 1365 printf("G4VisManager::EndOfRun 5\n");1342 fpSceneHandler->DrawEndOfRunModels(); 1366 1343 fpViewer->ShowView(); 1367 printf("G4VisManager::EndOfRun 6\n");1368 1344 fpSceneHandler->SetMarkForClearingTransientStore(true); 1369 printf("G4VisManager::EndOfRun 7\n"); 1370 } 1371 } 1372 1373 printf("G4VisManager::EndOfRun 8\n"); 1345 } 1346 } 1347 1374 1348 if (fEventKeepingSuspended && fVerbosity >= warnings) { 1375 1349 G4cout << … … 1386 1360 fEventRefreshing = false; 1387 1361 1388 printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");1389 1362 G4RunManager* runManager = G4RunManager::GetRunManager(); 1390 1363 const G4Run* currentRun = runManager->GetCurrentRun(); -
trunk/source/visualization/management/src/G4VisStateDependent.cc
r1038 r1170 37 37 38 38 G4bool G4VisStateDependent::Notify (G4ApplicationState requestedState) { 39 #ifdef G4DEBUG_VIS_MANAGEMENT40 printf("G4VisStateDependent::Notify vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n");41 #endif42 39 G4StateManager* stateManager = G4StateManager::GetStateManager(); 43 40 G4ApplicationState previousState = stateManager->GetPreviousState(); 44 41 if (previousState == G4State_Idle && requestedState == G4State_GeomClosed) { 45 #ifdef G4DEBUG_VIS_MANAGEMENT46 printf("G4VisStateDependent::Notify BeginOfRun \n");47 #endif48 42 fpVisManager -> BeginOfRun (); 49 43 } 50 44 else if (previousState == G4State_GeomClosed && requestedState == G4State_EventProc) { 51 #ifdef G4DEBUG_VIS_MANAGEMENT52 printf("G4VisStateDependent::Notify BeginOfEvent \n");53 #endif54 45 fpVisManager -> BeginOfEvent (); 55 46 } 56 47 else if (previousState == G4State_EventProc && requestedState == G4State_GeomClosed) { 57 #ifdef G4DEBUG_VIS_MANAGEMENT58 printf("G4VisStateDependent::Notify EndOfEvent \n");59 #endif60 48 fpVisManager -> EndOfEvent (); 61 49 } 62 50 else if (previousState == G4State_GeomClosed && requestedState == G4State_Idle) { 63 #ifdef G4DEBUG_VIS_MANAGEMENT64 printf("G4VisStateDependent::Notify EndOfRun -----------------------------------------------------------------------------\n");65 #endif66 51 fpVisManager -> EndOfRun (); 67 #ifdef G4DEBUG_VIS_MANAGEMENT68 printf("G4VisStateDependent::Notify EndOfRun -----------------------------------------XXXXXXXXXXXXXXXXXXXX-----------------\n");69 #endif70 52 } 71 #ifdef G4DEBUG_VIS_MANAGEMENT72 printf("G4VisStateDependent::Notify G4VisStateDependent::Notify END ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");73 #endif74 53 return true; 75 54 }
Note: See TracChangeset
for help on using the changeset viewer.