]>
Commit | Line | Data |
---|---|---|
d810d0de | 1 | // $Id$ |
2 | // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 | |
5a5a1232 | 3 | |
d810d0de | 4 | /************************************************************************** |
5 | * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. * | |
6 | * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * | |
51346b82 | 7 | * full copyright notice. * |
d810d0de | 8 | **************************************************************************/ |
9 | ||
a15e6d7d | 10 | #ifndef AliEveEventManaget_H |
11 | #define AliEveEventManager_H | |
5a5a1232 | 12 | |
84aff7a4 | 13 | #include <TEveEventManager.h> |
5a5a1232 | 14 | |
15 | class AliRunLoader; | |
af885e0f | 16 | class AliESDEvent; |
3aecaefc | 17 | class AliESDfriend; |
c2c4b7a2 | 18 | class AliRawReader; |
5a5a1232 | 19 | |
93845f6c | 20 | class AliMagF; |
21 | ||
5a5a1232 | 22 | class TFile; |
23 | class TTree; | |
632d2b03 | 24 | class TGeoManager; |
5a5a1232 | 25 | |
a15e6d7d | 26 | //============================================================================== |
27 | // | |
28 | // AliEveEventManager | |
29 | // | |
30 | // Interface to ALICE event-data (RunLoader, ESD), magnetic field and | |
31 | // geometry. | |
32 | // | |
33 | ||
5a5a1232 | 34 | |
d810d0de | 35 | class AliEveEventManager : public TEveEventManager |
5a5a1232 | 36 | { |
5a5a1232 | 37 | public: |
c2c4b7a2 | 38 | static void SetESDFileName(const Text_t* esd); |
39 | static void SetRawFileName(const Text_t* raw); | |
40 | static void SetCdbUri(const Text_t* cdb); | |
41 | static void SetAssertElements(Bool_t assertRunloader, Bool_t assertEsd, Bool_t assertRaw); | |
632d2b03 | 42 | |
d810d0de | 43 | AliEveEventManager(); |
44 | AliEveEventManager(TString path, Int_t ev=0); | |
a15e6d7d | 45 | virtual ~AliEveEventManager(); |
46 | ||
5a5a1232 | 47 | |
32e219c2 | 48 | virtual void Open(); |
49 | virtual void GotoEvent(Int_t event); | |
50 | virtual void NextEvent() { GotoEvent(fEventId + 1); } | |
51 | virtual void PrevEvent() { GotoEvent(fEventId - 1); } | |
52 | virtual void Close(); | |
90fa773e | 53 | |
5a5a1232 | 54 | Int_t GetEventId() const { return fEventId; } |
55 | AliRunLoader* GetRunLoader() const { return fRunLoader; } | |
56 | TTree* GetESDTree() const { return fESDTree; } | |
32e219c2 | 57 | AliESDEvent* GetESD() const { return fESD; } |
2cea771a | 58 | AliESDfriend* GetESDfriend() const { return fESDfriend; } |
59 | Bool_t GetESDfriendExists() const { return fESDfriendExists; } | |
60 | virtual const Text_t* GetTitle() const { return fPath.Data(); } | |
5a5a1232 | 61 | |
62 | static AliRunLoader* AssertRunLoader(); | |
32e219c2 | 63 | static AliESDEvent* AssertESD(); |
3aecaefc | 64 | static AliESDfriend* AssertESDfriend(); |
c2c4b7a2 | 65 | static AliRawReader* AssertRawReader(); |
5a5a1232 | 66 | |
93845f6c | 67 | static AliMagF* AssertMagField(); |
68 | ||
632d2b03 | 69 | static TGeoManager* AssertGeometry(); |
70 | ||
4b456ebb | 71 | protected: |
72 | TString fPath; // URL to event-data. | |
73 | Int_t fEventId; // Id of current event. | |
74 | ||
75 | AliRunLoader* fRunLoader; // Run loader. | |
76 | ||
77 | TFile* fESDFile; // ESD file. | |
78 | TTree* fESDTree; // ESD tree. | |
79 | AliESDEvent* fESD; // ESDEvent object. | |
80 | AliESDfriend* fESDfriend; // ESDfriend object. | |
81 | Bool_t fESDfriendExists; // Flag specifying if ESDfriend was found during opening of the event-data. | |
82 | ||
c2c4b7a2 | 83 | AliRawReader* fRawReader; // Raw-adata reader. |
84 | ||
85 | static TString fgESDFileName; // Name by which to open ESD. | |
86 | static TString fgRawFileName; // Name by which to open raw-data file. | |
4b456ebb | 87 | static TString fgCdbUri; // Global URI to CDB. |
88 | static Bool_t fgAssertRunLoader; // Global flag specifying if AliRunLoader must be asserted during opening of the event-data. | |
89 | static Bool_t fgAssertESD; // Global flag specifying if ESDEvent must be asserted during opening of the event-data. | |
c2c4b7a2 | 90 | static Bool_t fgAssertRaw; // Global flag specifying if raw-data presence must be asserted during opening of the event-data. |
4b456ebb | 91 | |
92 | static AliMagF* fgMagField; // Global pointer to magneti field. | |
93 | ||
94 | private: | |
95 | AliEveEventManager(const AliEveEventManager&); // Not implemented | |
96 | AliEveEventManager& operator=(const AliEveEventManager&); // Not implemented | |
97 | ||
98 | ClassDef(AliEveEventManager, 0); // Interface for getting all event components in a uniform way. | |
99 | }; | |
5a5a1232 | 100 | |
a15e6d7d | 101 | extern AliEveEventManager* gAliEveEvent; |
5a5a1232 | 102 | |
103 | #endif |