4 // See the class description in the header file.
6 #include "AliStackingActionMessenger.h"
7 #include "AliStackingAction.h"
8 #include "AliGlobals.h"
10 #include <G4UIdirectory.hh>
11 #include <G4UIcmdWithAnInteger.hh>
12 #include <G4UIcmdWithoutParameter.hh>
14 AliStackingActionMessenger::AliStackingActionMessenger(
15 AliStackingAction* stackingAction)
16 :fStackingAction(stackingAction)
19 fStackingDirectory = new G4UIdirectory("/aliStacking/");
20 fStackingDirectory->SetGuidance("AliStackingAction control commands.");
22 fVerboseCmd = new G4UIcmdWithAnInteger("/aliStacking/verbose", this);
23 fVerboseCmd->SetGuidance("Set verbose level for AliStackingAction");
24 fVerboseCmd->SetParameterName("VerboseLevel", true);
25 fVerboseCmd->SetDefaultValue(0);
26 fVerboseCmd->SetRange("VerboseLevel >= 0 && VerboseLevel <= 1");
27 fVerboseCmd->AvailableForStates(Idle);
30 AliStackingActionMessenger::AliStackingActionMessenger() {
34 AliStackingActionMessenger::AliStackingActionMessenger(
35 const AliStackingActionMessenger& right) {
37 AliGlobals::Exception("AliStackingActionMessenger is protected from copying.");
40 AliStackingActionMessenger::~AliStackingActionMessenger() {
42 delete fStackingDirectory;
48 AliStackingActionMessenger&
49 AliStackingActionMessenger::operator=(const AliStackingActionMessenger &right)
51 // check assignement to self
52 if (this == &right) return *this;
54 AliGlobals::Exception(
55 "AliStackingActionMessenger is protected from assigning.");
62 void AliStackingActionMessenger::SetNewValue(G4UIcommand* command,
65 // Applies command to the associated object.
68 if (command == fVerboseCmd) {
70 ->SetVerboseLevel(fVerboseCmd->GetNewIntValue(newValue));