Import Geant4 1.0.0 source tree
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.1 1999/01/07 16:09:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4ApplicationState.hh,v 1.2.4.1 1999/12/07 20:48:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#ifndef G4APPLICATIONSTATE_H
|
||||
#define G4APPLICATIONSTATE_H 1
|
||||
|
||||
// Class Description:
|
||||
//
|
||||
// Specifies the state of the G4 application
|
||||
//
|
||||
// States:
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.1 1999/01/07 16:09:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4StateManager.hh,v 1.3.2.1 1999/12/07 20:48:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -16,25 +16,32 @@
|
||||
// CERN, CN Division, ASD group
|
||||
// ---------------- G4StateManager ----------------
|
||||
// by Gabriele Cosmo, November 1996
|
||||
// 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().
|
||||
// ------------------------------------------------------------
|
||||
|
||||
#ifndef G4StateManager_h
|
||||
#define G4StateManager_h 1
|
||||
|
||||
#include <rw/tpordvec.h>
|
||||
#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:
|
||||
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();
|
||||
@@ -42,17 +49,36 @@ protected:
|
||||
public:
|
||||
~G4StateManager();
|
||||
|
||||
public:
|
||||
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(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);
|
||||
@@ -64,7 +90,7 @@ private:
|
||||
static G4StateManager* theStateManager;
|
||||
G4ApplicationState theCurrentState;
|
||||
G4ApplicationState thePreviousState;
|
||||
RWTPtrOrderedVector<G4VStateDependent> theDependentsList;
|
||||
G4RWTPtrOrderedVector<G4VStateDependent> theDependentsList;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UIbatch.hh,v 1.1 1999/01/07 16:09:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIbatch.hh,v 1.2.4.1 1999/12/07 20:48:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
// $id$
|
||||
|
||||
@@ -19,10 +19,24 @@
|
||||
|
||||
class G4UImanager;
|
||||
|
||||
// class description
|
||||
// This is a concrete class of G4UIsession.
|
||||
// This class is constructed by G4UImanager when the user
|
||||
// applies "/control/execute macro_file" command.
|
||||
// If the user's application runs in pure batch mode with
|
||||
// only one fixed-name macro file, he/she can construct this
|
||||
// class object with giving the file name and use it as other
|
||||
// ordinary G4UIsession concrete class, i.e. invoke SessionStart()
|
||||
// from his/her main().
|
||||
|
||||
class G4UIbatch : public G4UIsession
|
||||
{
|
||||
public:
|
||||
public: // with description
|
||||
G4UIbatch(G4String fileName,G4UIsession* prevSession=NULL);
|
||||
// Constructor.
|
||||
// "prevSession" must be NULL if this class is constructed
|
||||
// from main().
|
||||
public:
|
||||
~G4UIbatch();
|
||||
|
||||
G4UIsession * SessionStart();
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UIcmdWith3Vector.hh,v 1.1 1999/01/07 16:09:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIcmdWith3Vector.hh,v 1.2.4.1 1999/12/07 20:48:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -16,17 +16,40 @@
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
// class description:
|
||||
// A concrete class of G4UIcommand. The command defined by this class
|
||||
// takes three double values.
|
||||
// General information of G4UIcommand is given in G4UIcommand.hh.
|
||||
|
||||
class G4UIcmdWith3Vector : public G4UIcommand
|
||||
{
|
||||
public:
|
||||
public: // with description
|
||||
G4UIcmdWith3Vector
|
||||
(const char * theCommandPath,G4UImessenger * theMessenger);
|
||||
|
||||
// Constructor. The command string with full path directory
|
||||
// and the pointer to the messenger must be given.
|
||||
G4ThreeVector GetNew3VectorValue(G4String paramString);
|
||||
// Convert string which represents three double values to
|
||||
// G4ThreeVector.
|
||||
G4String ConvertToString(G4ThreeVector vec);
|
||||
// Convert G4ThreeVector to a string which represents three
|
||||
// double values. This method must be used by the messenger
|
||||
// for its GetCurrentValues() method.
|
||||
void SetParameterName(const char * theNameX,const char * theNameY,
|
||||
const char * theNameZ,G4bool omittable,G4bool currentAsDefault=false);
|
||||
// Set the parameter names for three parameters. Names are used by
|
||||
// the range checking routine.
|
||||
// If "omittable" is set as true, the user of this command can ommit
|
||||
// the value(s) when he/she applies the command. If "omittable" is false,
|
||||
// the user must supply all three values.
|
||||
// "currentAsDefault" flag is valid only if "omittable" is true. If this
|
||||
// flag is true, the current values are used as the default values when the
|
||||
// user ommit some of the parameters. If this flag is false, the values
|
||||
// given by the next SetDefaultValue() method are used.
|
||||
void SetDefaultValue(G4ThreeVector defVal);
|
||||
// Set the default values of the parameters. These default values are used
|
||||
// when the user of this command ommits some of the parameter values, and
|
||||
// "ommitable" is true and "currentAsDefault" is false.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UIcmdWith3VectorAndUnit.hh,v 1.1 1999/01/07 16:09:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIcmdWith3VectorAndUnit.hh,v 1.2.4.1 1999/12/07 20:48:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -16,22 +16,66 @@
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
// class description:
|
||||
// A concrete class of G4UIcommand. The command defined by this class
|
||||
// takes three double values and a unit.
|
||||
// General information of G4UIcommand is given in G4UIcommand.hh.
|
||||
|
||||
class G4UIcmdWith3VectorAndUnit : public G4UIcommand
|
||||
{
|
||||
public:
|
||||
public: // with description
|
||||
G4UIcmdWith3VectorAndUnit
|
||||
(const char * theCommandPath,G4UImessenger * theMessenger);
|
||||
|
||||
// Constructor. The command string with full path directory
|
||||
// and the pointer to the messenger must be given.
|
||||
G4ThreeVector GetNew3VectorValue(G4String paramString);
|
||||
// Convert string which represents three double values and a unit to
|
||||
// G4ThreeVector. Values are converted to the Geant4 internal unit.
|
||||
G4ThreeVector GetNew3VectorRawValue(G4String paramString);
|
||||
// Convert string which represents three double values and a unit to
|
||||
// G4ThreeVector. Values are NOT converted to the Geant4 internal unit
|
||||
// but just as the given string.
|
||||
G4double GetNewUnitValue(G4String paramString);
|
||||
// Convert the unit string to the value of the unit. "paramString"
|
||||
// must contain three double values AND a unit string.
|
||||
G4String ConvertToString(G4ThreeVector vec,const char * unitName);
|
||||
// Convert G4ThreeVector and the unit to a string which represents three
|
||||
// double values and the unit. This method must be used by the messenger
|
||||
// for its GetCurrentValues() method. Values of the three vector will be
|
||||
// devided by the value of the unit.
|
||||
void SetParameterName(const char * theNameX,const char * theNameY,
|
||||
const char * theNameZ,G4bool omittable,G4bool currentAsDefault=false);
|
||||
// Set the parameter names for three parameters. Names are used by
|
||||
// the range checking routine.
|
||||
// If "omittable" is set as true, the user of this command can ommit
|
||||
// the value(s) when he/she applies the command. If "omittable" is false,
|
||||
// the user must supply all three values.
|
||||
// "currentAsDefault" flag is valid only if "omittable" is true. If this
|
||||
// flag is true, the current values are used as the default values when the
|
||||
// user ommit some of the parameters. If this flag is false, the values
|
||||
// given by the next SetDefaultValue() method are used.
|
||||
void SetDefaultValue(G4ThreeVector defVal);
|
||||
// Set the default values of the parameters. These default values are used
|
||||
// when the user of this command ommits some of the parameter values, and
|
||||
// "ommitable" is true and "currentAsDefault" is false.
|
||||
void SetUnitCategory(const char * unitCategory);
|
||||
void SetUnitCandidates(const char * candidateList);
|
||||
void SetDefaultUnit(const char * defUnit);
|
||||
// These three methods must be used alternatively.
|
||||
// The user cannot ommit the unit as the fourth parameter of the command if
|
||||
// SetUnitCategory() or SetUnitCandidates() is used, while the unit defined
|
||||
// by SetDefaultUnit() method is used as the default unit so that the user can
|
||||
// ommits the fourth parameter.
|
||||
// SetUnitCategory() defines the category of the units which will be accepted.
|
||||
// The available categories can be found in G4SystemOfUnits.hh in global category.
|
||||
// Only the units categorized in the given category are accepted as the fourth
|
||||
// parameter of the command.
|
||||
// SetUnitCandidates() defines the candidates of units. Units listed in the
|
||||
// argument of this method must be separated by space(s). Only the units listed
|
||||
// in the candidate list are accepted as the fourth parameter of the command.
|
||||
// SetDefaultUnit() defines the default unit and also it defines the category
|
||||
// of the allowed units. Thus only the units categorized as the given default
|
||||
// unit will be accepted.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UIcmdWithABool.hh,v 1.1 1999/01/07 16:09:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIcmdWithABool.hh,v 1.2.4.1 1999/12/07 20:48:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -15,17 +15,41 @@
|
||||
|
||||
#include "G4UIcommand.hh"
|
||||
|
||||
// class description:
|
||||
// A concrete class of G4UIcommand. The command defined by this class
|
||||
// takes a boolean value. Boolean value can be the following notations.
|
||||
// TRUE :
|
||||
// 1 t T true TRUE
|
||||
// FALSE :
|
||||
// 0 f F false FALSE
|
||||
// General information of G4UIcommand is given in G4UIcommand.hh.
|
||||
|
||||
class G4UIcmdWithABool : public G4UIcommand
|
||||
{
|
||||
public:
|
||||
public: // with description
|
||||
G4UIcmdWithABool
|
||||
(const char * theCommandPath,G4UImessenger * theMessenger);
|
||||
|
||||
// Constructor. The command string with full path directory
|
||||
// and the pointer to the messenger must be given.
|
||||
G4bool GetNewBoolValue(G4String paramString);
|
||||
// Convert string which represents a boolean value to G4bool.
|
||||
G4String ConvertToString(G4bool intValue);
|
||||
// Convert a boolean value to a string. This method must be used by
|
||||
// the messenger for its GetCurrentValues() method.
|
||||
void SetParameterName(const char * theName,G4bool omittable,
|
||||
G4bool currentAsDefault=false);
|
||||
// Set the parameter name for a boolean parameter.
|
||||
// If "omittable" is set as true, the user of this command can ommit
|
||||
// the value when he/she applies the command. If "omittable" is false,
|
||||
// the user must supply a boolean value.
|
||||
// "currentAsDefault" flag is valid only if "omittable" is true. If this
|
||||
// flag is true, the current value is used as the default value when the
|
||||
// user ommit the parameter. If this flag is false, the value given by the
|
||||
// next SetDefaultValue() method is used.
|
||||
void SetDefaultValue(G4bool defVal);
|
||||
// Set the default value of the parameter. This default value is used
|
||||
// when the user of this command ommits the parameter value, and
|
||||
// "ommitable" is true and "currentAsDefault" is false.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UIcmdWithADouble.hh,v 1.1 1999/01/07 16:09:21 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIcmdWithADouble.hh,v 1.2.4.1 1999/12/07 20:48:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -15,17 +15,37 @@
|
||||
|
||||
#include "G4UIcommand.hh"
|
||||
|
||||
// class description:
|
||||
// A concrete class of G4UIcommand. The command defined by this class
|
||||
// takes a double value.
|
||||
// General information of G4UIcommand is given in G4UIcommand.hh.
|
||||
|
||||
class G4UIcmdWithADouble : public G4UIcommand
|
||||
{
|
||||
public:
|
||||
public: // with description
|
||||
G4UIcmdWithADouble
|
||||
(const char * theCommandPath,G4UImessenger * theMessenger);
|
||||
|
||||
// Constructor. The command string with full path directory
|
||||
// and the pointer to the messenger must be given.
|
||||
G4double GetNewDoubleValue(G4String paramString);
|
||||
// Convert string which represents a double value to a double.
|
||||
G4String ConvertToString(G4double dblValue);
|
||||
// Convert a double value to a string. This method must be used by
|
||||
// the messenger for its GetCurrentValues() method.
|
||||
void SetParameterName(const char * theName,G4bool omittable,
|
||||
G4bool currentAsDefault=false);
|
||||
// Set the parameter name. The name is used by the range checking.
|
||||
// If "omittable" is set as true, the user of this command can ommit
|
||||
// the value when he/she applies the command. If "omittable" is false,
|
||||
// the user must supply a double value.
|
||||
// "currentAsDefault" flag is valid only if "omittable" is true. If this
|
||||
// flag is true, the current value is used as the default value when the
|
||||
// user ommit the parameter. If this flag is false, the value given by the
|
||||
// next SetDefaultValue() method is used.
|
||||
void SetDefaultValue(G4double defVal);
|
||||
// Set the default value of the parameter. This default value is used
|
||||
// when the user of this command ommits the parameter value, and
|
||||
// "ommitable" is true and "currentAsDefault" is false.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UIcmdWithADoubleAndUnit.hh,v 1.1 1999/01/07 16:09:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIcmdWithADoubleAndUnit.hh,v 1.2.4.1 1999/12/07 20:48:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -15,22 +15,66 @@
|
||||
|
||||
#include "G4UIcommand.hh"
|
||||
|
||||
// class description:
|
||||
// A concrete class of G4UIcommand. The command defined by this class
|
||||
// takes a double value and a unit string.
|
||||
// General information of G4UIcommand is given in G4UIcommand.hh.
|
||||
|
||||
class G4UIcmdWithADoubleAndUnit : public G4UIcommand
|
||||
{
|
||||
public:
|
||||
public: // with description
|
||||
G4UIcmdWithADoubleAndUnit
|
||||
(const char * theCommandPath,G4UImessenger * theMessenger);
|
||||
|
||||
// Constructor. The command string with full path directory
|
||||
// and the pointer to the messenger must be given.
|
||||
G4double GetNewDoubleValue(G4String paramString);
|
||||
// Convert string which represents a double value and a unit to
|
||||
// double. Value is converted to the Geant4 internal unit.
|
||||
G4double GetNewDoubleRawValue(G4String paramString);
|
||||
// Convert string which represents a double value and a unit to
|
||||
// double. Value is NOT converted to the Geant4 internal unit
|
||||
// but just as the given string.
|
||||
G4double GetNewUnitValue(G4String paramString);
|
||||
// Convert the unit string to the value of the unit. "paramString"
|
||||
// must contain a double value AND a unit string.
|
||||
G4String ConvertToString(G4double dblValue,const char * unitName);
|
||||
// Convert a double value and the unit to a string which represents a
|
||||
// double value and the unit. This method must be used by the messenger
|
||||
// for its GetCurrentValues() method. Value of the double will be
|
||||
// devided by the value of the unit.
|
||||
void SetParameterName(const char * theName,G4bool omittable,
|
||||
G4bool currentAsDefault=false);
|
||||
// Set the parameter name for double parameterxs. Name is used by
|
||||
// the range checking routine.
|
||||
// If "omittable" is set as true, the user of this command can ommit
|
||||
// the value when he/she applies the command. If "omittable" is false,
|
||||
// the user must supply a value.
|
||||
// "currentAsDefault" flag is valid only if "omittable" is true. If this
|
||||
// flag is true, the current value is used as the default value when the
|
||||
// user ommit the double parameter. If this flag is false, the value
|
||||
// given by the next SetDefaultValue() method is used.
|
||||
void SetDefaultValue(G4double defVal);
|
||||
// Set the default value of the parameter. This default value is used
|
||||
// when the user of this command ommits the parameter value, and
|
||||
// "ommitable" is true and "curreutAsDefault" is false.
|
||||
void SetUnitCategory(const char * unitCategory);
|
||||
void SetUnitCandidates(const char * candidateList);
|
||||
void SetDefaultUnit(const char * defUnit);
|
||||
// These three methods must be used alternatively.
|
||||
// The user cannot ommit the unit as the second parameter of the command if
|
||||
// SetUnitCategory() or SetUnitCandidates() is used, while the unit defined
|
||||
// by SetDefaultUnit() method is used as the default unit so that the user can
|
||||
// ommits the second parameter.
|
||||
// SetUnitCategory() defines the category of the units which will be accepted.
|
||||
// The available categories can be found in G4SystemOfUnits.hh in global category.
|
||||
// Only the units categorized in the given category are accepted as the second
|
||||
// parameter of the command.
|
||||
// SetUnitCandidates() defines the candidates of units. Units listed in the
|
||||
// argument of this method must be separated by space(s). Only the units listed
|
||||
// in the candidate list are accepted as the second parameter of the command.
|
||||
// SetDefaultUnit() defines the default unit and also it defines the category
|
||||
// of the allowed units. Thus only the units categorized as the given default
|
||||
// unit will be accepted.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UIcmdWithAString.hh,v 1.1 1999/01/07 16:09:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIcmdWithAString.hh,v 1.2.4.1 1999/12/07 20:48:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -15,16 +15,36 @@
|
||||
|
||||
#include "G4UIcommand.hh"
|
||||
|
||||
// class description:
|
||||
// A concrete class of G4UIcommand. The command defined by this class
|
||||
// takes a string. Incase the parameter string contains space(s), it
|
||||
// must be enclosed by double-quotations (").
|
||||
// General information of G4UIcommand is given in G4UIcommand.hh.
|
||||
|
||||
class G4UIcmdWithAString : public G4UIcommand
|
||||
{
|
||||
public:
|
||||
public: // with description
|
||||
G4UIcmdWithAString
|
||||
(const char * theCommandPath,G4UImessenger * theMessenger);
|
||||
|
||||
// Constructor. The command string with full path directory
|
||||
// and the pointer to the messenger must be given.
|
||||
void SetParameterName(const char * theName,G4bool omittable,
|
||||
G4bool currentAsDefault=false);
|
||||
// Set the parameter name.
|
||||
// If "omittable" is set as true, the user of this command can ommit
|
||||
// the value when he/she applies the command. If "omittable" is false,
|
||||
// the user must supply the parameter string.
|
||||
// "currentAsDefault" flag is valid only if "omittable" is true. If this
|
||||
// flag is true, the current value is used as the default value when the
|
||||
// user ommit the parameter. If this flag is false, the value given by the
|
||||
// next SetDefaultValue() method is used.
|
||||
void SetCandidates(const char * candidateList);
|
||||
// Defines the candidates of the parameter string. Candidates listed in
|
||||
// the argument must be separated by space(s).
|
||||
void SetDefaultValue(const char * defVal);
|
||||
// Set the default value of the parameter. This default value is used
|
||||
// when the user of this command ommits the parameter value, and
|
||||
// "ommitable" is true and "curreutAsDefault" is false.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UIcmdWithAnInteger.hh,v 1.1 1999/01/07 16:09:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIcmdWithAnInteger.hh,v 1.2.4.1 1999/12/07 20:48:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -15,17 +15,37 @@
|
||||
|
||||
#include "G4UIcommand.hh"
|
||||
|
||||
// class description:
|
||||
// A concrete class of G4UIcommand. The command defined by this class
|
||||
// takes an integer value.
|
||||
// General information of G4UIcommand is given in G4UIcommand.hh.
|
||||
|
||||
class G4UIcmdWithAnInteger : public G4UIcommand
|
||||
{
|
||||
public:
|
||||
public: // with description
|
||||
G4UIcmdWithAnInteger
|
||||
(const char * theCommandPath,G4UImessenger * theMessenger);
|
||||
|
||||
// Constructor. The command string with full path directory
|
||||
// and the pointer to the messenger must be given.
|
||||
G4int GetNewIntValue(G4String paramString);
|
||||
// Convert string which represents an integer to an integer.
|
||||
G4String ConvertToString(G4int intValue);
|
||||
// Convert an integer value to a string. This method must be used by
|
||||
// the messenger for its GetCurrentValues() method.
|
||||
void SetParameterName(const char * theName,G4bool omittable,
|
||||
G4bool currentAsDefault=false);
|
||||
// Set the parameter name. The name is used by the range checking.
|
||||
// If "omittable" is set as true, the user of this command can ommit
|
||||
// the value when he/she applies the command. If "omittable" is false,
|
||||
// the user must supply an integer value.
|
||||
// "currentAsDefault" flag is valid only if "omittable" is true. If this
|
||||
// flag is true, the current value is used as the default value when the
|
||||
// user ommit the parameter. If this flag is false, the value given by the
|
||||
// next SetDefaultValue() method is used.
|
||||
void SetDefaultValue(G4int defVal);
|
||||
// Set the default value of the parameter. This default value is used
|
||||
// when the user of this command ommits the parameter value, and
|
||||
// "ommitable" is true and "currentAsDefault" is false.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UIcmdWithoutParameter.hh,v 1.1 1999/01/07 16:09:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIcmdWithoutParameter.hh,v 1.2.4.1 1999/12/07 20:48:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -15,11 +15,18 @@
|
||||
|
||||
#include "G4UIcommand.hh"
|
||||
|
||||
// class description:
|
||||
// A concrete class of G4UIcommand. The command defined by this class
|
||||
// takes no parameter argument.
|
||||
// General information of G4UIcommand is given in G4UIcommand.hh.
|
||||
|
||||
class G4UIcmdWithoutParameter : public G4UIcommand
|
||||
{
|
||||
public:
|
||||
public: // with description
|
||||
G4UIcmdWithoutParameter
|
||||
(const char * theCommandPath,G4UImessenger * theMessenger);
|
||||
// Constructor. The command string with full path directory
|
||||
// and the pointer to the messenger must be given.
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UIcommand.hh,v 1.2 1999/05/07 10:50:42 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIcommand.hh,v 1.4.2.1 1999/12/07 20:48:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -17,15 +17,28 @@
|
||||
class G4UImessenger;
|
||||
#include "globals.hh"
|
||||
#include "G4ApplicationState.hh"
|
||||
#include <rw/tpordvec.h>
|
||||
#include <rw/tvordvec.h>
|
||||
#include "g4rw/tpordvec.h"
|
||||
#include "g4rw/tvordvec.h"
|
||||
#include "G4UItokenNum.hh"
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This G4UIcommand is the "concrete" base class which represents a command
|
||||
// used by Geant4 (G)UI. The user can use this class in case the parameter
|
||||
// arguments of a command are not suitable with respect to the derived command
|
||||
// classes.
|
||||
// Some methods defined in this base class are used by the derived classes.
|
||||
//
|
||||
|
||||
class G4UIcommand
|
||||
{
|
||||
public:
|
||||
public:
|
||||
G4UIcommand();
|
||||
public: // with description
|
||||
G4UIcommand(const char * theCommandPath, G4UImessenger * theMessenger);
|
||||
// Constructor. The command string with full path directory
|
||||
// and the pointer to the messenger must be given.
|
||||
public:
|
||||
virtual ~G4UIcommand();
|
||||
|
||||
int operator==(const G4UIcommand &right) const;
|
||||
@@ -33,6 +46,7 @@ class G4UIcommand
|
||||
|
||||
G4int DoIt(G4String parameterList);
|
||||
G4String GetCurrentValue();
|
||||
public: // with description
|
||||
void AvailableForStates(G4ApplicationState s1);
|
||||
void AvailableForStates(G4ApplicationState s1,G4ApplicationState s2);
|
||||
void AvailableForStates(G4ApplicationState s1,G4ApplicationState s2,
|
||||
@@ -42,6 +56,10 @@ class G4UIcommand
|
||||
void AvailableForStates(G4ApplicationState s1,G4ApplicationState s2,
|
||||
G4ApplicationState s3,G4ApplicationState s4,
|
||||
G4ApplicationState s5);
|
||||
// These methods define the states where the command is available.
|
||||
// Once one of these commands is invoked, the command application will
|
||||
// be denied when Geant4 is NOT in the assigned states.
|
||||
public:
|
||||
G4bool IsAvailable();
|
||||
virtual void List();
|
||||
|
||||
@@ -56,13 +74,19 @@ class G4UIcommand
|
||||
G4String commandPath;
|
||||
G4String commandName;
|
||||
G4String rangeString;
|
||||
RWTPtrOrderedVector<G4UIparameter> parameter;
|
||||
RWTValOrderedVector<G4String> commandGuidance;
|
||||
RWTValOrderedVector<G4ApplicationState> availabelStateList;
|
||||
G4RWTPtrOrderedVector<G4UIparameter> parameter;
|
||||
G4RWTValOrderedVector<G4String> commandGuidance;
|
||||
G4RWTValOrderedVector<G4ApplicationState> availabelStateList;
|
||||
|
||||
public:
|
||||
public: // with description
|
||||
inline void SetRange(const char* rs)
|
||||
{ rangeString = rs; }
|
||||
// Defines the range the command parameter(s) can take.
|
||||
// The variable name(s) appear in the range expression must be same
|
||||
// as the name(s) of the parameter(s).
|
||||
// All the C++ syntax of relational operators are allowed for the
|
||||
// range expression.
|
||||
public:
|
||||
inline const G4String GetRange() const
|
||||
{ return rangeString; };
|
||||
inline G4int GetGuidanceEntries() const
|
||||
@@ -77,16 +101,26 @@ class G4UIcommand
|
||||
{ return parameter.entries(); }
|
||||
inline G4UIparameter * GetParameter(int i) const
|
||||
{ return parameter[i]; }
|
||||
public: // with description
|
||||
inline void SetParameter(G4UIparameter *const newParameter)
|
||||
{
|
||||
parameter.insert( newParameter );
|
||||
newVal.resize( parameter.entries() );
|
||||
}
|
||||
// Defines a parameter. This method is used by the derived command classes
|
||||
// but the user can directly use this command when he/she defines a command
|
||||
// by hem(her)self without using the derived class. For this case, the order
|
||||
// of the parameters is the order of invoking this method.
|
||||
inline void SetGuidance(const char * aGuidance)
|
||||
{
|
||||
G4String * theGuidance = new G4String( aGuidance );
|
||||
commandGuidance.insert( *theGuidance );
|
||||
}
|
||||
// Adds a guidance line. Unlimitted number of invokation of this method is
|
||||
// allowed. The given lines of guidance will appear for the help. The first
|
||||
// line of the guidance will be used as the title of the command, i.e. one
|
||||
// line list of the commands.
|
||||
public:
|
||||
inline const G4String GetTitle() const
|
||||
{
|
||||
if(commandGuidance.entries() == 0)
|
||||
@@ -134,7 +168,7 @@ class G4UIcommand
|
||||
int bp; // buffer pointer for rangeBuf
|
||||
tokenNum token;
|
||||
yystype yylval;
|
||||
RWTValOrderedVector<yystype> newVal;
|
||||
G4RWTValOrderedVector<yystype> newVal;
|
||||
int paramERR;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UIcommandStatus.hh,v 1.1 1999/01/07 16:09:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIcommandStatus.hh,v 1.1.10.1 1999/12/07 20:49:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#ifndef G4UIcommandStatus_h
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UIcommandTree.hh,v 1.1 1999/01/07 16:09:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIcommandTree.hh,v 1.3.2.1 1999/12/07 20:49:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#ifndef G4UIcommandTree_h
|
||||
@@ -15,7 +15,13 @@
|
||||
|
||||
#include "G4UIcommand.hh"
|
||||
#include "globals.hh"
|
||||
#include <rw/tpordvec.h>
|
||||
#include "g4rw/tpordvec.h"
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This class is exclusively used by G4UImanager for handling the
|
||||
// tree structure of the commands. The user MUST NOT construct/use
|
||||
// this class object.
|
||||
|
||||
class G4UIcommandTree
|
||||
{
|
||||
@@ -36,8 +42,8 @@ class G4UIcommandTree
|
||||
void ListCurrentWithNum();
|
||||
|
||||
private:
|
||||
RWTPtrOrderedVector<G4UIcommand> command;
|
||||
RWTPtrOrderedVector<G4UIcommandTree> tree;
|
||||
G4RWTPtrOrderedVector<G4UIcommand> command;
|
||||
G4RWTPtrOrderedVector<G4UIcommandTree> tree;
|
||||
G4UIcommand *guidance;
|
||||
G4String pathName;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UIcontrolMessenger.hh,v 1.1 1999/01/07 16:09:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIcontrolMessenger.hh,v 1.2.4.1 1999/12/07 20:49:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#ifndef G4UIcontrolMessenger_h
|
||||
@@ -19,6 +19,17 @@ class G4UIcmdWithAString;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithoutParameter;
|
||||
|
||||
// class description:
|
||||
// This class is a concrete class of G4UImessenger which defines
|
||||
// commands affecting to the G4UImanager. Commands defined by
|
||||
// this messenger are
|
||||
// /control/
|
||||
// /control/execute
|
||||
// /control/verbose
|
||||
// /control/saveHistory
|
||||
// /control/stopSavingHistory
|
||||
// /control/manual
|
||||
|
||||
class G4UIcontrolMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UIdirectory.hh,v 1.1 1999/01/07 16:09:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIdirectory.hh,v 1.2.4.1 1999/12/07 20:49:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -15,11 +15,18 @@
|
||||
|
||||
#include "G4UIcommand.hh"
|
||||
|
||||
// class description:
|
||||
// A concrete class of G4UIcommand. This class defines a command
|
||||
// directory which can have commands.
|
||||
// General information of G4UIcommand is given in G4UIcommand.hh.
|
||||
|
||||
class G4UIdirectory : public G4UIcommand
|
||||
{
|
||||
public:
|
||||
public: // with description
|
||||
G4UIdirectory(char * theCommandPath);
|
||||
G4UIdirectory(const char * theCommandPath);
|
||||
// Constructors. The argument is a full path directory which
|
||||
// starts and ends with "/".
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UImanager.hh,v 1.1 1999/01/07 16:09:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UImanager.hh,v 1.3.2.1 1999/12/07 20:49:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#ifndef G4UImanager_h
|
||||
#define G4UImanager_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include <rw/ctoken.h>
|
||||
#include <rw/tvordvec.h>
|
||||
#include "g4rw/ctoken.h"
|
||||
#include "g4rw/tvordvec.h"
|
||||
#include <fstream.h>
|
||||
class G4UIcommandTree;
|
||||
class G4UIcommand;
|
||||
@@ -22,10 +22,19 @@ class G4UIsession;
|
||||
class G4UIcontrolMessenger;
|
||||
class G4UnitsMessenger;
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This is a singlton class which controls the command manipulation
|
||||
// and the user interface(s). The constructor of this class MUST NOT
|
||||
// invoked by the user.
|
||||
//
|
||||
|
||||
class G4UImanager
|
||||
{
|
||||
public:
|
||||
public: // with description
|
||||
static G4UImanager * GetUIpointer();
|
||||
// A static method to get the pointer to the only existing object
|
||||
// of this class.
|
||||
|
||||
protected:
|
||||
G4UImanager();
|
||||
@@ -37,18 +46,40 @@ class G4UImanager
|
||||
int operator==(const G4UImanager &right) const;
|
||||
int operator!=(const G4UImanager &right) const;
|
||||
|
||||
public:
|
||||
public: // with description
|
||||
G4String GetCurrentValues(const char * aCommand);
|
||||
// This method returns a string which represents the current value(s)
|
||||
// of the parameter(s) of the specified command. Null string will be
|
||||
// returned if the given command is not defined or the command does
|
||||
// not support the GetCurrentValues() method.
|
||||
void AddNewCommand(G4UIcommand * newCommand);
|
||||
// This method register a new command.
|
||||
void RemoveCommand(G4UIcommand * aCommand);
|
||||
// This command remove the registered command. After invokation of this
|
||||
// command, that particular command cannot be applied.
|
||||
void ExecuteMacroFile(G4String fileName);
|
||||
// A macro file defined by the argument will be read by G4UIbatch object.
|
||||
G4int ApplyCommand(char * aCommand);
|
||||
G4int ApplyCommand(G4String aCommand);
|
||||
// These two methods are identical. A command (and parameter(s)) given
|
||||
// by the method's argument will be applied. Zero will be returned in
|
||||
// case the command is successfully executed. Positive non-zero value
|
||||
// will be returned if the command couldn't be executed. The meaning of
|
||||
// this non-zero value is the following.
|
||||
// The returned number : xyy
|
||||
// x00 : G4CommandStatus.hh enumeration
|
||||
// yy : the problematic parameter (first found)
|
||||
void StoreHistory(G4String fileName="G4history.macro");
|
||||
void StoreHistory(G4bool historySwitch,
|
||||
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.
|
||||
|
||||
private:
|
||||
void CreateMessenger();
|
||||
@@ -72,9 +103,9 @@ class G4UImanager
|
||||
G4int verboseLevel;
|
||||
ofstream historyFile;
|
||||
G4bool saveHistory;
|
||||
RWTValOrderedVector<G4String> histVec;
|
||||
G4RWTValOrderedVector<G4String> histVec;
|
||||
|
||||
public:
|
||||
public: // with description
|
||||
G4String GetCurrentStringValue(const char * aCommand,
|
||||
int parameterNumber=1, G4bool reGet=true);
|
||||
G4int GetCurrentIntValue(const char * aCommand,
|
||||
@@ -87,14 +118,31 @@ class G4UImanager
|
||||
const char * aParameterName, G4bool reGet=true);
|
||||
G4double GetCurrentDoubleValue(const char * aCommand,
|
||||
const char * aParameterName, G4bool reGet=true);
|
||||
// These six methods returns the current value of a parameter of the
|
||||
// given command. For the first three methods, the ordering number of
|
||||
// the parameter (1 is the first parameter) can be given, whereas,
|
||||
// other three methods can give the parameter name.
|
||||
// If "reGet" is true, actual request of returning the current value
|
||||
// will be sent to the corresponding messenger, while, if it is false,
|
||||
// the value stored in G4Umanager will be used. The later case is valid
|
||||
// for the sequential invokation for the same command.
|
||||
|
||||
public:
|
||||
inline G4UIcommandTree * GetTree() const
|
||||
{ return treeTop; };
|
||||
inline G4UIsession * GetSession() const
|
||||
{ return session; };
|
||||
public: // with description
|
||||
inline void SetSession(G4UIsession *const value)
|
||||
{ session = value; };
|
||||
// This method defines the active (G)UI session.
|
||||
void SetCoutDestination(G4UIsession *const value);
|
||||
// This method defines the destination of G4cout/G4cerr stream.
|
||||
// For usual cases, this method will be invoked by a concrete
|
||||
// (G)UI session class object and thus the user needs not to invoke
|
||||
// this method by him(her)self.
|
||||
|
||||
public:
|
||||
inline void SetVerboseLevel(G4int val)
|
||||
{ verboseLevel = val; };
|
||||
inline G4int GetVerboseLevel() const
|
||||
@@ -109,10 +157,6 @@ class G4UImanager
|
||||
return st;
|
||||
}
|
||||
|
||||
public:
|
||||
void SetCoutDestination(G4UIsession *const value);
|
||||
|
||||
|
||||
// Old methods kept for backward compatibility
|
||||
// inline G4UIcommandTree * GetTree() const
|
||||
// { return treeTop; };
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UImessenger.hh,v 1.1 1999/01/07 16:09:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UImessenger.hh,v 1.3.2.1 1999/12/07 20:49:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#ifndef G4UImessenger_h
|
||||
@@ -17,15 +17,39 @@
|
||||
|
||||
class G4UIcommand;
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This class is the base class which represents a messenger which maintains
|
||||
// the commands. The user who wants to define some commands must create his/her
|
||||
// own concrete class derived from this class. The user's concrete messenger
|
||||
// must have a responsibility of creating and deleting commands. Also, it must
|
||||
// take care the delivering of the command to the destination class and replying
|
||||
// the current value(s) of the parameter(s).
|
||||
//
|
||||
|
||||
class G4UImessenger
|
||||
{
|
||||
|
||||
public:
|
||||
public: // with description
|
||||
G4UImessenger();
|
||||
// Constructor. In the implementation of the concrete messenger, all commands
|
||||
// related to the messenger must be constructed.
|
||||
virtual ~G4UImessenger();
|
||||
// Destructor. In the implementation of the concrete messenger, all commands
|
||||
// defined in the constructor must be deleted.
|
||||
virtual G4String GetCurrentValue(G4UIcommand * command);
|
||||
// The concrete implementation of this method gets the current value(s) of the
|
||||
// parameter(s) of the given command from the destination class, converts the
|
||||
// value(s) to a string, and returns the string. Conversion could be done by
|
||||
// the ConvertToString() method of corresponding G4UIcmdXXX classes if the
|
||||
// the command is an object of these G4UIcmdXXX classes.
|
||||
virtual void SetNewValue(G4UIcommand * command,G4String newValue);
|
||||
// For RWTPtrOrderedVector...
|
||||
// The concrete implementation of this method converts the string "newValue"
|
||||
// to value(s) of type(s) of the parameter(s). Convert methods corresponding
|
||||
// to the type of the command can be used if the command is an object of
|
||||
// G4UIcmdXXX classes.
|
||||
public:
|
||||
// For G4RWTPtrOrderedVector...
|
||||
G4bool operator == (const G4UImessenger& messenger) const;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UIparameter.hh,v 1.1 1999/01/07 16:09:23 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIparameter.hh,v 1.2.4.1 1999/12/07 20:49:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
@@ -24,13 +24,33 @@
|
||||
|
||||
#include "G4UItokenNum.hh"
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This class represents a parameter which will be taken by a G4UIcommand
|
||||
// object. In case a command is defined by constructing G4UIcmdXXX class,
|
||||
// it automatically creates necessary parameter objects, thus the user needs
|
||||
// not to create parameter object(s) by him/herself. In case the user wants
|
||||
// to create a command directly instansiated by G4UIcommand class, he/she
|
||||
// must create parameter object(s) by him/herself.
|
||||
|
||||
class G4UIparameter
|
||||
{
|
||||
public:
|
||||
public: // with description
|
||||
G4UIparameter();
|
||||
G4UIparameter(char theType);
|
||||
G4UIparameter(const char * theName, char theType, G4bool theOmittable);
|
||||
// Constructors, where "theName" is the name of the parameter which will
|
||||
// be used by the range checking, "theType" is the type of the parameter
|
||||
// (currently "b" (boolean), "i" (integer), "d" (double), and "s" (string)
|
||||
// are supported), and "theOmittable" is a boolean flag to set whether
|
||||
// the user of the command can ommit the parameter or not. If "theOmittable"
|
||||
// is true, the default value must be given.
|
||||
~G4UIparameter();
|
||||
// Destructor. When a command is destructed, the delete operator(s) for
|
||||
// associating parameter(s) are AUTOMATICALLY invoked. Thus the user needs
|
||||
// NOT to invoke this by him/herself.
|
||||
|
||||
public:
|
||||
int operator==(const G4UIparameter &right) const;
|
||||
int operator!=(const G4UIparameter &right) const;
|
||||
|
||||
@@ -48,22 +68,27 @@ class G4UIparameter
|
||||
G4bool currentAsDefaultFlag;
|
||||
G4int widget;
|
||||
|
||||
public:
|
||||
// defaultValue
|
||||
public: // with description
|
||||
inline void SetDefaultValue(const char * theDefaultValue)
|
||||
{ defaultValue = theDefaultValue; }
|
||||
void SetDefaultValue(G4int theDefaultValue);
|
||||
void SetDefaultValue(G4double theDefaultValue);
|
||||
// These methods set the default value of the parameter.
|
||||
public:
|
||||
inline G4String GetDefaultValue() const
|
||||
{ return defaultValue; }
|
||||
|
||||
// parameterType
|
||||
inline char GetParameterType() const
|
||||
{ return parameterType; }
|
||||
|
||||
// parameterRange
|
||||
public: // with description
|
||||
inline void SetParameterRange(const char * theRange)
|
||||
{ parameterRange = theRange; }
|
||||
// Defines the range the parameter can take.
|
||||
// The variable name appear in the range expression must be same
|
||||
// as the name of the parameter.
|
||||
// All the C++ syntax of relational operators are allowed for the
|
||||
// range expression.
|
||||
public:
|
||||
inline G4String GetParameterRange() const
|
||||
{ return parameterRange; }
|
||||
|
||||
@@ -73,9 +98,12 @@ class G4UIparameter
|
||||
inline G4String GetParameterName() const
|
||||
{ return parameterName; }
|
||||
|
||||
// parameterCandidates
|
||||
public: // with description
|
||||
inline void SetParameterCandidates(const char * theString)
|
||||
{ parameterCandidate = theString; }
|
||||
// This method is meaningful if the type of the parameter is string.
|
||||
// The candidates listed in the argument must be separated by space(s).
|
||||
public:
|
||||
inline G4String GetParameterCandidates() const
|
||||
{ return parameterCandidate; }
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UIsession.hh,v 1.1 1999/01/07 16:09:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UIsession.hh,v 1.2.4.1 1999/12/07 20:49:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
// $id$
|
||||
|
||||
@@ -16,6 +16,12 @@
|
||||
#include "G4coutDestination.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This is a base class of all (G)UI session.
|
||||
// SessionStart() method should be called to start the session.
|
||||
//
|
||||
|
||||
class G4UIsession : public G4coutDestination
|
||||
{
|
||||
// Base class of UI/GUI session
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UItokenNum.hh,v 1.1 1999/01/07 16:09:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UItokenNum.hh,v 1.1.10.1 1999/12/07 20:49:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
// G4UItokenNum.hh
|
||||
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4UnitsMessenger.hh,v 1.1 1999/01/07 16:09:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4UnitsMessenger.hh,v 1.2.2.1 1999/12/07 20:49:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// class description
|
||||
//
|
||||
// This class is the messenger of the class which maintain the table of Units.
|
||||
// (located in global/management/include/G4UnitsTable.hh)
|
||||
// Its contains the commands to interact with the table of Units
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4VFlavoredParallelWorld.hh,v 1.1 1999/04/15 15:43:11 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4VFlavoredParallelWorld.hh,v 1.1.8.1 1999/12/07 20:49:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// Abstract interface for GEANT4 Flavored Parallel World.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4VGlobalFastSimulationManager.hh,v 1.1 1999/04/15 15:43:14 mora Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4VGlobalFastSimulationManager.hh,v 1.1.8.1 1999/12/07 20:49:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// Abstract interface for GEANT4 Global Fast Simulation Manager.
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4VGraphicsScene.hh,v 1.1 1999/04/28 14:19:31 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// $Id: G4VGraphicsScene.hh,v 1.3.4.1 1999/12/07 20:49:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// John Allison 19th July 1996
|
||||
// Abstract interface class for the concept of a graphics scene.
|
||||
// It is a minimal scene for the GEANT4 kernel.
|
||||
// See G4VScene for a fuller description. G4VScene is the full abstract
|
||||
// interface to graphics systems.
|
||||
//
|
||||
// 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
|
||||
// the full abstract interface to graphics systems.
|
||||
|
||||
#ifndef G4VGRAPHICSSCENE_HH
|
||||
#define G4VGRAPHICSSCENE_HH
|
||||
@@ -31,19 +31,34 @@ class G4Torus;
|
||||
class G4PhysicalVolumeModel;
|
||||
class G4Polycone;
|
||||
class G4Polyhedra;
|
||||
class G4Polyline;
|
||||
class G4Text;
|
||||
class G4Circle;
|
||||
class G4Square;
|
||||
class G4Polymarker;
|
||||
class G4Polyhedron;
|
||||
class G4NURBS;
|
||||
|
||||
#include "G4Transform3D.hh"
|
||||
|
||||
// Scene Interface - begin snippet.
|
||||
class G4VGraphicsScene {
|
||||
|
||||
public:
|
||||
public: // With description
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// Functions for adding raw GEANT4 objects. The concrete graphics
|
||||
// scene has the option of implementing its own model or asking the
|
||||
// solid to provide a G4Polyhedron or similar primitive - see, for
|
||||
// example, G4VScene in the Visualization Category.
|
||||
// Functions for adding raw GEANT4 objects to the scene handler.
|
||||
// The concrete graphics scene handler has the option of
|
||||
// implementing its own model or asking the solid to provide a
|
||||
// G4Polyhedron or similar primitive - see, for example,
|
||||
// G4VSceneHandler in the Visualization Category.
|
||||
|
||||
virtual void PreAddThis (const G4Transform3D& objectTransformation,
|
||||
const G4VisAttributes& visAttribs) = 0;
|
||||
// objectTransformation is the transformation in the world
|
||||
// coordinate system of the object about to be added, and
|
||||
// visAttribs is its visualization attributes.
|
||||
|
||||
virtual void PostAddThis () = 0;
|
||||
|
||||
virtual void AddThis (const G4Box&) = 0;
|
||||
virtual void AddThis (const G4Cons&) = 0;
|
||||
@@ -58,7 +73,33 @@ public:
|
||||
virtual void AddThis (const G4VSolid&) = 0; // For solids not above.
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// Other functions.
|
||||
// Functions for adding graphics primitives to the scene handler.
|
||||
|
||||
virtual void BeginPrimitives (const G4Transform3D& objectTransformation) = 0;
|
||||
// IMPORTANT: invoke this from your polymorphic versions, e.g.:
|
||||
// void MyXXXSceneHandler::BeginPrimitives
|
||||
// (const G4Transform3D& objectTransformation) {
|
||||
// G4VSceneHandler::BeginPrimitives (objectTransformation);
|
||||
// ...
|
||||
// }
|
||||
|
||||
virtual void EndPrimitives () = 0;
|
||||
// IMPORTANT: invoke this from your polymorphic versions, e.g.:
|
||||
// void MyXXXSceneHandler::EndPrimitives () {
|
||||
// ...
|
||||
// G4VSceneHandler::EndPrimitives ();
|
||||
// }
|
||||
|
||||
virtual void AddPrimitive (const G4Polyline&) = 0;
|
||||
virtual void AddPrimitive (const G4Text&) = 0;
|
||||
virtual void AddPrimitive (const G4Circle&) = 0;
|
||||
virtual void AddPrimitive (const G4Square&) = 0;
|
||||
virtual void AddPrimitive (const G4Polymarker&) = 0;
|
||||
virtual void AddPrimitive (const G4Polyhedron&) = 0;
|
||||
virtual void AddPrimitive (const G4NURBS&) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// Special functions for particular models.
|
||||
|
||||
virtual void EstablishSpecials (G4PhysicalVolumeModel&) {}
|
||||
// Used to establish any special relationships between scene and
|
||||
@@ -68,15 +109,6 @@ public:
|
||||
virtual void DecommissionSpecials (G4PhysicalVolumeModel&) {}
|
||||
// Used to reverse the effect of EstablishSpecials, if required.
|
||||
|
||||
virtual void PreAddThis (const G4Transform3D& objectTransformation,
|
||||
const G4VisAttributes& visAttribs) = 0;
|
||||
// objectTransformation is the transformation in the world
|
||||
// coordinate system of the object about to be added, and
|
||||
// visAttribs is its visualization attributes.
|
||||
|
||||
virtual void PostAddThis () = 0;
|
||||
|
||||
};
|
||||
// Scene Interface - end snippet.
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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.1 1999/01/07 16:09:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4VStateDependent.hh,v 1.2.4.1 1999/12/07 20:49:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
@@ -25,6 +25,15 @@
|
||||
#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:
|
||||
@@ -33,7 +42,13 @@ public:
|
||||
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);
|
||||
|
||||
@@ -1,27 +1,49 @@
|
||||
// This code implementation is the intellectual property of
|
||||
// the RD44 GEANT4 collaboration.
|
||||
// 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: G4VVisManager.hh,v 1.2 1999/05/19 08:50:28 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
//
|
||||
// Abstract interface for GEANT4 Visualization Manager.
|
||||
// $Id: G4VVisManager.hh,v 1.3.4.1 1999/12/07 20:49:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// John Allison 19/Oct/1996.
|
||||
|
||||
// This is a "Singleton", i.e., only one instance of it may exist.
|
||||
// This is ensured by making the constructor private.
|
||||
|
||||
// It has only one public access function which is used to obtain a pointer
|
||||
// to the concrete G4VisManager, should it exist.
|
||||
// G4VVisManager* pVVMan = G4VVisManager::GetConcreteInstance ();
|
||||
// points to the real (concrete) G4VisManager, if a view is available for
|
||||
// drawing, otherwise is zero. Thus all code must be protected,
|
||||
// for example, by:
|
||||
//
|
||||
// Class Description:
|
||||
// G4VVisManager is an abstract interface for the GEANT4 Visualization Manager.
|
||||
// The inheritance hierarchy is:
|
||||
// G4VVisManager <- G4VisManager <- YourVisManager
|
||||
//
|
||||
// See example/novice/N02 to see how to write YourVisManager and
|
||||
// instantiate it. You should *not* access it directly; instead you
|
||||
// should obtain a pointer as follows:
|
||||
//
|
||||
// G4VVisManager* pVVMan = G4VVisManager::GetConcreteInstance ();
|
||||
//
|
||||
// This ensures your code will link even if YourVisManager is not
|
||||
// instantiated or even if not provided in a library. Please protect
|
||||
// your code by testing the pointer, for example, by:
|
||||
//
|
||||
// if (pVVMan) pVVMan -> Draw (polyline);
|
||||
//
|
||||
// The Draw functions draw only "transient" objects. This is useful
|
||||
// for debugging, e.g., drawing the step in your UserSteppingAction,
|
||||
// since G4Steps are not kept.
|
||||
//
|
||||
// Note: to draw "permanent" objects, i.e., objects which are always
|
||||
// available, such as detector geometry components, or available in an
|
||||
// event after tracking has finished, such as hits, digitisations and
|
||||
// trajectories, can be drawn in a transient way if you wish but it is
|
||||
// usually possible to draw them in a permanent way with /vis/
|
||||
// commands. The advantage is that permanent objects can be redrawn,
|
||||
// e.g., when you change view or viewer; transient objects get
|
||||
// forgotten.
|
||||
//
|
||||
// Note that the G4Transform3D argument refers to the transformation
|
||||
// of the *object*, not the transformation of the coordinate syste.
|
||||
//
|
||||
// Note also that where a G4VisAttributes argument is specified, it
|
||||
// overrides any attributes belonging to the object itself.
|
||||
|
||||
#ifndef G4VVISMANAGER_HH
|
||||
#define G4VVISMANAGER_HH
|
||||
@@ -44,30 +66,18 @@ class G4VisAttributes;
|
||||
|
||||
class G4VVisManager {
|
||||
|
||||
public:
|
||||
public: // With description
|
||||
|
||||
static G4VVisManager* GetConcreteInstance ();
|
||||
// Returns pointer to actual visualization manager if a view is
|
||||
// available for drawing, else returns null. Always check value.
|
||||
|
||||
public:
|
||||
|
||||
virtual ~G4VVisManager ();
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
// Functions to Draw "transient" objects, useful for hits, digis, etc.
|
||||
public: // With description
|
||||
|
||||
//1 Note that the {\tt G4Transform3D} objects refer to the
|
||||
//1 transformation of the {\em object} being drawn. However, for
|
||||
//1 some functions, there is a version which takes a {\tt
|
||||
//1 G4Translation} and a {\tt G4RotationMatrix}, the latter being a
|
||||
//1 {\em system} rotation, as in {\tt G4PVPlacement}.
|
||||
//1
|
||||
//1 Note also that where a {\tt G4VisAttributes} argument is
|
||||
//1 specified, it overrides any attributes belonging to the object
|
||||
//1 itself. Otherwise, the visualization attributes are assumed to
|
||||
//1 be those belonging to the object being drawn (you can set its
|
||||
//1 attributes --- see Section \ref{ap:setting_attribs}).
|
||||
|
||||
// VVisManager Interface - begin snippet.
|
||||
virtual void Draw (const G4Polyline&,
|
||||
const G4Transform3D& objectTransformation = G4Transform3D::Identity) = 0;
|
||||
|
||||
@@ -97,9 +107,6 @@ public:
|
||||
|
||||
virtual void Draw (const G4VPhysicalVolume&, const G4VisAttributes&,
|
||||
const G4Transform3D& objectTransformation = G4Transform3D::Identity) = 0;
|
||||
// VVisManager Interface - end snippet.
|
||||
|
||||
// Other management functions...
|
||||
|
||||
virtual void GeometryHasChanged () = 0;
|
||||
// This is used by the run manager to notify a change of geometry.
|
||||
|
||||
Reference in New Issue
Block a user