Ignore:
Timestamp:
May 12, 2009, 11:04:00 AM (15 years ago)
Author:
garnier
Message:

en test pour les refresh, ne marche pas bien

Location:
trunk/source/visualization/management/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/management/src/G4VSceneHandler.cc

    r959 r1038  
    451451    if (pPolyhedron) {
    452452      pPolyhedron -> SetVisAttributes (fpVisAttribs);
     453      printf("G4VSceneHandler::RequestPrimitives VSolid: %d\n",pPolyhedron);
     454      G4cout <<
     455        "G4VSceneHandler::RequestPrimitives VSolid " << solid.GetName () <<G4endl;
    453456      AddPrimitive (*pPolyhedron);
    454457    }
     
    565568
    566569    if (visManager->GetRequestedEvent()) {
     570#ifdef G4DEBUG_VIS_MANAGEMENT
     571      printf("G4VSceneHandler::ProcessScene : DrawEvent\n");
     572#endif
    567573      DrawEvent(visManager->GetRequestedEvent());
    568574
    569575    } else {
    570576
     577#ifdef G4DEBUG_VIS_MANAGEMENT
     578      printf("G4VSceneHandler::ProcessScene : no event\n");
     579#endif
    571580      G4RunManager* runManager = G4RunManager::GetRunManager();
    572581      if (runManager) {
     582#ifdef G4DEBUG_VIS_MANAGEMENT
     583        printf("G4VSceneHandler::ProcessScene : runManager\n");
     584#endif
    573585        const G4Run* run = runManager->GetCurrentRun();
    574586        const std::vector<const G4Event*>* events =
     
    578590        if (nKeptEvents) {
    579591
     592#ifdef G4DEBUG_VIS_MANAGEMENT
     593        printf("G4VSceneHandler::ProcessScene : 1\n");
     594#endif
    580595          if (fpScene->GetRefreshAtEndOfEvent()) {
     596#ifdef G4DEBUG_VIS_MANAGEMENT
     597        printf("G4VSceneHandler::ProcessScene : 2\n");
     598#endif
    581599
    582600            if (verbosity >= G4VisManager::confirmations) {
     
    588606
    589607          } else {  // Accumulating events.
     608#ifdef G4DEBUG_VIS_MANAGEMENT
     609        printf("G4VSceneHandler::ProcessScene : 3\n");
     610#endif
    590611
    591612            if (verbosity >= G4VisManager::confirmations) {
     
    593614            }
    594615            for (size_t i = 0; i < nKeptEvents; ++i) {
     616#ifdef G4DEBUG_VIS_MANAGEMENT
     617        printf("G4VSceneHandler::ProcessScene : 4\n");
     618#endif
    595619              const G4Event* event = (*events)[i];
    596620              if (event) DrawEvent(event);
     
    598622
    599623            if (!fpScene->GetRefreshAtEndOfRun()) {
     624#ifdef G4DEBUG_VIS_MANAGEMENT
     625        printf("G4VSceneHandler::ProcessScene : 5\n");
     626#endif
    600627              if (verbosity >= G4VisManager::warnings) {
    601628                G4cout <<
  • trunk/source/visualization/management/src/G4VisManager.cc

    r944 r1038  
    12431243void G4VisManager::EndOfEvent ()
    12441244{
     1245  printf("G4VisManager::EndOfEvent \n");
     1246
    12451247  //G4cout << "G4VisManager::EndOfEvent" << G4endl;
    12461248
     
    12581260  if (!currentEvent) return;
    12591261
     1262  // FIXME : OK
     1263  printf("G4VisManager::EndOfEvent 0\n");
    12601264  ClearTransientStoreIfMarked();
     1265  printf("G4VisManager::EndOfEvent 1\n");
     1266  // FIXME : OK
    12611267  fpSceneHandler->DrawEvent(currentEvent);
    12621268
     
    12641270  G4int nKeptEvents = 0;
    12651271  G4int eventID = -2;  // (If no run manager, triggers ShowView as normal.)
     1272  printf("G4VisManager::EndOfEvent 2\n");
    12661273  if (currentRun) {
     1274    printf("G4VisManager::EndOfEvent currentRun?\n");
    12671275    nEventsToBeProcessed = currentRun->GetNumberOfEventToBeProcessed();
    12681276    eventID = currentEvent->GetEventID();
     
    12711279    if (events) nKeptEvents = events->size();
    12721280  }
    1273 
     1281 
    12741282  if (fpScene->GetRefreshAtEndOfEvent()) {
     1283    printf("G4VisManager::EndOfEvent GetRefreshAtEndOfEvent()\n");
    12751284
    12761285    // Unless last event (in which case wait end of run)...
    12771286    if (eventID < nEventsToBeProcessed - 1) {
     1287      printf("G4VisManager::EndOfEvent 3 \n");
    12781288      fpViewer->ShowView();
    12791289      fpSceneHandler->SetMarkForClearingTransientStore(true);
    12801290    } else {  // Last event...
     1291      printf("G4VisManager::EndOfEvent 4 \n");
    12811292      // Keep, but only if user has not kept any...
    12821293      if (!nKeptEvents) {
     
    12871298
    12881299  } else {  //  Accumulating events...
     1300  printf("G4VisManager::EndOfEvent NOT GetRefreshAtEndOfEvent()\n");
    12891301
    12901302    G4int maxNumberOfKeptEvents = fpScene->GetMaxNumberOfKeptEvents();
    12911303    if (maxNumberOfKeptEvents > 0 && nKeptEvents >= maxNumberOfKeptEvents) {
     1304      printf("G4VisManager::EndOfEvent 5 \n");
    12921305      fEventKeepingSuspended = true;
    12931306      static G4bool warned = false;
    12941307      if (!warned) {
     1308        printf("G4VisManager::EndOfEvent 6 \n");
    12951309        if (fVerbosity >= warnings) {
     1310          printf("G4VisManager::EndOfEvent 7 \n");
    12961311          G4cout <<
    12971312            "WARNING: G4VisManager::EndOfEvent: Event keeping suspended."
     
    13031318      }
    13041319    } else if (maxNumberOfKeptEvents != 0) {
     1320      printf("G4VisManager::EndOfEvent 8 \n");
    13051321      eventManager->KeepTheCurrentEvent();
    13061322    }
    13071323  }
     1324  printf("G4VisManager::EndOfEvent 9 \n");
    13081325}
    13091326
     
    13111328{
    13121329  //G4cout << "G4VisManager::EndOfRun" << G4endl;
    1313 
     1330  printf("G4VisManager::EndOfRun 1\n");
    13141331  // Don't call IsValidView unless there is a scene handler.  This
    13151332  // avoids WARNING message at end of event and run when the user has
    13161333  // not instantiated a scene handler, e.g., in batch mode.
    13171334  G4bool valid = GetConcreteInstance() && fpSceneHandler && IsValidView();
     1335  printf("G4VisManager::EndOfRun 2\n");
    13181336  if (valid) {
     1337  printf("G4VisManager::EndOfRun 3\n");
    13191338    if (!fpSceneHandler->GetMarkForClearingTransientStore()) {
     1339  printf("G4VisManager::EndOfRun 4\n");
    13201340      if (fpScene->GetRefreshAtEndOfRun()) {
     1341  printf("G4VisManager::EndOfRun 5\n");
    13211342        fpViewer->ShowView();
     1343  printf("G4VisManager::EndOfRun 6\n");
    13221344        fpSceneHandler->SetMarkForClearingTransientStore(true);
    1323       }
    1324     }
    1325 
     1345  printf("G4VisManager::EndOfRun 7\n");
     1346      }
     1347    }
     1348
     1349  printf("G4VisManager::EndOfRun 8\n");
    13261350    if (fEventKeepingSuspended && fVerbosity >= warnings) {
    13271351      G4cout <<
     
    13371361  fEventRefreshing = false;
    13381362
     1363  printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
    13391364  G4RunManager* runManager = G4RunManager::GetRunManager();
    13401365  const G4Run* currentRun = runManager->GetCurrentRun();
  • trunk/source/visualization/management/src/G4VisStateDependent.cc

    r954 r1038  
    3737
    3838G4bool G4VisStateDependent::Notify (G4ApplicationState requestedState) {
     39#ifdef G4DEBUG_VIS_MANAGEMENT
     40    printf("G4VisStateDependent::Notify  vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n");
     41#endif
    3942  G4StateManager* stateManager = G4StateManager::GetStateManager();
    4043  G4ApplicationState previousState = stateManager->GetPreviousState();
    4144  if (previousState == G4State_Idle  &&  requestedState == G4State_GeomClosed) {
     45#ifdef G4DEBUG_VIS_MANAGEMENT
     46    printf("G4VisStateDependent::Notify BeginOfRun \n");
     47#endif
    4248    fpVisManager -> BeginOfRun ();
    4349  }
    4450  else if (previousState == G4State_GeomClosed &&  requestedState == G4State_EventProc) {
     51#ifdef G4DEBUG_VIS_MANAGEMENT
     52    printf("G4VisStateDependent::Notify BeginOfEvent \n");
     53#endif
    4554    fpVisManager -> BeginOfEvent ();
    4655  }
    4756  else if (previousState == G4State_EventProc &&  requestedState == G4State_GeomClosed) {
     57#ifdef G4DEBUG_VIS_MANAGEMENT
     58    printf("G4VisStateDependent::Notify EndOfEvent \n");
     59#endif
    4860    fpVisManager -> EndOfEvent ();
    4961  }
    5062  else if (previousState == G4State_GeomClosed &&  requestedState == G4State_Idle) {
     63#ifdef G4DEBUG_VIS_MANAGEMENT
     64    printf("G4VisStateDependent::Notify EndOfRun -----------------------------------------------------------------------------\n");
     65#endif
    5166    fpVisManager -> EndOfRun ();
     67#ifdef G4DEBUG_VIS_MANAGEMENT
     68    printf("G4VisStateDependent::Notify EndOfRun -----------------------------------------XXXXXXXXXXXXXXXXXXXX-----------------\n");
     69#endif
    5270  }
     71#ifdef G4DEBUG_VIS_MANAGEMENT
     72    printf("G4VisStateDependent::Notify G4VisStateDependent::Notify END ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
     73#endif
    5374  return true;
    5475}
Note: See TracChangeset for help on using the changeset viewer.