Public Member Functions | Private Attributes | List of all members
EDepSim::ComponentBuilderMessenger Class Reference

#include <EDepSimComponentBuilder.hh>

Inheritance diagram for EDepSim::ComponentBuilderMessenger:
EDepSim::BuilderMessenger

Public Member Functions

 ComponentBuilderMessenger (EDepSim::ComponentBuilder *c, const char *guide)
 
virtual ~ComponentBuilderMessenger ()
 
void SetNewValue (G4UIcommand *cmd, G4String val)
 
- Public Member Functions inherited from EDepSim::BuilderMessenger
 BuilderMessenger (EDepSim::Builder *c, const char *guide=NULL)
 
virtual ~BuilderMessenger ()
 
G4String GetDirectory (void)
 Return the name of the directory. More...
 
G4String CommandName (G4String cmd)
 Build a command name with the directory prefix. More...
 
void SetNewValue (G4UIcommand *cmd, G4String val)
 

Private Attributes

EDepSim::ComponentBuilderfBuilder
 
G4UIcmdWithADoubleAndUnit * fWidthCMD
 
G4UIcmdWithADoubleAndUnit * fHeightCMD
 
G4UIcmdWithADoubleAndUnit * fMaxWidthCMD
 
G4UIcmdWithADoubleAndUnit * fMaxHeightCMD
 

Detailed Description

Definition at line 115 of file EDepSimComponentBuilder.hh.

Constructor & Destructor Documentation

EDepSim::ComponentBuilderMessenger::ComponentBuilderMessenger ( EDepSim::ComponentBuilder c,
const char *  guide 
)
inline

Definition at line 124 of file EDepSimComponentBuilder.hh.

126  : EDepSim::BuilderMessenger(c,guide),
127  fBuilder(c) {
128 
129  fWidthCMD = new G4UIcmdWithADoubleAndUnit(CommandName("width"),this);
130  fWidthCMD->SetGuidance("Set the width of the component.");
131  fWidthCMD->SetParameterName("Width",false);
132  fWidthCMD->SetUnitCategory("Length");
133 
134  fHeightCMD = new G4UIcmdWithADoubleAndUnit(CommandName("height"),this);
135  fHeightCMD->SetGuidance("Set the height of the component.");
136  fHeightCMD->SetParameterName("Height",false);
137  fHeightCMD->SetUnitCategory("Length");
138 
139  fMaxWidthCMD
140  = new G4UIcmdWithADoubleAndUnit(CommandName("maxWidth"),this);
141  fMaxWidthCMD->SetGuidance("Set the maximum width of the component.");
142  fMaxWidthCMD->SetParameterName("Width",false);
143  fMaxWidthCMD->SetUnitCategory("Length");
144 
146  = new G4UIcmdWithADoubleAndUnit(CommandName("maxHeight"),this);
147  fMaxHeightCMD->SetGuidance("Set the maximum height of the component.");
148  fMaxHeightCMD->SetParameterName("Height",false);
149  fMaxHeightCMD->SetUnitCategory("Length");
150 
151  };
G4UIcmdWithADoubleAndUnit * fMaxHeightCMD
G4String CommandName(G4String cmd)
Build a command name with the directory prefix.
G4UIcmdWithADoubleAndUnit * fMaxWidthCMD
virtual EDepSim::ComponentBuilderMessenger::~ComponentBuilderMessenger ( )
inlinevirtual

Definition at line 153 of file EDepSimComponentBuilder.hh.

153  {
154  delete fWidthCMD;
155  delete fHeightCMD;
156  delete fMaxWidthCMD;
157  delete fMaxHeightCMD;
158  };
G4UIcmdWithADoubleAndUnit * fMaxHeightCMD
G4UIcmdWithADoubleAndUnit * fMaxWidthCMD

Member Function Documentation

void EDepSim::ComponentBuilderMessenger::SetNewValue ( G4UIcommand *  cmd,
G4String  val 
)
inline

Definition at line 160 of file EDepSimComponentBuilder.hh.

160  {
161  if (cmd==fWidthCMD) {
162  fBuilder->SetWidth(fWidthCMD->GetNewDoubleValue(val));
163  }
164  else if (cmd==fHeightCMD) {
165  fBuilder->SetHeight(fHeightCMD->GetNewDoubleValue(val));
166  }
167  else if (cmd==fMaxWidthCMD) {
168  fBuilder->
169  SetMaximumWidth(fMaxWidthCMD->GetNewDoubleValue(val));
170  }
171  else if (cmd==fMaxHeightCMD) {
172  fBuilder->
173  SetMaximumHeight(fMaxHeightCMD->GetNewDoubleValue(val));
174  }
175  else {
177  }
178  };
void SetNewValue(G4UIcommand *cmd, G4String val)
virtual void SetHeight(double w)
G4UIcmdWithADoubleAndUnit * fMaxHeightCMD
list cmd
Definition: getreco.py:22
virtual void SetWidth(double w)
G4UIcmdWithADoubleAndUnit * fMaxWidthCMD

Member Data Documentation

EDepSim::ComponentBuilder* EDepSim::ComponentBuilderMessenger::fBuilder
private

Definition at line 117 of file EDepSimComponentBuilder.hh.

G4UIcmdWithADoubleAndUnit* EDepSim::ComponentBuilderMessenger::fHeightCMD
private

Definition at line 119 of file EDepSimComponentBuilder.hh.

G4UIcmdWithADoubleAndUnit* EDepSim::ComponentBuilderMessenger::fMaxHeightCMD
private

Definition at line 121 of file EDepSimComponentBuilder.hh.

G4UIcmdWithADoubleAndUnit* EDepSim::ComponentBuilderMessenger::fMaxWidthCMD
private

Definition at line 120 of file EDepSimComponentBuilder.hh.

G4UIcmdWithADoubleAndUnit* EDepSim::ComponentBuilderMessenger::fWidthCMD
private

Definition at line 118 of file EDepSimComponentBuilder.hh.


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