Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ClusteringAlgoMessenger Class Reference

#include <ClusteringAlgoMessenger.hh>

Inheritance diagram for ClusteringAlgoMessenger:
Collaboration diagram for ClusteringAlgoMessenger:

Public Member Functions

 ClusteringAlgoMessenger (ClusteringAlgo *)
 
 ~ClusteringAlgoMessenger ()
 
virtual void SetNewValue (G4UIcommand *, G4String)
 
- 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
 
G4bool CommandsShouldBeInMaster () 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
 
G4bool commandsShouldBeInMaster
 

Detailed Description

Definition at line 49 of file ClusteringAlgoMessenger.hh.

Constructor & Destructor Documentation

ClusteringAlgoMessenger::ClusteringAlgoMessenger ( ClusteringAlgo pClustAlgo)

Definition at line 49 of file ClusteringAlgoMessenger.cc.

50 :G4UImessenger(),fpClusteringAlgo(pClustAlgo)
51 {
52  fpAppliDir = new G4UIdirectory("/clustering/");
53  fpAppliDir->SetGuidance("commands specific to this example");
54 
55  fpMinPtsCmd = new G4UIcmdWithAnInteger("/clustering/algo/setMinPts",this);
56  fpMinPtsCmd->SetGuidance("Minimal number of points to create a cluster");
57  fpMinPtsCmd->SetParameterName("MinPts",false);
58  fpMinPtsCmd->SetRange("MinPts>0");
59  fpMinPtsCmd->AvailableForStates(G4State_Idle);
60 
61  fpProbCmd = new G4UIcmdWithADouble("/clustering/algo/setSelectionProb",this);
62  fpProbCmd->SetGuidance("Probability to select potential "
63  "damage according to the geometry");
64  fpProbCmd->SetParameterName("Prob",false);
65  fpProbCmd->SetRange("Prob>0");
66  fpProbCmd->AvailableForStates(G4State_Idle);
67 
68  fpEpsCmd = new G4UIcmdWithADoubleAndUnit("/clustering/algo/setEps",this);
69  fpEpsCmd->SetGuidance("Maximal distance between points to create a cluster");
70  fpEpsCmd->SetParameterName("Eps",false);
71  fpEpsCmd->SetRange("Eps>0");
73 
74  fpEminCmd = new G4UIcmdWithADoubleAndUnit("/clustering/algo/setEmin",this);
75  fpEminCmd->SetGuidance("Energy to have a probability "
76  "to create a strand break = 0");
77  fpEminCmd->SetParameterName("Emin",false);
78  fpEminCmd->SetRange("Emin>=0");
79  fpEminCmd->AvailableForStates(G4State_Idle);
80 
81  fpEmaxCmd = new G4UIcmdWithADoubleAndUnit("/clustering/algo/setEmax",this);
82  fpEmaxCmd->SetGuidance("Energy to have a probability "
83  "to create a strand break = 1");
84  fpEmaxCmd->SetParameterName("Emax",false);
85  fpEmaxCmd->SetRange("Emax>=0");
86  fpEmaxCmd->AvailableForStates(G4State_Idle);
87 }
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetRange(const char *rs)
Definition: G4UIcommand.hh:125
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:240
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)

Here is the call graph for this function:

ClusteringAlgoMessenger::~ClusteringAlgoMessenger ( )

Definition at line 91 of file ClusteringAlgoMessenger.cc.

92 {
93  delete fpMinPtsCmd;
94  delete fpProbCmd;
95  delete fpEpsCmd;
96  delete fpEminCmd;
97  delete fpEmaxCmd;
98  delete fpAppliDir;
99 }

Member Function Documentation

void ClusteringAlgoMessenger::SetNewValue ( G4UIcommand pCommand,
G4String  pNewValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 103 of file ClusteringAlgoMessenger.cc.

105 {
106  if(pCommand == fpMinPtsCmd)
107  {
108  fpClusteringAlgo->SetMinPts(fpMinPtsCmd->GetNewIntValue(pNewValue));
109  }
110  if(pCommand == fpProbCmd)
111  {
112  fpClusteringAlgo->SetSPointsProb(fpProbCmd->GetNewDoubleValue(pNewValue));
113  }
114  if(pCommand == fpEpsCmd)
115  {
116  fpClusteringAlgo->SetEps(fpEpsCmd->GetNewDoubleValue(pNewValue));
117  }
118  if(pCommand == fpEminCmd)
119  {
120  fpClusteringAlgo->SetEMinDamage(fpEminCmd->GetNewDoubleValue(pNewValue));
121  }
122  if(pCommand == fpEmaxCmd)
123  {
124  fpClusteringAlgo->SetEMaxDamage(fpEmaxCmd->GetNewDoubleValue(pNewValue));
125  }
126 }
void SetEMinDamage(G4double val)
static G4int GetNewIntValue(const char *paramString)
void SetEps(G4double val)
static G4double GetNewDoubleValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
void SetEMaxDamage(G4double val)
void SetSPointsProb(G4double val)
void SetMinPts(G4int val)

Here is the call graph for this function:


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