Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4SDmessenger Class Reference

#include <G4SDmessenger.hh>

Inheritance diagram for G4SDmessenger:
G4UImessenger

Public Member Functions

 G4SDmessenger (G4SDManager *SDManager)
 
 ~G4SDmessenger ()
 
void SetNewValue (G4UIcommand *command, G4String newValues)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator== (const G4UImessenger &messenger) const
 

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)
 
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 >
T * CreateCommand (const G4String &cname, const G4String &dsc)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 

Detailed Description

Definition at line 52 of file G4SDmessenger.hh.

Constructor & Destructor Documentation

G4SDmessenger::G4SDmessenger ( G4SDManager SDManager)

Definition at line 38 of file G4SDmessenger.cc.

References G4UIcmdWithAString::SetDefaultValue(), G4UIcommand::SetGuidance(), G4UIcmdWithAString::SetParameterName(), and G4UIcmdWithAnInteger::SetParameterName().

38  :fSDMan(SDManager)
39 {
40  hitsDir = new G4UIdirectory("/hits/");
41  hitsDir->SetGuidance("Sensitive detectors and Hits");
42 
43  listCmd = new G4UIcmdWithoutParameter("/hits/list",this);
44  listCmd->SetGuidance("List sensitive detector tree.");
45 
46  activeCmd = new G4UIcmdWithAString("/hits/activate",this);
47  activeCmd->SetGuidance("Activate sensitive detector(s).");
48  activeCmd->SetParameterName("detector",true);
49  activeCmd->SetDefaultValue("/");
50 
51  inactiveCmd = new G4UIcmdWithAString("/hits/inactivate",this);
52  inactiveCmd->SetGuidance("Inactivate sensitive detector(s).");
53  inactiveCmd->SetParameterName("detector",true);
54  inactiveCmd->SetDefaultValue("/");
55 
56  verboseCmd = new G4UIcmdWithAnInteger("/hits/verbose",this);
57  verboseCmd->SetGuidance("Set the Verbose level.");
58  verboseCmd->SetParameterName("level",false);
59 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void SetDefaultValue(const char *defVal)
G4SDmessenger::~G4SDmessenger ( )

Definition at line 61 of file G4SDmessenger.cc.

62 {
63  delete listCmd;
64  delete activeCmd;
65  delete inactiveCmd;
66  delete verboseCmd;
67  delete hitsDir;
68 }

Member Function Documentation

void G4SDmessenger::SetNewValue ( G4UIcommand command,
G4String  newValues 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 70 of file G4SDmessenger.cc.

References G4SDManager::Activate(), G4UIcmdWithAnInteger::GetNewIntValue(), G4SDManager::ListTree(), and G4SDManager::SetVerboseLevel().

71 {
72  if( command==listCmd )
73  { fSDMan->ListTree(); }
74  if( command==activeCmd )
75  { fSDMan->Activate(newVal,1); }
76  if( command==inactiveCmd )
77  { fSDMan->Activate(newVal,0); }
78  if( command==verboseCmd )
79  { fSDMan->SetVerboseLevel(verboseCmd->GetNewIntValue(newVal)); }
80  return;
81 }
static G4int GetNewIntValue(const char *paramString)
void SetVerboseLevel(G4int vl)
Definition: G4SDManager.hh:90
void ListTree() const
Definition: G4SDManager.hh:97
void Activate(G4String dName, G4bool activeFlag)
Definition: G4SDManager.cc:117

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