4 // Author: I. Hrivnacova
6 // Class AliSteppingActionMessenger
7 // --------------------------------
8 // See the class description in the header file.
10 #include "AliSteppingActionMessenger.h"
11 #include "AliSteppingAction.h"
12 #include "AliGlobals.h"
14 #include <G4UIcmdWithAnInteger.hh>
16 //_____________________________________________________________________________
17 AliSteppingActionMessenger::AliSteppingActionMessenger(
18 AliSteppingAction* trackingAction)
19 :fSteppingAction(trackingAction)
22 fLoopVerboseCmd = new G4UIcmdWithAnInteger("/aliTracking/loopVerbose", this);
24 ->SetGuidance("Set tracking verbose level for detected looping tracks.");
25 fLoopVerboseCmd->SetParameterName("LoopVerboseLevel", true);
26 fLoopVerboseCmd->SetDefaultValue(1);
27 fLoopVerboseCmd->SetRange("LoopVerboseLevel >= 0 && LoopVerboseLevel <= 5");
28 fLoopVerboseCmd->AvailableForStates(Idle);
30 fMaxNofStepsCmd = new G4UIcmdWithAnInteger("/aliTracking/maxNofSteps", this);
32 ->SetGuidance("Set maximum number of steps allowed.");
33 fMaxNofStepsCmd->SetParameterName("MaxNofSteps", false);
34 fMaxNofStepsCmd->SetRange("MaxNofSteps >= 0");
35 fMaxNofStepsCmd->AvailableForStates(Idle);
38 //_____________________________________________________________________________
39 AliSteppingActionMessenger::AliSteppingActionMessenger() {
43 //_____________________________________________________________________________
44 AliSteppingActionMessenger::AliSteppingActionMessenger(
45 const AliSteppingActionMessenger& right) {
47 AliGlobals::Exception(
48 "AliSteppingActionMessenger is protected from copying.");
51 //_____________________________________________________________________________
52 AliSteppingActionMessenger::~AliSteppingActionMessenger() {
54 delete fLoopVerboseCmd;
55 delete fMaxNofStepsCmd;
60 //_____________________________________________________________________________
61 AliSteppingActionMessenger&
62 AliSteppingActionMessenger::operator=(const AliSteppingActionMessenger &right)
64 // check assignement to self
65 if (this == &right) return *this;
67 AliGlobals::Exception(
68 "AliSteppingActionMessenger is protected from assigning.");
75 //_____________________________________________________________________________
76 void AliSteppingActionMessenger::SetNewValue(G4UIcommand* command,
79 // Applies command to the associated object.
82 if(command == fLoopVerboseCmd) {
84 ->SetLoopVerboseLevel(fLoopVerboseCmd->GetNewIntValue(newValue));
86 else if(command == fMaxNofStepsCmd) {
88 ->SetMaxNofSteps(fMaxNofStepsCmd->GetNewIntValue(newValue));