2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
4 /**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
7 * full copyright notice. *
8 **************************************************************************/
10 #ifndef AliEveEventManaget_H
11 #define AliEveEventManager_H
13 #include <TEveEventManager.h>
26 //==============================================================================
30 // Interface to ALICE event-data (RunLoader, ESD), magnetic field and
35 class AliEveEventManager : public TEveEventManager
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);
44 AliEveEventManager(TString path, Int_t ev=0);
45 virtual ~AliEveEventManager();
49 void SetEvent(AliRunLoader *runLoader, AliRawReader *rawReader, AliESDEvent *esd);
51 virtual void GotoEvent(Int_t event);
52 virtual void NextEvent();
53 virtual void PrevEvent();
56 Int_t GetEventId() const { return fEventId; }
57 AliRunLoader* GetRunLoader() const { return fRunLoader; }
58 TTree* GetESDTree() const { return fESDTree; }
59 AliESDEvent* GetESD() const { return fESD; }
60 AliESDfriend* GetESDfriend() const { return fESDfriend; }
61 Bool_t GetESDfriendExists() const { return fESDfriendExists; }
62 virtual const Text_t* GetTitle() const { return fPath.Data(); }
63 const char* GetEventInfo() const;
65 static AliRunLoader* AssertRunLoader();
66 static AliESDEvent* AssertESD();
67 static AliESDfriend* AssertESDfriend();
68 static AliRawReader* AssertRawReader();
70 static AliMagF* AssertMagField();
72 static TGeoManager* AssertGeometry();
74 Bool_t GetAutoLoad() const {return fAutoLoad;}
75 Double_t GetAutoLoadTime() const {return fAutoLoadTime;}
76 void SetAutoLoad(Bool_t autoLoad);
77 void SetAutoLoadTime(Double_t time);
78 Bool_t GetIsOnline() const {return fIsOnline;}
80 void StartStopAutoLoadTimer();
83 TString fPath; // URL to event-data.
84 Int_t fEventId; // Id of current event.
86 AliRunLoader* fRunLoader; // Run loader.
88 TFile* fESDFile; // ESD file.
89 TTree* fESDTree; // ESD tree.
90 AliESDEvent* fESD; // ESDEvent object.
91 AliESDfriend* fESDfriend; // ESDfriend object.
92 Bool_t fESDfriendExists; // Flag specifying if ESDfriend was found during opening of the event-data.
94 AliRawReader* fRawReader; // Raw-adata reader.
96 Bool_t fAutoLoad; // Automatic loading of events (online)
97 Double_t fAutoLoadTime; // Auto-load time in seconds
98 TTimer *fAutoLoadTimer; // Timer for automatic event loading
99 Bool_t fIsOnline; // Are we running online?
101 static TString fgESDFileName; // Name by which to open ESD.
102 static TString fgRawFileName; // Name by which to open raw-data file.
103 static TString fgCdbUri; // Global URI to CDB.
104 static Bool_t fgAssertRunLoader; // Global flag specifying if AliRunLoader must be asserted during opening of the event-data.
105 static Bool_t fgAssertESD; // Global flag specifying if ESDEvent must be asserted during opening of the event-data.
106 static Bool_t fgAssertRaw; // Global flag specifying if raw-data presence must be asserted during opening of the event-data.
108 static AliMagF* fgMagField; // Global pointer to magneti field.
111 AliEveEventManager(const AliEveEventManager&); // Not implemented
112 AliEveEventManager& operator=(const AliEveEventManager&); // Not implemented
114 ClassDef(AliEveEventManager, 0); // Interface for getting all event components in a uniform way.
117 extern AliEveEventManager* gAliEveEvent;