]>
Commit | Line | Data |
---|---|---|
676fb573 | 1 | // $Id$ |
2 | // Category: event | |
3 | // | |
7005154f | 4 | // Author: I. Hrivnacova |
5 | // | |
6 | // Class AliEventAction | |
7 | // -------------------- | |
676fb573 | 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 | ||
7005154f | 13 | #include "AliEventActionMessenger.h" |
14 | ||
676fb573 | 15 | #include <G4UserEventAction.hh> |
16 | #include <globals.hh> | |
17 | ||
ddfc4566 | 18 | class G4Timer; |
19 | // in order to avoid the odd dependency for the | |
20 | // times system function this declaration must be the first | |
676fb573 | 21 | class G4Event; |
22 | ||
23 | class AliEventAction : public G4UserEventAction | |
24 | { | |
25 | public: | |
26 | AliEventAction(); | |
27 | // --> protected | |
28 | // AliEventAction(const AliEventAction& right); | |
29 | virtual ~AliEventAction(); | |
30 | ||
31 | // methods | |
32 | virtual void BeginOfEventAction(const G4Event* event); | |
33 | virtual void EndOfEventAction(const G4Event* event); | |
34 | ||
35 | // set methods | |
36 | void SetVerboseLevel(G4int level); | |
37 | void SetDrawFlag(G4String drawFlag); | |
38 | ||
39 | // get methods | |
40 | G4int GetVerboseLevel() const; | |
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 | |
7005154f | 54 | AliEventActionMessenger fMessenger; //messenger |
ddfc4566 | 55 | G4Timer* fTimer; //G4Timer |
676fb573 | 56 | G4int fVerboseLevel; //verbose level |
57 | G4String fDrawFlag; //control drawing of the event | |
58 | }; | |
59 | ||
60 | // inline methods | |
61 | ||
62 | inline void AliEventAction::SetVerboseLevel(G4int level) | |
63 | { fVerboseLevel = level; } | |
64 | ||
65 | inline void AliEventAction::SetDrawFlag(G4String drawFlag) | |
66 | { fDrawFlag = drawFlag; } | |
67 | ||
68 | inline G4int AliEventAction::GetVerboseLevel() const | |
69 | { return fVerboseLevel; } | |
70 | ||
71 | inline G4String AliEventAction::GetDrawFlag() const | |
72 | { return fDrawFlag; } | |
73 | ||
74 | #endif //ALI_EVENT_ACTION_H | |
75 | ||
76 |