ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4GenericMessenger Class Reference

This class is generic messenger. More...

#include <geant4/tree/geant4-10.6-release/source/intercoms/include/G4GenericMessenger.hh>

+ Inheritance diagram for G4GenericMessenger:
+ Collaboration diagram for G4GenericMessenger:

Classes

struct  Command
 
struct  Method
 
struct  Property
 

Public Member Functions

 G4GenericMessenger (void *obj, const G4String &dir="", const G4String &doc="")
 Contructor.
 
virtual ~G4GenericMessenger ()
 Destructor.
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 The concrete, but generic implementation of this method.
 
virtual void SetNewValue (G4UIcommand *command, G4String newValue)
 The concrete, generic implementation of this method converts the string "newValue" to action.
 
CommandDeclareProperty (const G4String &name, const G4AnyType &variable, const G4String &doc="")
 Declare Methods.
 
CommandDeclarePropertyWithUnit (const G4String &name, const G4String &defaultUnit, const G4AnyType &variable, const G4String &doc="")
 
CommandDeclareMethod (const G4String &name, const G4AnyMethod &fun, const G4String &doc="")
 
CommandDeclareMethodWithUnit (const G4String &name, const G4String &defaultUnit, const G4AnyMethod &fun, const G4String &doc="")
 
void SetDirectory (const G4String &dir)
 
void SetGuidance (const G4String &s)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Private Attributes

std::map< G4String, Propertyproperties
 
std::map< G4String, Methodmethods
 
G4UIdirectorydircmd
 
G4String directory
 
voidobject
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (G4String s)
 
G4long StoL (G4String s)
 
G4double StoD (G4String s)
 
G4bool StoB (G4String s)
 
void AddUIcommand (G4UIcommand *newCommand)
 
void CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
template<typename T >
TCreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 

Detailed Description

This class is generic messenger.

Definition at line 45 of file G4GenericMessenger.hh.

View newest version in sPHENIX GitHub at line 45 of file G4GenericMessenger.hh

Constructor & Destructor Documentation

G4GenericMessenger::G4GenericMessenger ( void obj,
const G4String dir = "",
const G4String doc = "" 
)

Contructor.

Definition at line 48 of file G4GenericMessenger.cc.

View newest version in sPHENIX GitHub at line 48 of file G4GenericMessenger.cc

References d, dircmd, pos(), and G4UIcommand::SetGuidance().

+ Here is the call graph for this function:

G4GenericMessenger::~G4GenericMessenger ( )
virtual

Destructor.

Definition at line 63 of file G4GenericMessenger.cc.

View newest version in sPHENIX GitHub at line 63 of file G4GenericMessenger.cc

References dircmd, for(), methods, and properties.

+ Here is the call graph for this function:

Member Function Documentation

G4GenericMessenger::Command & G4GenericMessenger::DeclareMethod ( const G4String name,
const G4AnyMethod fun,
const G4String doc = "" 
)

Definition at line 112 of file G4GenericMessenger.cc.

View newest version in sPHENIX GitHub at line 112 of file G4GenericMessenger.cc

References directory, methods, G4AnyMethod::NArg(), G4UIcommand::SetGuidance(), and G4UIcommand::SetParameter().

Referenced by HadrontherapyRBE::CreateMessenger(), DetectorConstruction0::DefineCommands(), and DetectorConstruction::DefineCommands().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4GenericMessenger::Command & G4GenericMessenger::DeclareMethodWithUnit ( const G4String name,
const G4String defaultUnit,
const G4AnyMethod fun,
const G4String doc = "" 
)

Definition at line 123 of file G4GenericMessenger.cc.

View newest version in sPHENIX GitHub at line 123 of file G4GenericMessenger.cc

References FatalException, G4Exception(), G4AnyMethod::NArg(), G4UIcommand::SetGuidance(), and G4UIcmdWithADoubleAndUnit::SetParameterName().

Referenced by B5MagneticField::DefineCommands(), DetectorConstruction0::DefineCommands(), B5DetectorConstruction::DefineCommands(), and DetectorConstruction::DefineCommands().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4GenericMessenger::Command & G4GenericMessenger::DeclareProperty ( const G4String name,
const G4AnyType variable,
const G4String doc = "" 
)

Declare Methods.

Definition at line 71 of file G4GenericMessenger.cc.

View newest version in sPHENIX GitHub at line 71 of file G4GenericMessenger.cc

