4 // Author: I. Hrivnacova
6 // Class AliRunActionMessenger
7 // ---------------------------
8 // See the class description in the header file.
10 #include "AliRunActionMessenger.h"
11 #include "AliRunAction.h"
12 #include "AliGlobals.h"
14 #include <G4UIdirectory.hh>
15 #include <G4UIcmdWithAnInteger.hh>
17 //_____________________________________________________________________________
18 AliRunActionMessenger::AliRunActionMessenger(AliRunAction* runAction)
19 : fRunAction(runAction)
22 fRunActionDirectory = new G4UIdirectory("/aliRunAction/");
23 fRunActionDirectory->SetGuidance("AliRunAction control commands.");
25 fVerboseCmd = new G4UIcmdWithAnInteger("/aliRunAction/verbose", this);
26 fVerboseCmd->SetGuidance("Set verbose level for AliRunAction");
27 fVerboseCmd->SetParameterName("VerboseLevel", true);
28 fVerboseCmd->SetDefaultValue(0);
29 fVerboseCmd->SetRange("VerboseLevel >= 0 && VerboseLevel <= 2");
30 fVerboseCmd->AvailableForStates(PreInit, Init, Idle, GeomClosed, EventProc);
33 //_____________________________________________________________________________
34 AliRunActionMessenger::AliRunActionMessenger() {
38 //_____________________________________________________________________________
39 AliRunActionMessenger::AliRunActionMessenger(const AliRunActionMessenger& right)
42 AliGlobals::Exception("AliRunActionMessenger is protected from copying.");
45 //_____________________________________________________________________________
46 AliRunActionMessenger::~AliRunActionMessenger() {
48 delete fRunActionDirectory;
54 //_____________________________________________________________________________
55 AliRunActionMessenger&
56 AliRunActionMessenger::operator=(const AliRunActionMessenger &right)
58 // check assignement to self
59 if (this == &right) return *this;
61 AliGlobals::Exception("AliRunActionMessenger is protected from assigning.");
68 //_____________________________________________________________________________
69 void AliRunActionMessenger::SetNewValue(G4UIcommand* command,
72 // Applies command to the associated object.
75 if(command == fVerboseCmd) {
77 ->SetVerboseLevel(fVerboseCmd->GetNewIntValue(newValue));