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>
13 AliRunActionMessenger::AliRunActionMessenger(AliRunAction* runAction)
14 : fRunAction(runAction)
17 fRunActionDirectory = new G4UIdirectory("/aliRunAction/");
18 fRunActionDirectory->SetGuidance("AliRunAction control commands.");
20 fVerboseCmd = new G4UIcmdWithAnInteger("/aliRunAction/verbose", this);
21 fVerboseCmd->SetGuidance("Set verbose level for AliRunAction");
22 fVerboseCmd->SetParameterName("VerboseLevel", true);
23 fVerboseCmd->SetDefaultValue(0);
24 fVerboseCmd->SetRange("VerboseLevel >= 0 && VerboseLevel <= 2");
25 fVerboseCmd->AvailableForStates(PreInit, Init, Idle, GeomClosed, EventProc);
28 AliRunActionMessenger::AliRunActionMessenger() {
32 AliRunActionMessenger::AliRunActionMessenger(const AliRunActionMessenger& right)
35 AliGlobals::Exception("AliRunActionMessenger is protected from copying.");
38 AliRunActionMessenger::~AliRunActionMessenger() {
40 delete fRunActionDirectory;
46 AliRunActionMessenger&
47 AliRunActionMessenger::operator=(const AliRunActionMessenger &right)
49 // check assignement to self
50 if (this == &right) return *this;
52 AliGlobals::Exception("AliRunActionMessenger is protected from assigning.");
59 void AliRunActionMessenger::SetNewValue(G4UIcommand* command,
62 // Applies command to the associated object.
65 if(command == fVerboseCmd) {
67 ->SetVerboseLevel(fVerboseCmd->GetNewIntValue(newValue));