]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - AliGeant4/AliEventActionMessenger.cxx
iostream.h included for gcc 3.1
[u/mrichter/AliRoot.git] / AliGeant4 / AliEventActionMessenger.cxx
... / ...
CommitLineData
1// $Id$
2// Category: event
3//
4// Author: I. Hrivnacova
5//
6// Class AliEventActionMessenger
7// -----------------------------
8// See the class description in the header file.
9
10#include "AliEventActionMessenger.h"
11#include "AliEventAction.h"
12#include "AliGlobals.h"
13
14#include <G4UIdirectory.hh>
15#include <G4UIcmdWithAString.hh>
16#include <G4UIcmdWithAnInteger.hh>
17
18//_____________________________________________________________________________
19AliEventActionMessenger::AliEventActionMessenger(AliEventAction* eventAction)
20 :fEventAction(eventAction)
21{
22//
23 fEventDirectory = new G4UIdirectory("/aliEvent/");
24 fEventDirectory->SetGuidance("AliEventAction control commands.");
25
26 fDrawTracksCmd = new G4UIcmdWithAString("/aliEvent/drawTracks", this);
27 fDrawTracksCmd->SetGuidance("Draw the tracks in the event");
28 fDrawTracksCmd->SetGuidance(" Choice : NONE, CHARGED(default), ALL");
29 fDrawTracksCmd->SetParameterName("Choice", true);
30 fDrawTracksCmd->SetDefaultValue("CHARGED");
31 fDrawTracksCmd->SetCandidates("NONE CHARGED ALL");
32 fDrawTracksCmd->AvailableForStates(Idle);
33}
34
35//_____________________________________________________________________________
36AliEventActionMessenger::AliEventActionMessenger(){
37//
38}
39
40//_____________________________________________________________________________
41AliEventActionMessenger::AliEventActionMessenger(
42 const AliEventActionMessenger& right) {
43//
44 AliGlobals::Exception("AliEventActionMessenger is protected from copying.");
45}
46
47//_____________________________________________________________________________
48AliEventActionMessenger::~AliEventActionMessenger() {
49//
50 delete fEventDirectory;
51 delete fDrawTracksCmd;
52}
53
54// operators
55
56//_____________________________________________________________________________
57AliEventActionMessenger&
58AliEventActionMessenger::operator=(const AliEventActionMessenger &right)
59{
60 // check assignement to self
61 if (this == &right) return *this;
62
63 AliGlobals::Exception("AliEventActionMessenger is protected from assigning.");
64
65 return *this;
66}
67
68// public methods
69
70//_____________________________________________________________________________
71void AliEventActionMessenger::SetNewValue(G4UIcommand* command,
72 G4String newValue)
73{
74// Applies command to the associated object.
75// ---
76
77 if(command == fDrawTracksCmd)
78 {
79 fEventAction->SetDrawFlag(newValue);
80 }
81}