]> git.uio.no Git - u/mrichter/AliRoot.git/blame - AliGeant4/AliEventAction.h
Rewriting and cleaning up
[u/mrichter/AliRoot.git] / AliGeant4 / AliEventAction.h
CommitLineData
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 18class G4Timer;
19 // in order to avoid the odd dependency for the
20 // times system function this declaration must be the first
676fb573 21class G4Event;
22
23class 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
62inline void AliEventAction::SetVerboseLevel(G4int level)
63{ fVerboseLevel = level; }
64
65inline void AliEventAction::SetDrawFlag(G4String drawFlag)
66{ fDrawFlag = drawFlag; }
67
68inline G4int AliEventAction::GetVerboseLevel() const
69{ return fVerboseLevel; }
70
71inline G4String AliEventAction::GetDrawFlag() const
72{ return fDrawFlag; }
73
74#endif //ALI_EVENT_ACTION_H
75
76