New Cluster finding macro. Used by new AliITStest.C macro.
[u/mrichter/AliRoot.git] / AliGeant4 / AliSteppingActionMessenger.cxx
CommitLineData
676fb573 1// $Id$
2// Category: event
3//
4// See the class description in the header file.
5
6#include "AliSteppingActionMessenger.h"
7#include "AliSteppingAction.h"
8#include "AliGlobals.h"
9
10#include <G4UIdirectory.hh>
11#include <G4UIcmdWithAnInteger.hh>
12
13AliSteppingActionMessenger::AliSteppingActionMessenger(
14 AliSteppingAction* trackingAction)
15 :fSteppingAction(trackingAction)
16{
17//
18 fLoopVerboseCmd = new G4UIcmdWithAnInteger("/aliTracking/loopVerbose", this);
19 fLoopVerboseCmd
20 ->SetGuidance("Set tracking verbose level for detected looping tracks.");
21 fLoopVerboseCmd->SetParameterName("LoopVerboseLevel", true);
22 fLoopVerboseCmd->SetDefaultValue(1);
23 fLoopVerboseCmd->SetRange("LoopVerboseLevel >= 0 && LoopVerboseLevel <= 5");
24 fLoopVerboseCmd->AvailableForStates(Idle);
25}
26
27AliSteppingActionMessenger::AliSteppingActionMessenger() {
28//
29}
30
31AliSteppingActionMessenger::AliSteppingActionMessenger(
32 const AliSteppingActionMessenger& right) {
33//
34 AliGlobals::Exception(
35 "AliSteppingActionMessenger is protected from copying.");
36}
37
38AliSteppingActionMessenger::~AliSteppingActionMessenger() {
39//
40 delete fLoopVerboseCmd;
41}
42
43// operators
44
45AliSteppingActionMessenger&
46AliSteppingActionMessenger::operator=(const AliSteppingActionMessenger &right)
47{
48 // check assignement to self
49 if (this == &right) return *this;
50
51 AliGlobals::Exception(
52 "AliSteppingActionMessenger is protected from assigning.");
53
54 return *this;
55}
56
57// public methods
58
59void AliSteppingActionMessenger::SetNewValue(G4UIcommand* command,
60 G4String newValue)
61{
62// Applies command to the associated object.
63// ---
64
65 if(command == fLoopVerboseCmd) {
66 fSteppingAction
67 ->SetLoopVerboseLevel(fLoopVerboseCmd->GetNewIntValue(newValue));
68 }
69}