]>
Commit | Line | Data |
---|---|---|
5a5a1232 | 1 | // $Header$ |
2 | ||
3 | #ifndef ALIEVE_Event_H | |
4 | #define ALIEVE_Event_H | |
5 | ||
7ca4655f | 6 | #include <TList.h> |
7 | ||
6f0b0040 | 8 | #include <Reve/EventBase.h> |
5a5a1232 | 9 | |
10 | class AliRunLoader; | |
11 | class AliESD; | |
3aecaefc | 12 | class AliESDfriend; |
5a5a1232 | 13 | |
93845f6c | 14 | class AliMagF; |
15 | ||
5a5a1232 | 16 | class TFile; |
17 | class TTree; | |
632d2b03 | 18 | class TGeoManager; |
5a5a1232 | 19 | |
20 | namespace Alieve { | |
21 | ||
6f0b0040 | 22 | class Event : public Reve::EventBase |
5a5a1232 | 23 | { |
24 | private: | |
265ecb21 | 25 | Event(const Event&); // Not implemented |
26 | Event& operator=(const Event&); // Not implemented | |
5a5a1232 | 27 | |
28 | protected: | |
29 | TString fPath; | |
30 | Int_t fEventId; | |
31 | ||
32 | AliRunLoader* fRunLoader; | |
33 | ||
34 | TFile* fESDFile; | |
35 | TTree* fESDTree; | |
36 | AliESD* fESD; | |
3aecaefc | 37 | AliESDfriend* fESDfriend; |
2cea771a | 38 | Bool_t fESDfriendExists; |
5a5a1232 | 39 | |
90fa773e | 40 | TList fNewEventCommands; |
41 | ||
632d2b03 | 42 | static TString fgCdbUri; |
a1896a82 | 43 | static Bool_t fgAssertRunLoader; |
44 | static Bool_t fgAssertESDTree; | |
632d2b03 | 45 | |
93845f6c | 46 | static AliMagF* fgMagField; |
47 | ||
5a5a1232 | 48 | public: |
632d2b03 | 49 | static void SetCdbUri(const Text_t* cdb) { if (cdb) fgCdbUri = cdb; } |
a1896a82 | 50 | static void SetAssertElements(Bool_t assertRunloader, Bool_t assertEsd) |
51 | { fgAssertRunLoader = assertRunloader; fgAssertESDTree = assertEsd; } | |
632d2b03 | 52 | |
5a5a1232 | 53 | Event(); |
54 | Event(TString path, Int_t ev=0); | |
55 | ||
56 | void Open(); | |
1eaa5849 | 57 | void GotoEvent(Int_t event); |
58 | void NextEvent() { GotoEvent(fEventId + 1); } | |
59 | void PrevEvent() { GotoEvent(fEventId - 1); } | |
5a5a1232 | 60 | void Close(); |
61 | ||
90fa773e | 62 | virtual void AfterNewEventLoaded(); |
63 | ||
64 | TList& GetNewEventCommands() { return fNewEventCommands; } | |
65 | void AddNewEventCommand(const Text_t* cmd); | |
66 | ||
5a5a1232 | 67 | Int_t GetEventId() const { return fEventId; } |
68 | AliRunLoader* GetRunLoader() const { return fRunLoader; } | |
69 | TTree* GetESDTree() const { return fESDTree; } | |
70 | AliESD* GetESD() const { return fESD; } | |
2cea771a | 71 | AliESDfriend* GetESDfriend() const { return fESDfriend; } |
72 | Bool_t GetESDfriendExists() const { return fESDfriendExists; } | |
73 | virtual const Text_t* GetTitle() const { return fPath.Data(); } | |
5a5a1232 | 74 | |
75 | static AliRunLoader* AssertRunLoader(); | |
76 | static AliESD* AssertESD(); | |
3aecaefc | 77 | static AliESDfriend* AssertESDfriend(); |
5a5a1232 | 78 | |
93845f6c | 79 | static AliMagF* AssertMagField(); |
80 | ||
632d2b03 | 81 | static TGeoManager* AssertGeometry(); |
82 | ||
5a5a1232 | 83 | ClassDef(Event, 1); |
84 | }; // endclass Event | |
85 | ||
86 | extern Event* gEvent; | |
87 | ||
88 | } | |
89 | ||
90 | #endif |