]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/AliStackingActionMessenger.cxx
attributes fAllLVSensitive, fForceAllLVSensitive and their setters removed; comment...
[u/mrichter/AliRoot.git] / AliGeant4 / AliStackingActionMessenger.cxx
1 // $Id$
2 // Category: event
3 //
4 // See the class description in the header file.
5
6 #include "AliStackingActionMessenger.h"
7 #include "AliStackingAction.h"
8 #include "AliGlobals.h"
9
10 #include <G4UIdirectory.hh>
11 #include <G4UIcmdWithAnInteger.hh>
12 #include <G4UIcmdWithoutParameter.hh>
13
14 //_____________________________________________________________________________
15 AliStackingActionMessenger::AliStackingActionMessenger(
16                               AliStackingAction* stackingAction)
17   :fStackingAction(stackingAction)
18 {
19 // 
20   fStackingDirectory = new G4UIdirectory("/aliStacking/");
21   fStackingDirectory->SetGuidance("AliStackingAction control commands.");
22
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);
29 }
30
31 //_____________________________________________________________________________
32 AliStackingActionMessenger::AliStackingActionMessenger() {
33 //
34 }
35
36 //_____________________________________________________________________________
37 AliStackingActionMessenger::AliStackingActionMessenger(
38                                  const AliStackingActionMessenger& right) {
39 //                               
40   AliGlobals::Exception("AliStackingActionMessenger is protected from copying.");
41 }
42
43 //_____________________________________________________________________________
44 AliStackingActionMessenger::~AliStackingActionMessenger() {
45 //
46   delete fStackingDirectory;
47   delete fVerboseCmd;
48 }
49
50 // operators
51
52 //_____________________________________________________________________________
53 AliStackingActionMessenger& 
54 AliStackingActionMessenger::operator=(const AliStackingActionMessenger &right)
55 {
56   // check assignement to self
57   if (this == &right) return *this;
58   
59   AliGlobals::Exception(
60     "AliStackingActionMessenger is protected from assigning.");
61
62   return *this;
63 }
64
65 // public methods
66
67 //_____________________________________________________________________________
68 void AliStackingActionMessenger::SetNewValue(G4UIcommand* command, 
69        G4String newValue)
70
71 // Applies command to the associated object.
72 // ---
73
74   if (command == fVerboseCmd) { 
75     fStackingAction
76       ->SetVerboseLevel(fVerboseCmd->GetNewIntValue(newValue)); 
77   }  
78 }