]> git.uio.no Git - u/mrichter/AliRoot.git/blob - AliGeant4/AliRunAction.h
Updated class description: added class title, author;
[u/mrichter/AliRoot.git] / AliGeant4 / AliRunAction.h
1 // $Id$
2 // Category: run
3 //
4 // Author: I. Hrivnacova
5 //
6 // Class AliRunAction
7 // ------------------
8 // Class that defines actions at the beginning and the end of run.
9
10 #ifndef ALI_RUN_ACTION_H
11 #define ALI_RUN_ACTION_H
12
13 #include "AliRunActionMessenger.h"
14
15 #include <G4UserRunAction.hh>
16 #include <globals.hh>
17
18 class G4Timer;
19     // in order to avoid the odd dependency for the
20     // times system function this declaration must be the first
21
22 class AliSDConstruction;
23 class G4Run;
24
25 class AliRunAction : public G4UserRunAction
26 {
27   public:
28     AliRunAction();
29     // --> protected
30     // AliRunAction(const AliRunAction& right);
31     virtual ~AliRunAction();
32
33     // methods
34     virtual void BeginOfRunAction(const G4Run* run);
35     virtual void EndOfRunAction(const G4Run* run);
36
37     // set methods
38     void SetVerboseLevel(G4int level);
39
40     // get methods
41     G4int GetVerboseLevel() const;
42
43   protected:
44     AliRunAction(const AliRunAction& right);
45
46     // operators
47     AliRunAction& operator=(const AliRunAction& right);
48
49   private:
50     // methods
51     AliSDConstruction* GetSDConstruction() const;
52
53     // data members
54     AliRunActionMessenger  fMessenger;    //messenger 
55     G4Timer*               fTimer;        //G4Timer
56     G4int                  fRunID;        //run ID
57     G4int                  fVerboseLevel; //verbose level
58 };
59
60 // inline methods
61
62 inline void AliRunAction::SetVerboseLevel(G4int level)
63 { fVerboseLevel = level; }
64
65 inline G4int AliRunAction::GetVerboseLevel() const
66 { return fVerboseLevel; }
67
68 #endif //ALI_RUN_ACTION_H
69