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