]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/AliEventAction.h
AliHBTReaderKineTree.cxx
[u/mrichter/AliRoot.git] / AliGeant4 / AliEventAction.h
1 // $Id$
2 // Category: event
3 //
4 // Author: I. Hrivnacova
5 //
6 // Class AliEventAction
7 // --------------------
8 // Class that defines actions at the beginning and the end of event.
9
10 #ifndef ALI_EVENT_ACTION_H
11 #define ALI_EVENT_ACTION_H 
12
13 #include "AliVerbose.h"
14 #include "AliEventActionMessenger.h"
15
16 #include <G4UserEventAction.hh>
17 #include <globals.hh>
18
19 class G4Timer;
20     // in order to avoid the odd dependency for the
21     // times system function this declaration must be the first
22 class G4Event;
23
24 class AliEventAction : public G4UserEventAction,
25                        public AliVerbose
26 {
27   public:
28     AliEventAction();
29     // --> protected
30     // AliEventAction(const AliEventAction& right);
31     virtual ~AliEventAction();
32     
33     // methods
34     virtual void BeginOfEventAction(const G4Event* event);
35     virtual void EndOfEventAction(const G4Event* event);
36     
37     // set methods
38     void SetDrawFlag(G4String drawFlag);
39     
40     // get methods
41     G4String GetDrawFlag() const;
42     
43   protected:
44     AliEventAction(const AliEventAction& right);
45
46     // operators
47     AliEventAction& operator=(const AliEventAction& right);
48
49   private:
50     // methods 
51     void DisplayEvent(const G4Event* event) const;
52   
53     // data members
54     AliEventActionMessenger   fMessenger;    //messenger
55     G4Timer*                  fTimer;        //G4Timer
56     G4String                  fDrawFlag;     //control drawing of the event
57 };
58
59 // inline methods
60
61 inline void AliEventAction::SetDrawFlag(G4String drawFlag)
62 { fDrawFlag = drawFlag; }
63
64 inline G4String AliEventAction::GetDrawFlag() const
65 { return fDrawFlag; }
66
67 #endif //ALI_EVENT_ACTION_H
68
69