]> git.uio.no Git - u/mrichter/AliRoot.git/blame - AliGeant4/AliStackingActionMessenger.cxx
Updated class description: added class title, author;
[u/mrichter/AliRoot.git] / AliGeant4 / AliStackingActionMessenger.cxx
CommitLineData
676fb573 1// $Id$
2// Category: event
3//
7005154f 4// Author: I. Hrivnacova
5//
6// Class AliStackingActionMessenger
7// --------------------------------
676fb573 8// See the class description in the header file.
9
10#include "AliStackingActionMessenger.h"
11#include "AliStackingAction.h"
12#include "AliGlobals.h"
13
14#include <G4UIdirectory.hh>
15#include <G4UIcmdWithAnInteger.hh>
16#include <G4UIcmdWithoutParameter.hh>
17
78ca1e9c 18//_____________________________________________________________________________
676fb573 19AliStackingActionMessenger::AliStackingActionMessenger(
20 AliStackingAction* stackingAction)
21 :fStackingAction(stackingAction)
22{
23//
24 fStackingDirectory = new G4UIdirectory("/aliStacking/");
25 fStackingDirectory->SetGuidance("AliStackingAction control commands.");
26
676fb573 27 fVerboseCmd = new G4UIcmdWithAnInteger("/aliStacking/verbose", this);
28 fVerboseCmd->SetGuidance("Set verbose level for AliStackingAction");
29 fVerboseCmd->SetParameterName("VerboseLevel", true);
30 fVerboseCmd->SetDefaultValue(0);
31 fVerboseCmd->SetRange("VerboseLevel >= 0 && VerboseLevel <= 1");
32 fVerboseCmd->AvailableForStates(Idle);
33}
34
78ca1e9c 35//_____________________________________________________________________________
676fb573 36AliStackingActionMessenger::AliStackingActionMessenger() {
37//
38}
39
78ca1e9c 40//_____________________________________________________________________________
676fb573 41AliStackingActionMessenger::AliStackingActionMessenger(
42 const AliStackingActionMessenger& right) {
43//
44 AliGlobals::Exception("AliStackingActionMessenger is protected from copying.");
45}
46
78ca1e9c 47//_____________________________________________________________________________
676fb573 48AliStackingActionMessenger::~AliStackingActionMessenger() {
49//
50 delete fStackingDirectory;
676fb573 51 delete fVerboseCmd;
52}
53
54// operators
55
78ca1e9c 56//_____________________________________________________________________________
676fb573 57AliStackingActionMessenger&
58AliStackingActionMessenger::operator=(const AliStackingActionMessenger &right)
59{
60 // check assignement to self
61 if (this == &right) return *this;
62
63 AliGlobals::Exception(
64 "AliStackingActionMessenger is protected from assigning.");
65
66 return *this;
67}
68
69// public methods
70
78ca1e9c 71//_____________________________________________________________________________
676fb573 72void AliStackingActionMessenger::SetNewValue(G4UIcommand* command,
73 G4String newValue)
74{
75// Applies command to the associated object.
76// ---
77
4b47d52f 78 if (command == fVerboseCmd) {
676fb573 79 fStackingAction
80 ->SetVerboseLevel(fVerboseCmd->GetNewIntValue(newValue));
81 }
82}