]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - EVE/EveBase/AliEveEventManager.h
First version of the online reco + AliEVE attached to it. (Matevz and Cvetan)
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveEventManager.h
... / ...
CommitLineData
1// $Id$
2// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
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 **************************************************************************/
9
10#ifndef AliEveEventManaget_H
11#define AliEveEventManager_H
12
13#include <TEveEventManager.h>
14
15class AliRunLoader;
16class AliESDEvent;
17class AliESDfriend;
18class AliRawReader;
19
20class AliMagF;
21
22class TFile;
23class TTree;
24class TGeoManager;
25
26//==============================================================================
27//
28// AliEveEventManager
29//
30// Interface to ALICE event-data (RunLoader, ESD), magnetic field and
31// geometry.
32//
33
34
35class AliEveEventManager : public TEveEventManager
36{
37public:
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);
42
43 AliEveEventManager();
44 AliEveEventManager(TString path, Int_t ev=0);
45 virtual ~AliEveEventManager();
46
47
48 virtual void Open();
49 void SetEvent(AliRunLoader *runLoader, AliRawReader *rawReader, AliESDEvent *esd);
50
51 virtual void GotoEvent(Int_t event);
52 virtual void NextEvent();
53 virtual void PrevEvent();
54 virtual void Close();
55
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;
64
65 static AliRunLoader* AssertRunLoader();
66 static AliESDEvent* AssertESD();
67 static AliESDfriend* AssertESDfriend();
68 static AliRawReader* AssertRawReader();
69
70 static AliMagF* AssertMagField();
71
72 static TGeoManager* AssertGeometry();
73
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;}
79
80 void StartStopAutoLoadTimer();
81
82protected:
83 TString fPath; // URL to event-data.
84 Int_t fEventId; // Id of current event.
85
86 AliRunLoader* fRunLoader; // Run loader.
87
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.
93
94 AliRawReader* fRawReader; // Raw-adata reader.
95
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?
100
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.
107
108 static AliMagF* fgMagField; // Global pointer to magneti field.
109
110private:
111 AliEveEventManager(const AliEveEventManager&); // Not implemented
112 AliEveEventManager& operator=(const AliEveEventManager&); // Not implemented
113
114 ClassDef(AliEveEventManager, 0); // Interface for getting all event components in a uniform way.
115};
116
117extern AliEveEventManager* gAliEveEvent;
118
119#endif