References directory, int(), properties, G4UIcommand::SetGuidance(), G4UIcommand::SetParameter(), and G4AnyType::TypeInfo().

Referenced by B5PrimaryGeneratorAction::DefineCommands(), EICG4dRICHConfig::EICG4dRICHConfig(), GB03BOptrGeometryBasedBiasing::GB03BOptrGeometryBasedBiasing(), and GB04BOptrBremSplitting::GB04BOptrBremSplitting().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4GenericMessenger::Command & G4GenericMessenger::DeclarePropertyWithUnit ( const G4String name,
const G4String defaultUnit,
const G4AnyType variable,
const G4String doc = "" 
)

Definition at line 88 of file G4GenericMessenger.cc.

View newest version in sPHENIX GitHub at line 88 of file G4GenericMessenger.cc

References G4UIcommand::SetGuidance(), G4UIcmdWithADoubleAndUnit::SetParameterName(), G4UIcmdWith3VectorAndUnit::SetParameterName(), and G4AnyType::TypeInfo().

Referenced by B5PrimaryGeneratorAction::DefineCommands(), and EICG4dRICHConfig::EICG4dRICHConfig().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4String G4GenericMessenger::GetCurrentValue ( G4UIcommand command)
virtual

The concrete, but generic implementation of this method.

Reimplemented from G4UImessenger.

Definition at line 140 of file G4GenericMessenger.cc.

View newest version in sPHENIX GitHub at line 140 of file G4GenericMessenger.cc

References G4cout, G4endl, G4UIcommand::GetCommandName(), methods, properties, G4AnyType::ToString(), and G4GenericMessenger::Property::variable.

+ Here is the call graph for this function:

void G4GenericMessenger::SetDirectory ( const G4String dir)
inline

Definition at line 102 of file G4GenericMessenger.hh.

View newest version in sPHENIX GitHub at line 102 of file G4GenericMessenger.hh

References dir, and directory.

void G4GenericMessenger::SetGuidance ( const G4String s)

Definition at line 181 of file G4GenericMessenger.cc.

View newest version in sPHENIX GitHub at line 181 of file G4GenericMessenger.cc

References dircmd, and G4UIcommand::SetGuidance().

Referenced by HadrontherapyRBE::CreateMessenger().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4GenericMessenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

The concrete, generic implementation of this method converts the string "newValue" to action.

Reimplemented from G4UImessenger.

Definition at line 154 of file G4GenericMessenger.cc.

View newest version in sPHENIX GitHub at line 154 of file G4GenericMessenger.cc

References G4UIcommand::ConvertToDimensioned3Vector(), G4UIcommand::ConvertToDimensionedDouble(), G4UIcommand::ConvertToString(), G4AnyType::FromString(), G4UIcommand::GetCommandName(), m, G4GenericMessenger::Method::method, methods, G4AnyMethod::NArg(), G4GenericMessenger::Method::object, properties, and G4GenericMessenger::Property::variable.

+ Here is the call graph for this function:

Member Data Documentation

G4UIdirectory* G4GenericMessenger::dircmd
private

Definition at line 108 of file G4GenericMessenger.hh.

View newest version in sPHENIX GitHub at line 108 of file G4GenericMessenger.hh

Referenced by G4GenericMessenger(), SetGuidance(), and ~G4GenericMessenger().

G4String G4GenericMessenger::directory
private

Definition at line 109 of file G4GenericMessenger.hh.

View newest version in sPHENIX GitHub at line 109 of file G4GenericMessenger.hh

Referenced by DeclareMethod(), DeclareProperty(), and SetDirectory().

std::map<G4String, Method> G4GenericMessenger::methods
private

Definition at line 107 of file G4GenericMessenger.hh.

View newest version in sPHENIX GitHub at line 107 of file G4GenericMessenger.hh

Referenced by DeclareMethod(), GetCurrentValue(), SetNewValue(), and ~G4GenericMessenger().

void* G4GenericMessenger::object
private

Definition at line 110 of file G4GenericMessenger.hh.

View newest version in sPHENIX GitHub at line 110 of file G4GenericMessenger.hh

std::map<G4String, Property> G4GenericMessenger::properties
private

Definition at line 106 of file G4GenericMessenger.hh.

View newest version in sPHENIX GitHub at line 106 of file G4GenericMessenger.hh

Referenced by DeclareProperty(), GetCurrentValue(), SetNewValue(), and ~G4GenericMessenger().


The documentation for this class was generated from the following files: