Import Geant4 3.0.0 source tree
This commit is contained in:
@@ -1,68 +0,0 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ApplicationState.hh,v 1.3 1999/12/15 14:50:37 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
|
||||
#ifndef G4APPLICATIONSTATE_H
|
||||
#define G4APPLICATIONSTATE_H 1
|
||||
|
||||
// Class Description:
|
||||
//
|
||||
// Specifies the state of the G4 application
|
||||
//
|
||||
// States:
|
||||
// PreInit
|
||||
// At the very begining of the Application. G4StateManager starts
|
||||
// with this state. G4Initializer changes this state to Init when
|
||||
// G4Initializer::Initialize() method starts. At the moment of
|
||||
// the state change of PreInit->Init, no material, geometrical,
|
||||
// particle or physics process has been initialized.
|
||||
// Init
|
||||
// During the G4Initializer::Initialize() method. G4Initializer
|
||||
// changes this state to Idle when all initialization procedures
|
||||
// are successfully Done.
|
||||
// Idle
|
||||
// Ready to start "BeamOn". G4RunManager changes this state to
|
||||
// GeomClosed when G4RunManager::BeamOn() method starts and
|
||||
// G4GeometryManager::CloseGeometry() is Done. At the end of
|
||||
// BeamOn() method, G4RunManager will reset the application state
|
||||
// to Idle after G4GeometryManager::OpenGeometry() is Done.
|
||||
// GeomClosed
|
||||
// G4 is in this state between G4GeometryManager::CloseGeometry()
|
||||
// and G4GeometryManager::OpenGeometry(), but no event is in
|
||||
// progress. At the begining of each event (construction of a
|
||||
// G4Event object and primary particle generation), G4RunManager
|
||||
// changes this state to EventProc and resets to GeomClosed state
|
||||
// when G4EventManager::ProcessOneEvent() is over.
|
||||
// EventProc
|
||||
// Processing an event.
|
||||
// Quit
|
||||
// G4 is in this state when the destructor of G4RunManager is invoked.
|
||||
//
|
||||
//
|
||||
// PreInit
|
||||
// |
|
||||
// v
|
||||
// Init
|
||||
// |
|
||||
// v
|
||||
// Idle ------> Quit
|
||||
// |^
|
||||
// v|
|
||||
// GeomClosed (at each run)
|
||||
// |^
|
||||
// v|
|
||||
// EventProc (at each event)
|
||||
//
|
||||
|
||||
enum G4ApplicationState
|
||||
{PreInit, Init, Idle, GeomClosed, EventProc, Quit};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4StateManager.hh,v 1.5 2000/02/14 12:24:41 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// For information related to this code contact:
|
||||
// CERN, CN Division, ASD group
|
||||
// ---------------- G4StateManager ----------------
|
||||
// by Gabriele Cosmo, November 1996
|
||||
|
||||
#ifndef G4StateManager_h
|
||||
#define G4StateManager_h 1
|
||||
|
||||
#include "g4rw/tpordvec.h"
|
||||
#include "globals.hh"
|
||||
#include "G4ApplicationState.hh"
|
||||
#include "G4VStateDependent.hh"
|
||||
|
||||
// Class Description:
|
||||
//
|
||||
// Class responsible for handling and updating the running state
|
||||
// of the Geant4 application during its different phases.
|
||||
// The class is a singleton, it can be accessed via the public
|
||||
// method G4StateManager::GetStateManager().
|
||||
//
|
||||
// States defined in Geant4 are descrived in G4ApplicationState.hh
|
||||
//
|
||||
|
||||
class G4StateManager {
|
||||
|
||||
public: // with description
|
||||
static G4StateManager* GetStateManager();
|
||||
// This G4StateManager class is a singleton class and the pointer
|
||||
// to the only one existing object can be obtained by this static
|
||||
// method.
|
||||
|
||||
protected:
|
||||
G4StateManager();
|
||||
|
||||
public:
|
||||
~G4StateManager();
|
||||
|
||||
public: // with description
|
||||
G4ApplicationState GetCurrentState();
|
||||
// Returns the current state
|
||||
G4ApplicationState GetPreviousState();
|
||||
// Returns the previous state
|
||||
G4bool SetNewState(G4ApplicationState requestedState);
|
||||
// Set Geant4 to a new state.
|
||||
// In case the request is irregal, false will be returned
|
||||
// and the state of Geant4 will not be changed.
|
||||
G4bool RegisterDependent(G4VStateDependent* aDependent);
|
||||
// Register a concrete class of G4VStateDependent.
|
||||
// Registered concrete classes will be notified via
|
||||
// G4VStateDependent::Notify() method when the state of
|
||||
// Geant4 changes.
|
||||
// False will be returned if registration if failed.
|
||||
G4bool DeregisterDependent(G4VStateDependent* aDependent);
|
||||
// Remove the registration.
|
||||
// False will be returned if aDependent has not been registered.
|
||||
G4VStateDependent* RemoveDependent(const G4VStateDependent* aDependent);
|
||||
// Remove the registration.
|
||||
// Removed pointer is returned.
|
||||
G4String GetStateString(G4ApplicationState aState);
|
||||
// A utility method which returns a string of the state name.
|
||||
void Pause();
|
||||
void Pause(const char* msg);
|
||||
void Pause(G4String msg);
|
||||
// G4UIsession::pauseSession() will be invoked. The argument string "msg"
|
||||
// will be used as a prompt characters if the session is non-graphical.
|
||||
// This method can be invoked by any user action class during the event
|
||||
// loop. After the user's interactions, control goes back to the caller.
|
||||
|
||||
private:
|
||||
G4StateManager(const G4StateManager &right);
|
||||
G4StateManager& operator=(const G4StateManager &right);
|
||||
G4int operator==(const G4StateManager &right) const;
|
||||
G4int operator!=(const G4StateManager &right) const;
|
||||
|
||||
private:
|
||||
static G4StateManager* theStateManager;
|
||||
G4ApplicationState theCurrentState;
|
||||
G4ApplicationState thePreviousState;
|
||||
G4RWTPtrOrderedVector<G4VStateDependent> theDependentsList;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIbatch.hh,v 1.3 1999/12/15 14:50:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// $id$
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIcmdWith3Vector.hh,v 1.3 1999/12/15 14:50:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIcmdWith3VectorAndUnit.hh,v 1.3 1999/12/15 14:50:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIcmdWithABool.hh,v 1.3 1999/12/15 14:50:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIcmdWithADouble.hh,v 1.3 1999/12/15 14:50:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIcmdWithADoubleAndUnit.hh,v 1.3 1999/12/15 14:50:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIcmdWithAString.hh,v 1.3 1999/12/15 14:50:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIcmdWithAnInteger.hh,v 1.3 1999/12/15 14:50:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIcmdWithoutParameter.hh,v 1.3 1999/12/15 14:50:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIcommand.hh,v 1.5 1999/12/15 14:50:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIcommandStatus.hh,v 1.2 1999/12/15 14:50:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
|
||||
#ifndef G4UIcommandStatus_h
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIcommandTree.hh,v 1.5 2000/02/14 12:24:41 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
|
||||
#ifndef G4UIcommandTree_h
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIcontrolMessenger.hh,v 1.3 1999/12/15 14:50:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
|
||||
#ifndef G4UIcontrolMessenger_h
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIdirectory.hh,v 1.3 1999/12/15 14:50:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UImanager.hh,v 1.5 2000/02/14 08:41:24 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4UImanager.hh,v 1.6 2000/07/22 10:49:37 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
|
||||
#ifndef G4UImanager_h
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "g4rw/ctoken.h"
|
||||
#include "g4rw/tvordvec.h"
|
||||
#include "g4std/fstream"
|
||||
#include "G4VStateDependent.hh"
|
||||
class G4UIcommandTree;
|
||||
class G4UIcommand;
|
||||
class G4UIsession;
|
||||
@@ -29,7 +30,7 @@ class G4UnitsMessenger;
|
||||
// invoked by the user.
|
||||
//
|
||||
|
||||
class G4UImanager
|
||||
class G4UImanager : public G4VStateDependent
|
||||
{
|
||||
public: // with description
|
||||
static G4UImanager * GetUIpointer();
|
||||
@@ -74,14 +75,15 @@ class G4UImanager
|
||||
G4String fileName="G4history.macro");
|
||||
// The executed commands will be stored in the defined file. If
|
||||
// "historySwitch" is false, saving will be suspended.
|
||||
void PauseSession(G4String msg);
|
||||
// This method is exclusively invoked by G4StateManager and the user
|
||||
// must not use this method.
|
||||
void ListCommands(G4String direc);
|
||||
// All commands registored under the given directory will be listed to
|
||||
// G4cout.
|
||||
virtual G4bool Notify(G4ApplicationState requestedState);
|
||||
// This method is exclusively invoked by G4StateManager and the user
|
||||
// must not use this method.
|
||||
|
||||
private:
|
||||
void PauseSession(G4String msg);
|
||||
void CreateMessenger();
|
||||
G4UIcommandTree* FindDirectory(const char* dirName);
|
||||
|
||||
@@ -104,6 +106,10 @@ class G4UImanager
|
||||
G4std::ofstream historyFile;
|
||||
G4bool saveHistory;
|
||||
G4RWTValOrderedVector<G4String> histVec;
|
||||
|
||||
G4bool pauseAtBeginOfEvent;
|
||||
G4bool pauseAtEndOfEvent;
|
||||
|
||||
|
||||
public: // with description
|
||||
G4String GetCurrentStringValue(const char * aCommand,
|
||||
@@ -127,6 +133,19 @@ class G4UImanager
|
||||
// the value stored in G4Umanager will be used. The later case is valid
|
||||
// for the sequential invokation for the same command.
|
||||
|
||||
inline void SetPauseAtBeginOfEvent(G4bool vl)
|
||||
{ pauseAtBeginOfEvent = vl; }
|
||||
inline G4bool GetPauseAtBeginOfEvent() const
|
||||
{ return pauseAtBeginOfEvent; }
|
||||
inline void SetPauseAtEndOfEvent(G4bool vl)
|
||||
{ pauseAtEndOfEvent = vl; }
|
||||
inline G4bool GetPauseAtEndOfEvent() const
|
||||
{ return pauseAtEndOfEvent; }
|
||||
// If the boolean flags are true, Pause() method of G4StateManager is invoked
|
||||
// at the very begining (before generating a G4Event object) or at the end of
|
||||
// each event. So that, in case a (G)UI session is defined, the user can interact.
|
||||
|
||||
|
||||
public:
|
||||
inline G4UIcommandTree * GetTree() const
|
||||
{ return treeTop; };
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UImessenger.hh,v 1.4 1999/12/15 14:50:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
|
||||
#ifndef G4UImessenger_h
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIparameter.hh,v 1.3 1999/12/15 14:50:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UIsession.hh,v 1.3 1999/12/15 14:50:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// $id$
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UItokenNum.hh,v 1.2 1999/12/15 14:50:39 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// G4UItokenNum.hh
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4UnitsMessenger.hh,v 1.3 1999/12/15 14:50:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
// class description
|
||||
//
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VFlavoredParallelWorld.hh,v 1.2 1999/12/15 14:50:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// Abstract interface for GEANT4 Flavored Parallel World.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VGlobalFastSimulationManager.hh,v 1.2 1999/12/15 14:50:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// Abstract interface for GEANT4 Global Fast Simulation Manager.
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VGraphicsScene.hh,v 1.4 1999/12/15 14:50:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4VGraphicsScene.hh,v 1.5 2000/05/19 06:29:48 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// John Allison 19th July 1996
|
||||
//
|
||||
// Class Description:
|
||||
// Abstract interface class for a graphics scene handler.
|
||||
// It is a minimal scene handler for the GEANT4 kernel.
|
||||
// See G4VSceneHadler for a fuller description. G4VScenehandler is
|
||||
// See G4VSceneHandler for a fuller description. G4VSceneHandler is
|
||||
// the full abstract interface to graphics systems.
|
||||
|
||||
#ifndef G4VGRAPHICSSCENE_HH
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VStateDependent.hh,v 1.3 1999/12/15 14:50:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
//
|
||||
// For information related to this code contact:
|
||||
// CERN, CN Division, ASD group
|
||||
// ---------------- G4VStateDependent ----------------
|
||||
// by Gabriele Cosmo, November 1996
|
||||
// Abstract class responsible to Notify the change of state
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4VStateDependent_h
|
||||
#define G4VStateDependent_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ApplicationState.hh"
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This is an abstract base class of all classes which need to be
|
||||
// notified when the state of Geant4 is changed. The concrete class
|
||||
// object derived from this base class will be automatically registered
|
||||
// to G4StateManager and the virtual method Notify() will be invoked
|
||||
// when the state changes.
|
||||
//
|
||||
|
||||
class G4VStateDependent {
|
||||
|
||||
public:
|
||||
G4VStateDependent();
|
||||
virtual ~G4VStateDependent();
|
||||
G4int operator==(const G4VStateDependent &right) const;
|
||||
G4int operator!=(const G4VStateDependent &right) const;
|
||||
|
||||
public: // with description
|
||||
virtual G4bool Notify(G4ApplicationState requestedState) = 0;
|
||||
// Pure virtual method which will be invoked by G4StateManager.
|
||||
// In case state change must not be allowed by some reason of the
|
||||
// concrete class, false should be returned. But this scheme is
|
||||
// NOT recommended to use. All command which are state sensitive
|
||||
// MUST assign available state(s).
|
||||
|
||||
private:
|
||||
G4VStateDependent(const G4VStateDependent &right);
|
||||
G4VStateDependent& operator=(const G4VStateDependent &right);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -6,7 +6,7 @@
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VVisManager.hh,v 1.4 1999/12/15 14:50:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// John Allison 19/Oct/1996.
|
||||
//
|
||||
// Class Description:
|
||||
|
||||
Reference in New Issue
Block a user