2023-02-13 14:50:36 +08:00
|
|
|
#include "GeneRunActionMessenger.hh"
|
|
|
|
|
2023-04-09 22:30:59 +08:00
|
|
|
#include "G4UIcmdWithAString.hh"
|
|
|
|
#include "G4UIdirectory.hh"
|
2023-02-13 14:50:36 +08:00
|
|
|
#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);
|
|
|
|
}
|
|
|
|
}
|