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