]> git.uio.no Git - u/mrichter/AliRoot.git/blame - AliGeant4/AliSteppingActionMessenger.cxx
README updated (R.Barbera)
[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
676fb573 10#include <G4UIcmdWithAnInteger.hh>
11
12AliSteppingActionMessenger::AliSteppingActionMessenger(
13 AliSteppingAction* trackingAction)
14 :fSteppingAction(trackingAction)
15{
16//
17 fLoopVerboseCmd = new G4UIcmdWithAnInteger("/aliTracking/loopVerbose", this);
18 fLoopVerboseCmd
19 ->SetGuidance("Set tracking verbose level for detected looping tracks.");
20 fLoopVerboseCmd->SetParameterName("LoopVerboseLevel", true);
21 fLoopVerboseCmd->SetDefaultValue(1);
22 fLoopVerboseCmd->SetRange("LoopVerboseLevel >= 0 && LoopVerboseLevel <= 5");
23 fLoopVerboseCmd->AvailableForStates(Idle);
41e0e5cc 24
25 fMaxNofStepsCmd = new G4UIcmdWithAnInteger("/aliTracking/maxNofSteps", this);
26 fMaxNofStepsCmd
27 ->SetGuidance("Set tracking verbose level for detected looping tracks.");
28 fMaxNofStepsCmd->SetParameterName("MaxNofSteps", false);
29 fMaxNofStepsCmd->SetRange("MaxNofSteps >= 0");
30 fMaxNofStepsCmd->AvailableForStates(Idle);
676fb573 31}
32
33AliSteppingActionMessenger::AliSteppingActionMessenger() {
34//
35}
36
37AliSteppingActionMessenger::AliSteppingActionMessenger(
38 const AliSteppingActionMessenger& right) {
39//
40 AliGlobals::Exception(
41 "AliSteppingActionMessenger is protected from copying.");
42}
43
44AliSteppingActionMessenger::~AliSteppingActionMessenger() {
45//
46 delete fLoopVerboseCmd;
41e0e5cc 47 delete fMaxNofStepsCmd;
676fb573 48}
49
50// operators
51
52AliSteppingActionMessenger&
53AliSteppingActionMessenger::operator=(const AliSteppingActionMessenger &right)
54{
55 // check assignement to self
56 if (this == &right) return *this;
57
58 AliGlobals::Exception(
59 "AliSteppingActionMessenger is protected from assigning.");
60
61 return *this;
62}
63
64// public methods
65
66void AliSteppingActionMessenger::SetNewValue(G4UIcommand* command,
67 G4String newValue)
68{
69// Applies command to the associated object.
70// ---
71
72 if(command == fLoopVerboseCmd) {
73 fSteppingAction
74 ->SetLoopVerboseLevel(fLoopVerboseCmd->GetNewIntValue(newValue));
75 }
41e0e5cc 76 else if(command == fMaxNofStepsCmd) {
77 fSteppingAction
78 ->SetMaxNofSteps(fMaxNofStepsCmd->GetNewIntValue(newValue));
79 }
676fb573 80}