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 //_____________________________________________________________________________
15 AliStackingActionMessenger::AliStackingActionMessenger(
16 AliStackingAction* stackingAction)
17 :fStackingAction(stackingAction)
20 fStackingDirectory = new G4UIdirectory("/aliStacking/");
21 fStackingDirectory->SetGuidance("AliStackingAction control commands.");
23 fVerboseCmd = new G4UIcmdWithAnInteger("/aliStacking/verbose", this);
24 fVerboseCmd->SetGuidance("Set verbose level for AliStackingAction");
25 fVerboseCmd->SetParameterName("VerboseLevel", true);
26 fVerboseCmd->SetDefaultValue(0);
27 fVerboseCmd->SetRange("VerboseLevel >= 0 && VerboseLevel <= 1");
28 fVerboseCmd->AvailableForStates(Idle);
31 //_____________________________________________________________________________
32 AliStackingActionMessenger::AliStackingActionMessenger() {
36 //_____________________________________________________________________________
37 AliStackingActionMessenger::AliStackingActionMessenger(
38 const AliStackingActionMessenger& right) {
40 AliGlobals::Exception("AliStackingActionMessenger is protected from copying.");
43 //_____________________________________________________________________________
44 AliStackingActionMessenger::~AliStackingActionMessenger() {
46 delete fStackingDirectory;
52 //_____________________________________________________________________________
53 AliStackingActionMessenger&
54 AliStackingActionMessenger::operator=(const AliStackingActionMessenger &right)
56 // check assignement to self
57 if (this == &right) return *this;
59 AliGlobals::Exception(
60 "AliStackingActionMessenger is protected from assigning.");
67 //_____________________________________________________________________________
68 void AliStackingActionMessenger::SetNewValue(G4UIcommand* command,
71 // Applies command to the associated object.
74 if (command == fVerboseCmd) {
76 ->SetVerboseLevel(fVerboseCmd->GetNewIntValue(newValue));