4 // See the class description in the header file.
6 #include "AliRunActionMessenger.h"
7 #include "AliRunAction.h"
8 #include "AliGlobals.h"
10 #include <G4UIdirectory.hh>
11 #include <G4UIcmdWithAnInteger.hh>
12 #include <G4UIcmdWithoutParameter.hh>
14 AliRunActionMessenger::AliRunActionMessenger(AliRunAction* runAction)
15 : fRunAction(runAction)
18 fRunActionDirectory = new G4UIdirectory("/aliRunAction/");
19 fRunActionDirectory->SetGuidance("AliRunAction control commands.");
21 fVerboseCmd = new G4UIcmdWithAnInteger("/aliRunAction/verbose", this);
22 fVerboseCmd->SetGuidance("Set verbose level for AliRunAction");
23 fVerboseCmd->SetParameterName("VerboseLevel", true);
24 fVerboseCmd->SetDefaultValue(0);
25 fVerboseCmd->SetRange("VerboseLevel >= 0 && VerboseLevel <= 2");
26 fVerboseCmd->AvailableForStates(PreInit, Init, Idle, GeomClosed, EventProc);
29 AliRunActionMessenger::AliRunActionMessenger() {
33 AliRunActionMessenger::AliRunActionMessenger(const AliRunActionMessenger& right)
36 AliGlobals::Exception("AliRunActionMessenger is protected from copying.");
39 AliRunActionMessenger::~AliRunActionMessenger() {
41 delete fRunActionDirectory;
47 AliRunActionMessenger&
48 AliRunActionMessenger::operator=(const AliRunActionMessenger &right)
50 // check assignement to self
51 if (this == &right) return *this;
53 AliGlobals::Exception("AliRunActionMessenger is protected from assigning.");
60 void AliRunActionMessenger::SetNewValue(G4UIcommand* command,
63 // Applies command to the associated object.
66 if(command == fVerboseCmd) {
68 ->SetVerboseLevel(fVerboseCmd->GetNewIntValue(newValue));