27 lines
786 B
C++
27 lines
786 B
C++
#include "GeneRunActionMessenger.hh"
|
|
|
|
#include "G4UIcmdWithAString.hh"
|
|
#include "G4UIdirectory.hh"
|
|
#include "GeneRunAction.hh"
|
|
|
|
GeneRunActionMessenger::GeneRunActionMessenger(GeneRunAction* pRun) : pRunAction(pRun) {
|
|
RunDir = new G4UIdirectory("/Gene/Run/");
|
|
RunDir->SetGuidance("Commands to set RunNo");
|
|
|
|
RunNoCmd = new G4UIcmdWithAString("/Gene/Run/RunNo", this);
|
|
RunNoCmd->SetGuidance("Set RunNo of file");
|
|
RunNoCmd->SetParameterName("RunNo", false);
|
|
RunNoCmd->AvailableForStates(G4State_PreInit);
|
|
}
|
|
|
|
GeneRunActionMessenger::~GeneRunActionMessenger() {
|
|
delete RunNoCmd;
|
|
delete RunDir;
|
|
}
|
|
|
|
void GeneRunActionMessenger::SetNewValue(G4UIcommand* command, G4String newValue) {
|
|
if (command == RunNoCmd) {
|
|
pRunAction->SetRunNo(newValue);
|
|
}
|
|
}
|