]> git.uio.no Git - u/mrichter/AliRoot.git/blame - AliGeant4/AliSteppingActionMessenger.cxx
Updated class description: added class title, author;
[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
78ca1e9c 12//_____________________________________________________________________________
676fb573 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);
41e0e5cc 25
26 fMaxNofStepsCmd = new G4UIcmdWithAnInteger("/aliTracking/maxNofSteps", this);
27 fMaxNofStepsCmd
28 ->SetGuidance("Set tracking verbose level for detected looping tracks.");
29 fMaxNofStepsCmd->SetParameterName("MaxNofSteps", false);
30 fMaxNofStepsCmd->SetRange("MaxNofSteps >= 0");
31 fMaxNofStepsCmd->AvailableForStates(Idle);
676fb573 32}
33
78ca1e9c 34//_____________________________________________________________________________
676fb573 35AliSteppingActionMessenger::AliSteppingActionMessenger() {
36//
37}
38
78ca1e9c 39//_____________________________________________________________________________
676fb573 40AliSteppingActionMessenger::AliSteppingActionMessenger(
41 const AliSteppingActionMessenger& right) {
42//
43 AliGlobals::Exception(
44 "AliSteppingActionMessenger is protected from copying.");
45}
46
78ca1e9c 47//_____________________________________________________________________________
676fb573 48AliSteppingActionMessenger::~AliSteppingActionMessenger() {
49//
50 delete fLoopVerboseCmd;
41e0e5cc 51 delete fMaxNofStepsCmd;
676fb573 52}
53
54// operators
55
78ca1e9c 56//_____________________________________________________________________________
676fb573 57AliSteppingActionMessenger&
58AliSteppingActionMessenger::operator=(const AliSteppingActionMessenger &right)
59{
60 // check assignement to self
61 if (this == &right) return *this;
62
63 AliGlobals::Exception(
64 "AliSteppingActionMessenger is protected from assigning.");
65
66 return *this;
67}
68
69// public methods
70
78ca1e9c 71//_____________________________________________________________________________
676fb573 72void AliSteppingActionMessenger::SetNewValue(G4UIcommand* command,
73 G4String newValue)
74{
75// Applies command to the associated object.
76// ---
77
78 if(command == fLoopVerboseCmd) {
79 fSteppingAction
80 ->SetLoopVerboseLevel(fLoopVerboseCmd->GetNewIntValue(newValue));
81 }
41e0e5cc 82 else if(command == fMaxNofStepsCmd) {
83 fSteppingAction
84 ->SetMaxNofSteps(fMaxNofStepsCmd->GetNewIntValue(newValue));
85 }
676fb573 86}