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

#include <ML2PhantomConstructionMessenger.hh>

Inheritance diagram for CML2PhantomConstructionMessenger:
Collaboration diagram for CML2PhantomConstructionMessenger:

Public Member Functions

 CML2PhantomConstructionMessenger (CML2PhantomConstruction *phantomConstructor)
 
 ~CML2PhantomConstructionMessenger (void)
 
void SetNewValue (G4UIcommand *cmd, G4String newValue)
 
void SetReferenceWorld (G4bool bOV)
 
- 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 62 of file ML2PhantomConstructionMessenger.hh.

Constructor & Destructor Documentation

CML2PhantomConstructionMessenger::CML2PhantomConstructionMessenger ( CML2PhantomConstruction phantomConstructor)

Definition at line 53 of file ML2PhantomConstructionMessenger.cc.

53  : pPhantomConstructor (phantomConstructor)
54 {
55  PhantomName=new G4UIcmdWithAString("/phantom/PhantomName",this);
56  PhantomName->SetDefaultValue("fullWater");
57  PhantomName->SetGuidance("phantom name to select among those implemented fullWater, boxInBox, Dicom1");
58  pPhantomConstructor->setPhantomName("fullWater");
59 
60  PhantomFileName =new G4UIcmdWithAString("/phantom/PhantomFileName",this);
61  PhantomFileName ->SetDefaultValue("");
62  PhantomFileName->SetGuidance("full path and macro file name containing specific setup data for the phantom chosen");
63  pPhantomConstructor->setPhantomFileName ("");
64 
65  phantomCentre=new G4UIcmdWith3VectorAndUnit("/phantom/centre", this);
66  phantomCentre->SetDefaultUnit("mm");
67  phantomCentre->SetGuidance("phantom centre coordinates in the world [mm]");
68  phantomCentre->SetDefaultValue(G4ThreeVector(0.,0.,0.));
69 }
CLHEP::Hep3Vector G4ThreeVector
void SetDefaultUnit(const char *defUnit)
void setPhantomFileName(G4String val)
void SetGuidance(const char *aGuidance)
Definition: G4UIcommand.hh:161
void SetDefaultValue(G4ThreeVector defVal)
void SetDefaultValue(const char *defVal)
void setPhantomName(G4String val)

Here is the call graph for this function:

CML2PhantomConstructionMessenger::~CML2PhantomConstructionMessenger ( void  )

Definition at line 71 of file ML2PhantomConstructionMessenger.cc.

72 {
73  delete PhantomName;
74  delete phantomCentre;
75 }

Member Function Documentation

void CML2PhantomConstructionMessenger::SetNewValue ( G4UIcommand cmd,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 76 of file ML2PhantomConstructionMessenger.cc.

77 {
78  if (cmd==PhantomName)
79  {pPhantomConstructor->setPhantomName(newValue);}
80 
81  if (cmd==PhantomFileName )
82  {pPhantomConstructor->setPhantomFileName (newValue);}
83 
84  if (cmd==phantomCentre )
85  {
86  if (bOnlyVisio)
87  {
88  pPhantomConstructor->applyNewCentre(phantomCentre->GetNew3VectorRawValue(newValue));
89 // what follows seems to be necessary to have a good refresh
91  G4String command;
92  command = "/run/beamOn 0";
93  UI->ApplyCommand(command);
94  command = "/vis/viewer/flush";
95  UI->ApplyCommand(command);
96  }
97  else
98  {
99  pPhantomConstructor->addNewCentre(phantomCentre->GetNew3VectorRawValue(newValue));
100  }
101  }
102 }
void setPhantomFileName(G4String val)
void addNewCentre(G4ThreeVector val)
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:59
void setPhantomName(G4String val)
static G4ThreeVector GetNew3VectorRawValue(const char *paramString)
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:447
void applyNewCentre(G4ThreeVector val)

Here is the call graph for this function:

void CML2PhantomConstructionMessenger::SetReferenceWorld ( G4bool  bOV)
inline

Definition at line 68 of file ML2PhantomConstructionMessenger.hh.

68 {bOnlyVisio=bOV;}

Here is the caller graph for this function:


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