Geant4  10.02.p03
CexmcPrimaryGeneratorActionMessenger Class Reference

#include <CexmcPrimaryGeneratorActionMessenger.hh>

Inheritance diagram for CexmcPrimaryGeneratorActionMessenger:
Collaboration diagram for CexmcPrimaryGeneratorActionMessenger:

Public Member Functions

 CexmcPrimaryGeneratorActionMessenger (CexmcPrimaryGeneratorAction *primaryGeneratorAction)
 
 ~CexmcPrimaryGeneratorActionMessenger ()
 
void SetNewValue (G4UIcommand *cmd, G4String value)
 
- 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
 

Private Attributes

CexmcPrimaryGeneratorActionprimaryGeneratorAction
 
G4UIcmdWithADoubleAndUnitfwhmPosX
 
G4UIcmdWithADoubleAndUnitfwhmPosY
 
G4UIcmdWithADoubleAndUnitfwhmDirX
 
G4UIcmdWithADoubleAndUnitfwhmDirY
 
G4UIcmdWithADoublefwhmMomentumAmp
 

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 55 of file CexmcPrimaryGeneratorActionMessenger.hh.

Constructor & Destructor Documentation

◆ CexmcPrimaryGeneratorActionMessenger()

CexmcPrimaryGeneratorActionMessenger::CexmcPrimaryGeneratorActionMessenger ( CexmcPrimaryGeneratorAction primaryGeneratorAction)
explicit

Definition at line 51 of file CexmcPrimaryGeneratorActionMessenger.cc.

52  :
53  primaryGeneratorAction( primaryGeneratorAction ),
54  fwhmPosX( NULL ), fwhmPosY( NULL ), fwhmDirX( NULL ), fwhmDirY( NULL ),
55  fwhmMomentumAmp( NULL )
56 {
58  ( CexmcMessenger::gunDirName + "fwhmPosX" ).c_str(), this );
59  fwhmPosX->SetGuidance( "Set positional fwhm of the beam along X axis" );
60  fwhmPosX->SetParameterName( "FwhmPosX", false );
62  fwhmPosX->SetUnitCandidates( "mm cm m" );
63  fwhmPosX->SetDefaultUnit( "cm" );
65 
67  ( CexmcMessenger::gunDirName + "fwhmPosY" ).c_str(), this );
68  fwhmPosY->SetGuidance( "Set positional fwhm of the beam along Y axis" );
69  fwhmPosY->SetParameterName( "FwhmPosY", false );
71  fwhmPosY->SetUnitCandidates( "mm cm m" );
72  fwhmPosY->SetDefaultUnit( "cm" );
74 
76  ( CexmcMessenger::gunDirName + "fwhmDirX" ).c_str(), this );
77  fwhmDirX->SetGuidance( "Set directional fwhm of the beam along X axis" );
78  fwhmDirX->SetParameterName( "FwhmDirX", false );
80  fwhmDirX->SetUnitCandidates( "deg rad" );
81  fwhmDirX->SetDefaultUnit( "deg" );
83 
85  ( CexmcMessenger::gunDirName + "fwhmDirY" ).c_str(), this );
86  fwhmDirY->SetGuidance( "Set directional fwhm of the beam along Y axis" );
87  fwhmDirY->SetParameterName( "FwhmDirY", false );
89  fwhmDirY->SetUnitCandidates( "deg rad" );
90  fwhmDirY->SetDefaultUnit( "deg" );
92 
94  ( CexmcMessenger::gunDirName + "fwhmMomentumAmp" ).c_str(), this );
95  fwhmMomentumAmp->SetGuidance( "Set fwhm of the beam momentum as fraction "
96  "of its value" );
97  fwhmMomentumAmp->SetParameterName( "FwhmMomentumAmp", false );
100 }
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void AvailableForStates(G4ApplicationState s1)
Definition: G4UIcommand.cc:239
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultUnit(const char *defUnit)
static G4String gunDirName
void SetDefaultValue(G4double defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetUnitCandidates(const char *candidateList)
Here is the call graph for this function:

◆ ~CexmcPrimaryGeneratorActionMessenger()

CexmcPrimaryGeneratorActionMessenger::~CexmcPrimaryGeneratorActionMessenger ( )

Definition at line 103 of file CexmcPrimaryGeneratorActionMessenger.cc.

104 {
105  delete fwhmPosX;
106  delete fwhmPosY;
107  delete fwhmDirX;
108  delete fwhmDirY;
109  delete fwhmMomentumAmp;
110 }

Member Function Documentation

◆ SetNewValue()

void CexmcPrimaryGeneratorActionMessenger::SetNewValue ( G4UIcommand cmd,
G4String  value 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 113 of file CexmcPrimaryGeneratorActionMessenger.cc.

115 {
116  do
117  {
118  if ( cmd == fwhmPosX )
119  {
122  break;
123  }
124  if ( cmd == fwhmPosY )
125  {
128  break;
129  }
130  if ( cmd == fwhmDirX )
131  {
134  break;
135  }
136  if ( cmd == fwhmDirY )
137  {
140  break;
141  }
142  if ( cmd == fwhmMomentumAmp )
143  {
146  break;
147  }
148  } while ( false );
149 }
static G4double GetNewDoubleValue(const char *paramString)
static G4double GetNewDoubleValue(const char *paramString)
void SetFwhmDirY(G4double value, G4bool fromMessenger=true)
void SetFwhmPosX(G4double value, G4bool fromMessenger=true)
void SetFwhmDirX(G4double value, G4bool fromMessenger=true)
void SetFwhmMomentumAmp(G4double value, G4bool fromMessenger=true)
void SetFwhmPosY(G4double value, G4bool fromMessenger=true)
Here is the call graph for this function:

Member Data Documentation

◆ fwhmDirX

G4UIcmdWithADoubleAndUnit* CexmcPrimaryGeneratorActionMessenger::fwhmDirX
private

Definition at line 73 of file CexmcPrimaryGeneratorActionMessenger.hh.

◆ fwhmDirY

G4UIcmdWithADoubleAndUnit* CexmcPrimaryGeneratorActionMessenger::fwhmDirY
private

Definition at line 75 of file CexmcPrimaryGeneratorActionMessenger.hh.

◆ fwhmMomentumAmp

G4UIcmdWithADouble* CexmcPrimaryGeneratorActionMessenger::fwhmMomentumAmp
private

Definition at line 77 of file CexmcPrimaryGeneratorActionMessenger.hh.

◆ fwhmPosX

G4UIcmdWithADoubleAndUnit* CexmcPrimaryGeneratorActionMessenger::fwhmPosX
private

Definition at line 69 of file CexmcPrimaryGeneratorActionMessenger.hh.

◆ fwhmPosY

G4UIcmdWithADoubleAndUnit* CexmcPrimaryGeneratorActionMessenger::fwhmPosY
private

Definition at line 71 of file CexmcPrimaryGeneratorActionMessenger.hh.

◆ primaryGeneratorAction

CexmcPrimaryGeneratorAction* CexmcPrimaryGeneratorActionMessenger::primaryGeneratorAction
private

Definition at line 67 of file CexmcPrimaryGeneratorActionMessenger.hh.


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