]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/Alieve/EventAlieve.h
Invert the modality of run-loader and esd loading: always try to open them and compla...
[u/mrichter/AliRoot.git] / EVE / Alieve / EventAlieve.h
CommitLineData
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
10class AliRunLoader;
11class AliESD;
3aecaefc 12class AliESDfriend;
5a5a1232 13
93845f6c 14class AliMagF;
15
5a5a1232 16class TFile;
17class TTree;
632d2b03 18class TGeoManager;
5a5a1232 19
20namespace Alieve {
21
6f0b0040 22class Event : public Reve::EventBase
5a5a1232 23{
24private:
265ecb21 25 Event(const Event&); // Not implemented
26 Event& operator=(const Event&); // Not implemented
5a5a1232 27
28protected:
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 48public:
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
86extern Event* gEvent;
87
88}
89
90#endif