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