]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/Alieve/EventAlieve.h
Added interface to load-time threshold/(auto)pedestal settings.
[u/mrichter/AliRoot.git] / EVE / Alieve / EventAlieve.h
1 // $Header$
2
3 #ifndef ALIEVE_Event_H
4 #define ALIEVE_Event_H
5
6 #include <Reve/EventBase.h>
7
8 class AliRunLoader;
9 class AliESD;
10 class AliESDfriend;
11
12 class TFile;
13 class TTree;
14
15 namespace Alieve {
16
17 class Event : public Reve::EventBase
18 {
19 private:
20   Event(const Event&);            // Not implemented
21   Event& operator=(const Event&); // Not implemented
22
23 protected:
24   TString       fPath;
25   Int_t         fEventId;
26
27   AliRunLoader* fRunLoader;
28
29   TFile*        fESDFile;
30   TTree*        fESDTree;
31   AliESD*       fESD;
32   AliESDfriend* fESDfriend;
33   Bool_t        fESDfriendExists;
34
35   TList         fNewEventCommands;
36
37   static Bool_t fgUseRunLoader;
38   static Bool_t fgUseESDTree;
39   static Bool_t fgAvoidExcOnOpen;
40
41 public:
42   static void Initialize(Bool_t use_runloader=kTRUE, Bool_t use_esd=kTRUE,
43                          Bool_t avoid_exc_on_open=kTRUE);
44
45   Event();
46   Event(TString path, Int_t ev=0);
47
48   void Open();
49   void GotoEvent(Int_t event);
50   void NextEvent() { GotoEvent(fEventId + 1); }
51   void PrevEvent() { GotoEvent(fEventId - 1); }
52   void Close();
53
54   virtual void  AfterNewEventLoaded();
55
56   TList& GetNewEventCommands() { return fNewEventCommands; }
57   void   AddNewEventCommand(const Text_t* cmd);
58
59   Int_t         GetEventId()   const { return fEventId; }
60   AliRunLoader* GetRunLoader() const { return fRunLoader; }
61   TTree*        GetESDTree()   const { return fESDTree; }
62   AliESD*       GetESD()       const { return fESD; }
63   AliESDfriend* GetESDfriend()       const { return fESDfriend; }
64   Bool_t        GetESDfriendExists() const { return fESDfriendExists; }
65   virtual const Text_t* GetTitle()   const { return fPath.Data(); }
66
67   static AliRunLoader* AssertRunLoader();
68   static AliESD*       AssertESD();
69   static AliESDfriend* AssertESDfriend();
70
71   ClassDef(Event, 1);
72 }; // endclass Event
73
74 extern Event* gEvent;
75
76 }
77
78 #endif