83 G4String dir(
"/process/em/dna/chem/gun/");
88 tmp +=
"/moleculeModel";
107 if (fpGunMoleculeModel)
delete fpGunMoleculeModel;
108 if (fpGunPosition)
delete fpGunPosition;
109 if (fpGunTime)
delete fpGunTime;
110 if (fpGunN)
delete fpGunN;
117 if (command == fpGunMoleculeModel)
119 fMoleculeName = newValue;
121 else if (command == fpGunPosition)
123 fPosition = fpGunPosition->GetNew3VectorValue(newValue);
125 else if (command == fpGunTime)
127 fTime = fpGunTime->GetNewDoubleValue(newValue);
129 else if (command == fpGunN)
131 fNumber = fpGunN->GetNewIntValue(newValue);
138 if (command == fpGunMoleculeModel)
140 return fMoleculeName;
142 else if (command == fpGunPosition)
144 return fpGunPosition->ConvertToStringWithBestUnit(fPosition);
146 else if (command == fpGunTime)
148 return fpGunTime->ConvertToStringWithBestUnit(fTime);
150 else if (command == fpGunN)
152 return fpGunN->ConvertToString(fNumber);
167 gun->
AddNMolecules(fNumber, fMoleculeName, fPosition, fTime);
virtual ~G4MoleculeGunMessenger()
virtual G4String GetCurrentValue(G4UIcommand *command)
void DefineTracks(G4MoleculeGun *)
virtual void SetNewValue(G4UIcommand *command, G4String newValue)
MultipleGun * CreateNewType(const G4String &name)
G4UIdirectory * fpGunType
virtual void SetNewValue(G4UIcommand *command, G4String newValue)
virtual G4String GetCurrentValue(G4UIcommand *command)
MultipleGun(const G4String &name, G4MoleculeGunMessenger *)
void DefineTracks(G4MoleculeGun *)
G4UIcmdWith3VectorAndUnit * fpGunPosition
void AddNMolecules(size_t n, const G4String &name, const G4ThreeVector &position, double time=0)
std::vector< MultipleGun * > fMultipleGun
G4UIcmdWithAString * fpGunNewGunType
G4UIcmdWithAString * fpGunMoleculeModel
G4UIcmdWithAnInteger * fpGunN
G4UIcmdWithADoubleAndUnit * fpGunTime