Public Member Functions | Private Attributes | List of all members
CaptPMTMessenger Class Reference
Inheritance diagram for CaptPMTMessenger:
EDepSim::BuilderMessenger

Public Member Functions

 CaptPMTMessenger (CaptPMTBuilder *c)
 
virtual ~CaptPMTMessenger ()
 
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

CaptPMTBuilderfBuilder
 
G4UIcmdWithADoubleAndUnit * fSizeCMD
 
G4UIcmdWithADoubleAndUnit * fBaseLengthCMD
 
G4UIcmdWithABool * fRoundCMD
 

Detailed Description

Definition at line 22 of file CaptPMTBuilder.cc.

Constructor & Destructor Documentation

CaptPMTMessenger::CaptPMTMessenger ( CaptPMTBuilder c)
inline

Definition at line 31 of file CaptPMTBuilder.cc.

32  : EDepSim::BuilderMessenger(c,"Control the PMT construction."),
33  fBuilder(c) {
34 
35  fSizeCMD
36  = new G4UIcmdWithADoubleAndUnit(CommandName("size"),this);
37  fSizeCMD->SetGuidance("Set the PMT size.");
38  fSizeCMD->SetParameterName("size",false);
39  fSizeCMD->SetUnitCategory("Length");
40 
41  fBaseLengthCMD = new G4UIcmdWithADoubleAndUnit(
42  CommandName("baseLength"),this);
43  fBaseLengthCMD->SetGuidance("Set the PMT base length.");
44  fBaseLengthCMD->SetParameterName("length",false);
45  fBaseLengthCMD->SetUnitCategory("Length");
46 
47  fRoundCMD = new G4UIcmdWithABool(
48  CommandName("round"),this);
49  fRoundCMD->SetGuidance("Flag that the PMT is round.");
50  }
G4UIcmdWithABool * fRoundCMD
CaptPMTBuilder * fBuilder
G4UIcmdWithADoubleAndUnit * fSizeCMD
G4String CommandName(G4String cmd)
Build a command name with the directory prefix.
G4UIcmdWithADoubleAndUnit * fBaseLengthCMD
virtual CaptPMTMessenger::~CaptPMTMessenger ( )
inlinevirtual

Definition at line 52 of file CaptPMTBuilder.cc.

52  {
53  delete fSizeCMD;
54  delete fBaseLengthCMD;
55  delete fRoundCMD;
56  }
G4UIcmdWithABool * fRoundCMD
G4UIcmdWithADoubleAndUnit * fSizeCMD
G4UIcmdWithADoubleAndUnit * fBaseLengthCMD

Member Function Documentation

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

Definition at line 58 of file CaptPMTBuilder.cc.

58  {
59  if (cmd==fSizeCMD) {
60  fBuilder->SetSize(fSizeCMD->GetNewDoubleValue(val));
61  }
62  else if (cmd==fBaseLengthCMD) {
63  fBuilder->SetBaseLength(fBaseLengthCMD->GetNewDoubleValue(val));
64  }
65  else if (cmd==fRoundCMD) {
66  fBuilder->SetRound(fRoundCMD->GetNewBoolValue(val));
67  }
68  else {
70  }
71  }
void SetNewValue(G4UIcommand *cmd, G4String val)
G4UIcmdWithABool * fRoundCMD
void SetSize(double v)
void SetRound(bool v)
Set that the PMT is round.
CaptPMTBuilder * fBuilder
void SetBaseLength(double v)
G4UIcmdWithADoubleAndUnit * fSizeCMD
list cmd
Definition: getreco.py:22
G4UIcmdWithADoubleAndUnit * fBaseLengthCMD

Member Data Documentation

G4UIcmdWithADoubleAndUnit* CaptPMTMessenger::fBaseLengthCMD
private

Definition at line 27 of file CaptPMTBuilder.cc.

CaptPMTBuilder* CaptPMTMessenger::fBuilder
private

Definition at line 25 of file CaptPMTBuilder.cc.

G4UIcmdWithABool* CaptPMTMessenger::fRoundCMD
private

Definition at line 28 of file CaptPMTBuilder.cc.

G4UIcmdWithADoubleAndUnit* CaptPMTMessenger::fSizeCMD
private

Definition at line 26 of file CaptPMTBuilder.cc.


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