Ignore:
Timestamp:
Nov 15, 2007, 11:56:03 AM (17 years ago)
Author:
garnier
Message:

r647@mac-90108: laurentgarnier | 2007-11-15 11:32:46 +0100
Ok en Qt 4.3.0

Location:
trunk/geant4/visualization/management/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/visualization/management/src/G4VisCommandsScene.cc

    r593 r606  
    2525//
    2626//
    27 // $Id: G4VisCommandsScene.cc,v 1.66 2007/05/25 10:49:55 allison Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     27// $Id: G4VisCommandsScene.cc,v 1.67 2007/11/10 15:03:56 allison Exp $
     28// GEANT4 tag $Name: $
    2929
    3030// /vis/scene commands - John Allison  9th August 1998
     
    3434#include "G4VisManager.hh"
    3535#include "G4TransportationManager.hh"
     36#include "G4RunManager.hh"
     37#include "G4Run.hh"
    3638#include "G4PhysicalVolumeModel.hh"
    3739#include "G4ApplicationState.hh"
     
    202204  fpVisManager->ResetTransientsDrawnFlags();
    203205
     206  // Are there any events currently kept...
     207  size_t nCurrentlyKept = 0;
     208  G4RunManager* runManager = G4RunManager::GetRunManager();
     209  if (runManager) {
     210    const G4Run* currentRun = runManager->GetCurrentRun();
     211    if (currentRun) {
     212      const std::vector<const G4Event*>* events =
     213        currentRun->GetEventVector();
     214      if (events) nCurrentlyKept = events->size();
     215    }
     216  }
     217
    204218  if (verbosity >= G4VisManager::confirmations) {
    205219    G4cout << "End of event action set to ";
     
    211225             << " (unlimited if negative)."
    212226        "\n  This may be changed with, e.g., "
    213         "\"/vis/scene/endOfEventAction accumulate 100\"."
    214              << G4endl;
    215     }
    216   }
     227        "\"/vis/scene/endOfEventAction accumulate 1000\".";
     228    }
     229    G4cout << G4endl;
     230  }
     231
    217232  if (!pScene->GetRefreshAtEndOfEvent() &&
    218233      maxNumberOfKeptEvents != 0 &&
    219234      verbosity >= G4VisManager::warnings) {
    220     G4cout << "WARNING: The vis manager will keep ";
    221     if (maxNumberOfKeptEvents < 0) G4cout << "an unlimited number of";
    222     else G4cout << "up to " << maxNumberOfKeptEvents;
    223     G4cout << " events.";
    224     if (maxNumberOfKeptEvents > 1 || maxNumberOfKeptEvents < 0)
    225       G4cout << "\n  This may use a lot of memory.";
     235    G4cout << "WARNING: ";
     236    if (nCurrentlyKept) {
     237      G4cout <<
     238        "\n  There are currently " << nCurrentlyKept
     239             << " events kept for refreshing and/or reviewing.";
     240    } else {
     241      G4cout << "The vis manager will keep ";
     242      if (maxNumberOfKeptEvents < 0) G4cout << "an unlimited number of";
     243      else G4cout << "up to " << maxNumberOfKeptEvents;
     244      G4cout << " events.";
     245      if (maxNumberOfKeptEvents > 1 || maxNumberOfKeptEvents < 0)
     246        G4cout << "\n  This may use a lot of memory.";
     247    }
    226248    G4cout << G4endl;
    227249  }
    228   UpdateVisManagerScene (pScene->GetName());
    229250}
    230251
     
    316337    G4cout << "\"" << G4endl;
    317338  }
    318   UpdateVisManagerScene (pScene->GetName());
    319339}
    320340
  • trunk/geant4/visualization/management/src/G4VisManager.cc

    r593 r606  
    2424// ********************************************************************
    2525//
    26 // $Id: G4VisManager.cc,v 1.113 2007/05/25 10:50:26 allison Exp $
    27 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     26// $Id: G4VisManager.cc,v 1.114 2007/11/10 14:59:46 allison Exp $
     27// GEANT4 tag $Name: $
    2828//
    2929//
     
    12441244      G4cout <<
    12451245        "  Only useful if before starting the run:"
    1246         "\n    a) trajectories are stored (\"/tracking/storeTrajectory N\"), or"
     1246        "\n    a) trajectories are stored (\"/vis/scene/add/trajectories [smooth|rich]\"), or"
    12471247        "\n    b) the Draw method of any hits is implemented."
    12481248        "\n  To view trajectories and hits:"
    12491249        "\n    open a viewer, draw a volume, \"/vis/scene/add/trajectories\""
    12501250        "\n    \"/vis/scene/add/hits\" and, possibly, \"/vis/viewer/flush\"."
    1251         "\n  To see all events: \"vis/scene/endOfEventAction accumulate\"."
     1251        "\n  To see all events: \"/vis/scene/endOfEventAction accumulate\"."
    12521252        "\n  To see events individually: \"/vis/reviewKeptEvents\"."
    12531253             << G4endl;
Note: See TracChangeset for help on using the changeset viewer.