Ignore:
Timestamp:
Nov 16, 2009, 4:56:12 PM (15 years ago)
Author:
garnier
Message:

update contre CVS

Location:
trunk/source/visualization/management
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/management/GNUmakefile

    r1009 r1170  
    1 # $Id: GNUmakefile,v 1.15 2006/11/01 10:56:04 allison Exp $
     1# $Id: GNUmakefile,v 1.16 2009/11/04 12:58:43 allison Exp $
    22# -------------------------------------------------------------
    33# GNUmakefile for visualization library.  John Allison, 5/7/95.
     
    4444CPPFLAGS += -I$(G4BASE)/track/include
    4545CPPFLAGS += -I$(G4BASE)/processes/management/include
     46CPPFLAGS += -I$(G4BASE)/digits_hits/utils/include
    4647CPPFLAGS += -I$(G4BASE)/digits_hits/digits/include
    4748
  • trunk/source/visualization/management/include/G4Scene.hh

    r954 r1170  
    2525//
    2626//
    27 // $Id: G4Scene.hh,v 1.18 2006/11/14 14:59:54 allison Exp $
     27// $Id: G4Scene.hh,v 1.19 2009/11/04 12:49:16 allison Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    8080  // scene is current.
    8181
     82  const std::vector<G4VModel*>& GetEndOfRunModelList () const;
     83  // Contains models which are described at the end of event when the
     84  // scene is current.
     85
    8286  const G4VisExtent& GetExtent () const;
    8387  // Overall extent of all objects in the scene.
     
    125129  // Prints warnings if warn is true.
    126130
     131  G4bool AddEndOfRunModel (G4VModel*, G4bool warn = false);
     132  // Adds models of type which are described at the end of run when
     133  // the scene is current.
     134  // Returns false if model is already in the list.
     135  // Prints warnings if warn is true.
     136
    127137  std::vector<G4VModel*>& SetRunDurationModelList ();
    128138  // Allows you to change the model list - do with care!
    129139
    130140  std::vector<G4VModel*>& SetEndOfEventModelList ();
     141  // Allows you to change the model list - do with care!
     142
     143  std::vector<G4VModel*>& SetEndOfRunModelList ();
    131144  // Allows you to change the model list - do with care!
    132145
     
    158171  std::vector<G4VModel*> fRunDurationModelList;
    159172  std::vector<G4VModel*> fEndOfEventModelList;
     173  std::vector<G4VModel*> fEndOfRunModelList;
    160174  G4VisExtent fExtent;
    161175  G4Point3D   fStandardTargetPoint;
  • trunk/source/visualization/management/include/G4Scene.icc

    r954 r1170  
    2525//
    2626//
    27 // $Id: G4Scene.icc,v 1.14 2006/11/14 14:59:54 allison Exp $
     27// $Id: G4Scene.icc,v 1.15 2009/11/04 12:49:16 allison Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    5151G4Scene::GetEndOfEventModelList () const {
    5252  return fEndOfEventModelList;
     53}
     54
     55inline const std::vector<G4VModel*>&
     56G4Scene::GetEndOfRunModelList () const {
     57  return fEndOfRunModelList;
    5358}
    5459
     
    8085inline std::vector<G4VModel*>& G4Scene::SetEndOfEventModelList ()
    8186{
    82   return fRunDurationModelList;
     87  return fEndOfEventModelList;
     88}
     89
     90inline std::vector<G4VModel*>& G4Scene::SetEndOfRunModelList ()
     91{
     92  return fEndOfRunModelList;
    8393}
    8494
  • trunk/source/visualization/management/include/G4VSceneHandler.hh

    r1140 r1170  
    2525//
    2626//
    27 // $Id: G4VSceneHandler.hh,v 1.41 2009/10/21 14:26:59 allison Exp $
     27// $Id: G4VSceneHandler.hh,v 1.42 2009/11/04 12:55:33 allison Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    270270  // hits, etc.
    271271
     272  void DrawEndOfRunModels();
     273  // Draws end-of-run models.
     274
    272275  //////////////////////////////////////////////////////////////
    273276  // Administration functions.
  • trunk/source/visualization/management/include/G4VisCommandsSceneAdd.hh

    r1140 r1170  
    2525//
    2626//
    27 // $Id: G4VisCommandsSceneAdd.hh,v 1.18 2009/10/30 15:58:50 allison Exp $
     27// $Id: G4VisCommandsSceneAdd.hh,v 1.19 2009/11/04 13:15:02 allison Exp $
    2828// GEANT4 tag $Name:  $
    2929
     
    142142  G4VisCommandSceneAddPSHits (const G4VisCommandSceneAddPSHits&);
    143143  G4VisCommandSceneAddPSHits& operator = (const G4VisCommandSceneAddPSHits&);
    144   G4UIcmdWithoutParameter* fpCommand;
     144  G4UIcmdWithAString* fpCommand;
    145145};
    146146
  • trunk/source/visualization/management/include/G4VisCommandsViewerSet.hh

    r1042 r1170  
    2626//
    2727// $Id: G4VisCommandsViewerSet.hh,v 1.23 2009/05/13 18:17:25 allison Exp $
    28 // GEANT4 tag $Name: HEAD $
     28// GEANT4 tag $Name: $
    2929
    3030// /vis/viewer/set commands - John Allison  16th May 2000
  • trunk/source/visualization/management/src/G4Scene.cc

    r1136 r1170  
    2525//
    2626//
    27 // $Id: G4Scene.cc,v 1.23 2006/11/26 15:51:12 allison Exp $
     27// $Id: G4Scene.cc,v 1.24 2009/11/04 12:49:16 allison Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    5050G4bool G4Scene::AddRunDurationModel (G4VModel* pModel, G4bool warn) {
    5151  std::vector<G4VModel*>::const_iterator i;
    52 #ifdef G4DEBUG_VIS_MANAGEMENT
    53   printf("G4Scene::AddRunDurationModel\n");
    54 #endif
    5552  for (i = fRunDurationModelList.begin ();
    5653       i != fRunDurationModelList.end (); ++i) {
     
    5956  }
    6057  if (i != fRunDurationModelList.end ()) {
    61 #ifdef G4DEBUG_VIS_MANAGEMENT
    62     printf("G4Scene::AddRunDurationModel i != fRunDurationModelList.end ()\n");
    63 #endif
    6458    if (warn) {
    6559      G4cout << "G4Scene::AddRunDurationModel: model \""
     
    7872
    7973void G4Scene::CalculateExtent () {
    80 #ifdef G4DEBUG_VIS_MANAGEMENT
    81     printf("G4Scene::CalculateExtent\n");
    82 #endif
    8374  G4int nModels = fRunDurationModelList.size ();
    8475  G4BoundingSphereScene boundingSphereScene;
     
    9384  fExtent = boundingSphereScene.GetBoundingSphereExtent ();
    9485  fStandardTargetPoint = fExtent.GetExtentCentre ();
    95 #ifdef G4DEBUG_VIS_MANAGEMENT
    96     printf("G4Scene::CalculateExtent END\n");
    97 #endif
    9886}
    9987
     
    157145}
    158146
     147G4bool 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
    159170std::ostream& operator << (std::ostream& os, const G4Scene& s) {
    160171
     
    171182  for (i = 0; i < s.fEndOfEventModelList.size (); i++) {
    172183    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]);
    173189  }
    174190
  • trunk/source/visualization/management/src/G4VViewer.cc

    r959 r1170  
    111111void G4VViewer::ProcessView ()
    112112{
    113 #ifdef G4DEBUG_VIS_MANAGEMENT
    114   printf("G4VViewer::ProcessView\n");
    115 #endif
    116 
    117113  // If ClearStore has been requested, e.g., if the scene has changed,
    118114  // or if the concrete viewer has decided that it necessary to visit
     
    121117  // DrawView)...
    122118  if (fNeedKernelVisit) {
    123 #ifdef G4DEBUG_VIS_MANAGEMENT
    124     printf("G4VViewer::ProcessView : NeedKernelVisit\n");
    125 #endif
    126119    // Reset flag.  This must be done before ProcessScene to prevent
    127120    // recursive calls when recomputing transients...
  • trunk/source/visualization/management/src/G4VisCommandsScene.cc

    r1050 r1170  
    556556            // Re-draw, forcing rebuild of graphics database, if any...
    557557            aViewer -> NeedKernelVisit();
    558 #ifdef G4DEBUG_VIS_MANAGEMENT
    559             G4cout << "G4VisCommandSceneNotifyHandlers::SetNewValue."        << G4endl;
    560             printf("\n\nG4VisCommandSceneNotifyHandlers::SetNewValue ---%s--- Call SetView() 1\n",newValue.data());
    561 #endif
    562558            aViewer -> SetView ();
    563 #ifdef G4DEBUG_VIS_MANAGEMENT
    564             printf("G4VisCommandSceneNotifyHandlers::SetNewValue Call SetView() END 2\n");
    565             printf("G4VisCommandSceneNotifyHandlers::SetNewValue Call ClearView() 3\n");
    566 #endif
    567559            aViewer -> ClearView ();
    568 #ifdef G4DEBUG_VIS_MANAGEMENT
    569             printf("G4VisCommandSceneNotifyHandlers::SetNewValue Call ClearView() END 4\n");
    570             printf("G4VisCommandSceneNotifyHandlers::SetNewValue Call DrawView() 5\n");
    571 #endif
    572560            aViewer -> DrawView ();
    573 #ifdef G4DEBUG_VIS_MANAGEMENT
    574             printf("G4VisCommandSceneNotifyHandlers::SetNewValue Call DrawView() END 6\n");
    575 #endif
    576561            if (flush) aViewer -> ShowView ();
    577562            if (verbosity >= G4VisManager::confirmations) {
     
    629614      pCurrentSceneHandler -> SetCurrentViewer (pCurrentViewer);
    630615      if (pCurrentViewer && pCurrentSceneHandler->GetScene()) {
    631 #ifdef G4DEBUG_VIS_MANAGEMENT
    632             printf("G4VisCommandSceneNotifyHandlers::SetNewValue Call SetView() 7\n");
    633 #endif
    634616        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  }
    645620}
    646621
  • trunk/source/visualization/management/src/G4VisCommandsSceneAdd.cc

    r1140 r1170  
    2525//
    2626//
    27 // $Id: G4VisCommandsSceneAdd.cc,v 1.76 2009/10/30 15:58:50 allison Exp $
     27// $Id: G4VisCommandsSceneAdd.cc,v 1.77 2009/11/04 13:15:02 allison Exp $
    2828// GEANT4 tag $Name:  $
    2929// /vis/scene commands - John Allison  9th August 1998
     
    898898
    899899G4VisCommandSceneAddPSHits::G4VisCommandSceneAddPSHits () {
    900   fpCommand = new G4UIcmdWithoutParameter ("/vis/scene/add/psHits", this);
     900  G4bool omitable;
     901  fpCommand = new G4UIcmdWithAString ("/vis/scene/add/psHits", this);
    901902  fpCommand -> SetGuidance
    902903    ("Adds Primitive Scorer Hits (PSHits) to current scene.");
     
    904905    ("PSHits are drawn at end of run when the scene in which"
    905906     "\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");
    906912}
    907913
     
    914920}
    915921
    916 void G4VisCommandSceneAddPSHits::SetNewValue (G4UIcommand*, G4String) {
    917 
     922void G4VisCommandSceneAddPSHits::SetNewValue
     923(G4UIcommand*, G4String newValue)
     924{
    918925  G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
    919926  G4bool warn(verbosity >= G4VisManager::warnings);
     
    927934  }
    928935
    929   G4PSHitsModel* model = new G4PSHitsModel;
     936  G4PSHitsModel* model = new G4PSHitsModel(newValue);
    930937  const G4String& currentSceneName = pScene -> GetName ();
    931   G4bool successful = pScene -> AddEndOfEventModel (model, warn);
     938  G4bool successful = pScene -> AddEndOfRunModel (model, warn);
    932939  if (successful) {
    933940    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 \""
    935947             << currentSceneName << "\"."
    936948             << G4endl;
     
    12491261void G4VisCommandSceneAddText::SetNewValue (G4UIcommand*, G4String newValue) {
    12501262
    1251 #ifdef G4DEBUG_VIS_MANAGEMENT
    1252   printf("G4VisCommandSceneAddText::SetNewValue -%s-\n",newValue.c_str());
    1253 #endif
    12541263  G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
    12551264  G4bool warn = verbosity >= G4VisManager::warnings;
     
    12821291  const G4String& currentSceneName = pScene -> GetName ();
    12831292  G4bool successful = pScene -> AddRunDurationModel (model, warn);
    1284 #ifdef G4DEBUG_VIS_MANAGEMENT
    1285   printf("G4VisCommandSceneAddText::SetNewValue success? :%d--\n",successful);
    1286 #endif
    12871293  if (successful) {
    12881294    if (verbosity >= G4VisManager::confirmations) {
  • trunk/source/visualization/management/src/G4VisCommandsSceneHandler.cc

    r1041 r1170  
    113113    G4VViewer* pViewer = pSceneHandler -> GetCurrentViewer();
    114114    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 ();
    132118    }
    133119    if (verbosity >= G4VisManager::confirmations) {
  • trunk/source/visualization/management/src/G4VisCommandsViewer.cc

    r1136 r1170  
    269269  }
    270270
    271 #ifdef G4DEBUG_VIS_MANAGEMENT
    272   printf("G4VisCommandViewerClear::SetNewValue Call ClearView()\n");
    273 #endif
    274271  viewer->ClearView();
    275 #ifdef G4DEBUG_VIS_MANAGEMENT
    276   printf("G4VisCommandViewerClear::SetNewValue Call ClearView() END\n");
    277   printf("G4VisCommandViewerClear::SetNewValue Call FinishView()\n");
    278 #endif
    279272  viewer->FinishView();
    280 #ifdef G4DEBUG_VIS_MANAGEMENT
    281   printf("G4VisCommandViewerClear::SetNewValue Call FinishView() END\n");
    282 #endif
    283273  if (verbosity >= G4VisManager::confirmations) {
    284274    G4cout << "Viewer \"" << clearName << "\" cleared." << G4endl;
     
    564554void G4VisCommandViewerCreate::SetNewValue (G4UIcommand*, G4String newValue) {
    565555
    566 #ifdef G4DEBUG_VIS_MANAGEMENT
    567   printf("G4VisCommandViewerCreate::SetNewValue : %s\n",newValue.c_str());
    568 #endif
    569556  G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
    570557
     
    11501137             << G4endl;
    11511138    }
    1152 #ifdef G4DEBUG_VIS_MANAGEMENT
    1153     printf("G4VisCommandViewerRefresh::SetNewValue Call SetView()\n");
    1154 #endif
    11551139    viewer -> SetView ();
    1156 #ifdef G4DEBUG_VIS_MANAGEMENT
    1157     printf("G4VisCommandViewerRefresh::SetNewValue Call SetView() END\n");
    1158     printf("G4VisCommandViewerRefresh::SetNewValue Call ClearView()\n");
    1159 #endif
    11601140    viewer -> ClearView ();
    1161 #ifdef G4DEBUG_VIS_MANAGEMENT
    1162     printf("G4VisCommandViewerRefresh::SetNewValue Call ClearView() END\n");
    1163     printf("G4VisCommandViewerRefresh::SetNewValue Call DrawView()\n");
    1164 #endif
    11651141    viewer -> DrawView ();
    1166 #ifdef G4DEBUG_VIS_MANAGEMENT
    1167     printf("G4VisCommandViewerRefresh::SetNewValue Call DrawView() END\n");
    1168 #endif
    11691142    if (verbosity >= G4VisManager::confirmations) {
    11701143      G4cout << "Viewer \"" << viewer -> GetName () << "\"" << " refreshed."
  • trunk/source/visualization/management/src/G4VisCommandsViewerSet.cc

    r1050 r1170  
    2626//
    2727// $Id: G4VisCommandsViewerSet.cc,v 1.50 2009/05/13 18:17:25 allison Exp $
    28 // GEANT4 tag $Name: HEAD $
     28// GEANT4 tag $Name: $
    2929
    3030// /vis/viewer/set commands - John Allison  16th May 2000
  • trunk/source/visualization/management/src/G4VisManager.cc

    r1140 r1170  
    2424// ********************************************************************
    2525//
    26 // $Id: G4VisManager.cc,v 1.121 2009/10/30 16:03:41 allison Exp $
     26// $Id: G4VisManager.cc,v 1.122 2009/11/04 12:58:00 allison Exp $
    2727// GEANT4 tag $Name:  $
    2828//
     
    8787  fpSceneHandler   (0),
    8888  fpViewer         (0),
    89   fVerbosity       (all),//warnings),
     89  fVerbosity       (warnings),
    9090  fpStateDependent (0),
    9191  fEventRefreshing          (false),
     
    9898  // All other objects use default constructors.
    9999{
    100 
    101 #ifdef G4DEBUG_VIS_MANAGEMENT
    102   printf("G4VisManager::G4VisManager\n");
    103 #endif
    104100  fpTrajDrawModelMgr = new G4VisModelManager<G4VTrajectoryModel>("/vis/modeling/trajectories");
    105101  fpTrajFilterMgr = new G4VisFilterManager<G4VTrajectory>("/vis/filtering/trajectories");
     
    178174
    179175G4VisManager::~G4VisManager () {
     176  printf("G4VisManager::~G4VisManager DELETING \n");
    180177  fpInstance = 0;
    181178  size_t i;
    182179  for (i = 0; i < fSceneList.size (); ++i) {
     180    printf("G4VisManager::~G4VisManager DELETING 1 \n");
    183181    delete fSceneList[i];
    184182  }
    185183  for (i = 0; i < fAvailableSceneHandlers.size (); ++i) {
     184  printf("G4VisManager::~G4VisManager DELETING 2\n");
     185  if (fAvailableSceneHandlers[i] != NULL) {
    186186    delete fAvailableSceneHandlers[i];
    187187  }
     188  }
    188189  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    }
    190194  }
    191195  if (fVerbosity >= startup) {
     
    194198  }
    195199  for (i = 0; i < fMessengerList.size (); ++i) {
     200  printf("G4VisManager::~G4VisManager DELETING 4\n");
    196201    delete fMessengerList[i];
    197202  }
    198203  for (i = 0; i < fDirectoryList.size (); ++i) {
     204  printf("G4VisManager::~G4VisManager DELETING 5\n");
    199205    delete fDirectoryList[i];
    200206  }
    201207
     208  printf("G4VisManager::~G4VisManager DELETING 6\n");
    202209  delete fpTrajDrawModelMgr;
     210  printf("G4VisManager::~G4VisManager DELETING 7\n");
    203211  delete fpTrajFilterMgr;
     212  printf("G4VisManager::~G4VisManager DELETING 8\n");
    204213  delete fpHitFilterMgr;
     214  printf("G4VisManager::~G4VisManager DELETING 9\n");
    205215}
    206216
     
    379389}
    380390
     391
     392
    381393const G4VTrajectoryModel*
    382394G4VisManager::CurrentTrajDrawModel() const
     
    665677
    666678void G4VisManager::CreateViewer (G4String name,G4String XGeometry) {
    667   printf("G4VisManager::CreateViewer -------------------- %s ----%s\n",name.c_str(),XGeometry.c_str());
    668679
    669680  if (!fInitialised) Initialise ();
     
    674685  }
    675686
    676   printf("G4VisManager::CreateViewer 1-------------------- %s ----%s\n",name.c_str(),XGeometry.c_str());
    677687  G4VViewer* p = fpGraphicsSystem -> CreateViewer (*fpSceneHandler, name);
    678   printf("G4VisManager::CreateViewer 2-------------------- %s ----%s\n",name.c_str(),XGeometry.c_str());
    679688
    680689  if (!p) {
     
    749758
    750759void G4VisManager::GeometryHasChanged () {
    751 #ifdef G4DEBUG_VIS_MANAGEMENT
    752   printf("G4VisManager::GeometryHasChanged \n");
    753 #endif
    754760  if (fVerbosity >= confirmations) {
    755761    G4cout << "G4VisManager::GeometryHasChanged() called." << G4endl;
     
    816822  // Check the manager's current scene...
    817823  if (fpScene && fpScene -> GetRunDurationModelList ().size () == 0) {
    818 #ifdef G4DEBUG_VIS_MANAGEMENT
    819   printf("G4VisManager::GeometryHasChanged NO MODELS\n");
    820 #endif
    821824    if (fVerbosity >= warnings) {
    822825      G4cout << "WARNING: The current scene \""
     
    827830  }
    828831
    829 }
     832  }
    830833void G4VisManager::NotifyHandlers () {
    831834
    832 #ifdef G4DEBUG_VIS_MANAGEMENT
    833   printf("G4VisManager::NotifyHandlers \n");
    834 #endif
    835835  if (fVerbosity >= confirmations) {
    836836    G4cout << "G4VisManager::NotifyHandler() called." << G4endl;
     
    861861  }
    862862
    863 #ifdef G4DEBUG_VIS_MANAGEMENT
    864   printf("G4VisManager::NotifyHandlers END\n");
    865 #endif
    866863}
    867864
     
    12661263void G4VisManager::EndOfEvent ()
    12671264{
    1268   printf("G4VisManager::EndOfEvent \n");
    1269 
    12701265  //G4cout << "G4VisManager::EndOfEvent" << G4endl;
    12711266
     
    12831278  if (!currentEvent) return;
    12841279
    1285   // FIXME : OK
    1286   printf("G4VisManager::EndOfEvent 0\n");
    12871280  ClearTransientStoreIfMarked();
    1288   printf("G4VisManager::EndOfEvent 1\n");
    1289   // FIXME : OK
    12901281  fpSceneHandler->DrawEvent(currentEvent);
    12911282
     
    12931284  G4int nKeptEvents = 0;
    12941285  G4int eventID = -2;  // (If no run manager, triggers ShowView as normal.)
    1295   printf("G4VisManager::EndOfEvent 2\n");
    12961286  if (currentRun) {
    1297     printf("G4VisManager::EndOfEvent currentRun?\n");
    12981287    nEventsToBeProcessed = currentRun->GetNumberOfEventToBeProcessed();
    12991288    eventID = currentEvent->GetEventID();
     
    13021291    if (events) nKeptEvents = events->size();
    13031292  }
    1304  
     1293
    13051294  if (fpScene->GetRefreshAtEndOfEvent()) {
    1306     printf("G4VisManager::EndOfEvent GetRefreshAtEndOfEvent()\n");
    13071295
    13081296    // Unless last event (in which case wait end of run)...
    13091297    if (eventID < nEventsToBeProcessed - 1) {
    1310       printf("G4VisManager::EndOfEvent 3 \n");
    13111298      fpViewer->ShowView();
    13121299      fpSceneHandler->SetMarkForClearingTransientStore(true);
    13131300    } else {  // Last event...
    1314       printf("G4VisManager::EndOfEvent 4 \n");
    13151301      // Keep, but only if user has not kept any...
    13161302      if (!nKeptEvents) {
     
    13211307
    13221308  } else {  //  Accumulating events...
    1323   printf("G4VisManager::EndOfEvent NOT GetRefreshAtEndOfEvent()\n");
    13241309
    13251310    G4int maxNumberOfKeptEvents = fpScene->GetMaxNumberOfKeptEvents();
    13261311    if (maxNumberOfKeptEvents > 0 && nKeptEvents >= maxNumberOfKeptEvents) {
    1327       printf("G4VisManager::EndOfEvent 5 \n");
    13281312      fEventKeepingSuspended = true;
    13291313      static G4bool warned = false;
    13301314      if (!warned) {
    1331         printf("G4VisManager::EndOfEvent 6 \n");
    13321315        if (fVerbosity >= warnings) {
    1333           printf("G4VisManager::EndOfEvent 7 \n");
    13341316          G4cout <<
    13351317 "WARNING: G4VisManager::EndOfEvent: Automatic event keeping suspended."
     
    13421324      }
    13431325    } else if (maxNumberOfKeptEvents != 0) {
    1344       printf("G4VisManager::EndOfEvent 8 \n");
    13451326      eventManager->KeepTheCurrentEvent();
    13461327    }
    13471328  }
    1348   printf("G4VisManager::EndOfEvent 9 \n");
    13491329}
    13501330
     
    13521332{
    13531333  //G4cout << "G4VisManager::EndOfRun" << G4endl;
    1354   printf("G4VisManager::EndOfRun 1\n");
     1334
    13551335  // Don't call IsValidView unless there is a scene handler.  This
    13561336  // avoids WARNING message at end of event and run when the user has
    13571337  // not instantiated a scene handler, e.g., in batch mode.
    13581338  G4bool valid = GetConcreteInstance() && fpSceneHandler && IsValidView();
    1359   printf("G4VisManager::EndOfRun 2\n");
    13601339  if (valid) {
    1361   printf("G4VisManager::EndOfRun 3\n");
    13621340    if (!fpSceneHandler->GetMarkForClearingTransientStore()) {
    1363   printf("G4VisManager::EndOfRun 4\n");
    13641341      if (fpScene->GetRefreshAtEndOfRun()) {
    1365   printf("G4VisManager::EndOfRun 5\n");
     1342        fpSceneHandler->DrawEndOfRunModels();
    13661343        fpViewer->ShowView();
    1367   printf("G4VisManager::EndOfRun 6\n");
    13681344        fpSceneHandler->SetMarkForClearingTransientStore(true);
    1369   printf("G4VisManager::EndOfRun 7\n");
    1370       }
    1371     }
    1372 
    1373   printf("G4VisManager::EndOfRun 8\n");
     1345      }
     1346    }
     1347
    13741348    if (fEventKeepingSuspended && fVerbosity >= warnings) {
    13751349      G4cout <<
     
    13861360  fEventRefreshing = false;
    13871361
    1388   printf("++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
    13891362  G4RunManager* runManager = G4RunManager::GetRunManager();
    13901363  const G4Run* currentRun = runManager->GetCurrentRun();
  • trunk/source/visualization/management/src/G4VisStateDependent.cc

    r1038 r1170  
    3737
    3838G4bool G4VisStateDependent::Notify (G4ApplicationState requestedState) {
    39 #ifdef G4DEBUG_VIS_MANAGEMENT
    40     printf("G4VisStateDependent::Notify  vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\n");
    41 #endif
    4239  G4StateManager* stateManager = G4StateManager::GetStateManager();
    4340  G4ApplicationState previousState = stateManager->GetPreviousState();
    4441  if (previousState == G4State_Idle  &&  requestedState == G4State_GeomClosed) {
    45 #ifdef G4DEBUG_VIS_MANAGEMENT
    46     printf("G4VisStateDependent::Notify BeginOfRun \n");
    47 #endif
    4842    fpVisManager -> BeginOfRun ();
    4943  }
    5044  else if (previousState == G4State_GeomClosed &&  requestedState == G4State_EventProc) {
    51 #ifdef G4DEBUG_VIS_MANAGEMENT
    52     printf("G4VisStateDependent::Notify BeginOfEvent \n");
    53 #endif
    5445    fpVisManager -> BeginOfEvent ();
    5546  }
    5647  else if (previousState == G4State_EventProc &&  requestedState == G4State_GeomClosed) {
    57 #ifdef G4DEBUG_VIS_MANAGEMENT
    58     printf("G4VisStateDependent::Notify EndOfEvent \n");
    59 #endif
    6048    fpVisManager -> EndOfEvent ();
    6149  }
    6250  else if (previousState == G4State_GeomClosed &&  requestedState == G4State_Idle) {
    63 #ifdef G4DEBUG_VIS_MANAGEMENT
    64     printf("G4VisStateDependent::Notify EndOfRun -----------------------------------------------------------------------------\n");
    65 #endif
    6651    fpVisManager -> EndOfRun ();
    67 #ifdef G4DEBUG_VIS_MANAGEMENT
    68     printf("G4VisStateDependent::Notify EndOfRun -----------------------------------------XXXXXXXXXXXXXXXXXXXX-----------------\n");
    69 #endif
    7052  }
    71 #ifdef G4DEBUG_VIS_MANAGEMENT
    72     printf("G4VisStateDependent::Notify G4VisStateDependent::Notify END ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n");
    73 #endif
    7453  return true;
    7554}
Note: See TracChangeset for help on using the changeset viewer.