Changeset 1038 for trunk/source/visualization/management
- Timestamp:
- May 12, 2009, 11:04:00 AM (15 years ago)
- Location:
- trunk/source/visualization/management/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/management/src/G4VSceneHandler.cc
r959 r1038 451 451 if (pPolyhedron) { 452 452 pPolyhedron -> SetVisAttributes (fpVisAttribs); 453 printf("G4VSceneHandler::RequestPrimitives VSolid: %d\n",pPolyhedron); 454 G4cout << 455 "G4VSceneHandler::RequestPrimitives VSolid " << solid.GetName () <<G4endl; 453 456 AddPrimitive (*pPolyhedron); 454 457 } … … 565 568 566 569 if (visManager->GetRequestedEvent()) { 570 #ifdef G4DEBUG_VIS_MANAGEMENT 571 printf("G4VSceneHandler::ProcessScene : DrawEvent\n"); 572 #endif 567 573 DrawEvent(visManager->GetRequestedEvent()); 568 574 569 575 } else { 570 576 577 #ifdef G4DEBUG_VIS_MANAGEMENT 578 printf("G4VSceneHandler::ProcessScene : no event\n"); 579 #endif 571 580 G4RunManager* runManager = G4RunManager::GetRunManager(); 572 581 if (runManager) { 582 #ifdef G4DEBUG_VIS_MANAGEMENT 583 printf("G4VSceneHandler::ProcessScene : runManager\n"); 584 #endif 573 585 const G4Run* run = runManager->GetCurrentRun(); 574 586 const std::vector<const G4Event*>* events = … … 578 590 if (nKeptEvents) { 579 591 592 #ifdef G4DEBUG_VIS_MANAGEMENT 593 printf("G4VSceneHandler::ProcessScene : 1\n"); 594 #endif 580 595 if (fpScene->GetRefreshAtEndOfEvent()) { 596 #ifdef G4DEBUG_VIS_MANAGEMENT 597 printf("G4VSceneHandler::ProcessScene : 2\n"); 598 #endif 581 599 582 600 if (verbosity >= G4VisManager::confirmations) { … … 588 606 589 607 } else { // Accumulating events. 608 #ifdef G4DEBUG_VIS_MANAGEMENT 609 printf("G4VSceneHandler::ProcessScene : 3\n"); 610 #endif 590 611 591 612 if (verbosity >= G4VisManager::confirmations) { … … 593 614 } 594 615 for (size_t i = 0; i < nKeptEvents; ++i) { 616 #ifdef G4DEBUG_VIS_MANAGEMENT 617 printf("G4VSceneHandler::ProcessScene : 4\n"); 618 #endif 595 619 const G4Event* event = (*events)[i]; 596 620 if (event) DrawEvent(event); … … 598 622 599 623 if (!fpScene->GetRefreshAtEndOfRun()) { 624 #ifdef G4DEBUG_VIS_MANAGEMENT 625 printf("G4VSceneHandler::ProcessScene : 5\n"); 626 #endif 600 627 if (verbosity >= G4VisManager::warnings) { 601 628 G4cout << -
trunk/source/visualization/management/src/G4VisManager.cc
r944 r1038 1243 1243 void G4VisManager::EndOfEvent () 1244 1244 { 1245 printf("G4VisManager::EndOfEvent \n"); 1246 1245 1247 //G4cout << "G4VisManager::EndOfEvent" << G4endl; 1246 1248 … … 1258 1260 if (!currentEvent) return; 1259 1261 1262 // FIXME : OK 1263 printf("G4VisManager::EndOfEvent 0\n"); 1260 1264 ClearTransientStoreIfMarked(); 1265 printf("G4VisManager::EndOfEvent 1\n"); 1266 // FIXME : OK 1261 1267 fpSceneHandler->DrawEvent(currentEvent); 1262 1268 … … 1264 1270 G4int nKeptEvents = 0; 1265 1271 G4int eventID = -2; // (If no run manager, triggers ShowView as normal.) 1272 printf("G4VisManager::EndOfEvent 2\n"); 1266 1273 if (currentRun) { 1274 printf("G4VisManager::EndOfEvent currentRun?\n"); 1267 1275 nEventsToBeProcessed = currentRun->GetNumberOfEventToBeProcessed(); 1268 1276 eventID = currentEvent->GetEventID(); … … 1271 1279 if (events) nKeptEvents = events->size(); 1272 1280 } 1273 1281 1274 1282 if (fpScene->GetRefreshAtEndOfEvent()) { 1283 printf("G4VisManager::EndOfEvent GetRefreshAtEndOfEvent()\n"); 1275 1284 1276 1285 // Unless last event (in which case wait end of run)... 1277 1286 if (eventID < nEventsToBeProcessed - 1) { 1287 printf("G4VisManager::EndOfEvent 3 \n"); 1278 1288 fpViewer->ShowView(); 1279 1289 fpSceneHandler->SetMarkForClearingTransientStore(true); 1280 1290 } else { // Last event... 1291 printf("G4VisManager::EndOfEvent 4 \n"); 1281 1292 // Keep, but only if user has not kept any... 1282 1293 if (!nKeptEvents) { … … 1287 1298 1288 1299 } else { // Accumulating events... 1300 printf("G4VisManager::EndOfEvent NOT GetRefreshAtEndOfEvent()\n"); 1289 1301 1290 1302 G4int maxNumberOfKeptEvents = fpScene->GetMaxNumberOfKeptEvents(); 1291 1303 if (maxNumberOfKeptEvents > 0 && nKeptEvents >= maxNumberOfKeptEvents) { 1304 printf("G4VisManager::EndOfEvent 5 \n"); 1292 1305 fEventKeepingSuspended = true; 1293 1306 static G4bool warned = false; 1294 1307 if (!warned) { 1308 printf("G4VisManager::EndOfEvent 6 \n"); 1295 1309 if (fVerbosity >= warnings) { 1310 printf("G4VisManager::EndOfEvent 7 \n"); 1296 1311 G4cout << 1297 1312 "WARNING: G4VisManager::EndOfEvent: Event keeping suspended." … … 1303 1318 } 1304 1319 } else if (maxNumberOfKeptEvents != 0) { 1320 printf("G4VisManager::EndOfEvent 8 \n"); 1305 1321 eventManager->KeepTheCurrentEvent(); 1306 1322 } 1307 1323 } 1324 printf("G4VisManager::EndOfEvent 9 \n"); 1308 1325 } 1309 1326 … … 1311 1328 { 1312 1329 //G4cout << "G4VisManager::EndOfRun" << G4endl; 1313 1330 printf("G4VisManager::EndOfRun 1\n"); 1314 1331 // Don't call IsValidView unless there is a scene handler. This 1315 1332 // avoids WARNING message at end of event and run when the user has 1316 1333 // not instantiated a scene handler, e.g., in batch mode. 1317 1334 G4bool valid = GetConcreteInstance() && fpSceneHandler && IsValidView(); 1335 printf("G4VisManager::EndOfRun 2\n"); 1318 1336 if (valid) { 1337 printf("G4VisManager::EndOfRun 3\n"); 1319 1338 if (!fpSceneHandler->GetMarkForClearingTransientStore()) { 1339 printf("G4VisManager::EndOfRun 4\n"); 1320 1340 if (fpScene->GetRefreshAtEndOfRun()) { 1341 printf("G4VisManager::EndOfRun 5\n"); 1321 1342 fpViewer->ShowView(); 1343 printf("G4VisManager::EndOfRun 6\n"); 1322 1344 fpSceneHandler->SetMarkForClearingTransientStore(true); 1323 } 1324 } 1325 1345 printf("G4VisManager::EndOfRun 7\n"); 1346 } 1347 } 1348 1349 printf("G4VisManager::EndOfRun 8\n"); 1326 1350 if (fEventKeepingSuspended && fVerbosity >= warnings) { 1327 1351 G4cout << … … 1337 1361 fEventRefreshing = false; 1338 1362 1363 printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); 1339 1364 G4RunManager* runManager = G4RunManager::GetRunManager(); 1340 1365 const G4Run* currentRun = runManager->GetCurrentRun(); -
trunk/source/visualization/management/src/G4VisStateDependent.cc
r954 r1038 37 37 38 38 G4bool G4VisStateDependent::Notify (G4ApplicationState requestedState) { 39 #ifdef G4DEBUG_VIS_MANAGEMENT 40 printf("G4VisStateDependent::Notify vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n"); 41 #endif 39 42 G4StateManager* stateManager = G4StateManager::GetStateManager(); 40 43 G4ApplicationState previousState = stateManager->GetPreviousState(); 41 44 if (previousState == G4State_Idle && requestedState == G4State_GeomClosed) { 45 #ifdef G4DEBUG_VIS_MANAGEMENT 46 printf("G4VisStateDependent::Notify BeginOfRun \n"); 47 #endif 42 48 fpVisManager -> BeginOfRun (); 43 49 } 44 50 else if (previousState == G4State_GeomClosed && requestedState == G4State_EventProc) { 51 #ifdef G4DEBUG_VIS_MANAGEMENT 52 printf("G4VisStateDependent::Notify BeginOfEvent \n"); 53 #endif 45 54 fpVisManager -> BeginOfEvent (); 46 55 } 47 56 else if (previousState == G4State_EventProc && requestedState == G4State_GeomClosed) { 57 #ifdef G4DEBUG_VIS_MANAGEMENT 58 printf("G4VisStateDependent::Notify EndOfEvent \n"); 59 #endif 48 60 fpVisManager -> EndOfEvent (); 49 61 } 50 62 else if (previousState == G4State_GeomClosed && requestedState == G4State_Idle) { 63 #ifdef G4DEBUG_VIS_MANAGEMENT 64 printf("G4VisStateDependent::Notify EndOfRun -----------------------------------------------------------------------------\n"); 65 #endif 51 66 fpVisManager -> EndOfRun (); 67 #ifdef G4DEBUG_VIS_MANAGEMENT 68 printf("G4VisStateDependent::Notify EndOfRun -----------------------------------------XXXXXXXXXXXXXXXXXXXX-----------------\n"); 69 #endif 52 70 } 71 #ifdef G4DEBUG_VIS_MANAGEMENT 72 printf("G4VisStateDependent::Notify G4VisStateDependent::Notify END ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"); 73 #endif 53 74 return true; 54 75 }
Note: See TracChangeset
for help on using the changeset viewer.