]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/EveBase/AliEveEventManager.h
Fix enums as reported by coverity
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveEventManager.h
index 3c90e835e063c3b826e10f8ada1ba1626a2e7ee2..df5b2f559a96515d6394c1b16dd562f058b71614 100644 (file)
 #include <TQObject.h>
 #include <TObjArray.h>
 
+#include <AliEventInfo.h>
+
 class AliEveMacroExecutor;
+class AliEveEventSelector; 
 
 class AliRunLoader;
 class AliESDEvent;
@@ -22,11 +25,16 @@ class AliESDfriend;
 class AliAODEvent;
 class AliRawReader;
 
+class AliGRPObject;
+class AliRecoParam;
 class AliMagF;
 
+class TEveElement;
 class TFile;
 class TTree;
 class TGeoManager;
+class TString;
+class TMap;
 
 //==============================================================================
 //
@@ -42,27 +50,34 @@ class AliEveEventManager : public TEveEventManager,
 {
 public:
   static void SetESDFileName(const TString& esd);
+  static void SetESDfriendFileName(const TString& esdf);
   static void SetAODFileName(const TString& aod);
   static void AddAODfriend  (const TString& friendFileName);
   static void SetRawFileName(const TString& raw);
   static void SetCdbUri     (const TString& cdb);
+  static void SetGAliceFileName(const TString& galice);
+  
+  // set Local Directory or URL where the files are located
+  // it can also be a path to root_archive.zip
+  // assumes the filenames of ESD, AOD, etc are standard ALICE names 
+  // (AliESDs.root, AliESDfriends.root, AliAOD.root, AliAODfriend.root, galice.root,raw.root) 
+  static void SetFilesPath(const TString& path); 
+  
   static void SetAssertElements(Bool_t assertRunloader, Bool_t assertEsd,
                                Bool_t assertAod, Bool_t assertRaw);
+  static void SearchRawForCentralReconstruction();
 
-  AliEveEventManager(const TString& name="Event");
-  AliEveEventManager(const TString& name, const TString& path, Int_t ev=0);
+  AliEveEventManager(const TString& name="Event", Int_t ev=0);
   virtual ~AliEveEventManager();
 
   virtual void  Open();
-  void          SetEvent(AliRunLoader *runLoader, AliRawReader *rawReader, AliESDEvent *esd);
+  void          SetEvent(AliRunLoader *runLoader, AliRawReader *rawReader, AliESDEvent *esd, AliESDfriend *esdf);
   virtual Int_t GetMaxEventId(Bool_t refreshESD=kFALSE) const;
   virtual void  GotoEvent(Int_t event);
   virtual void  NextEvent();
-  virtual void  PrevEvent();
+  virtual void  PrevEvent(); 
   virtual void  Close();
-  Bool_t        FindNextByTrigger(Int_t& i);
-  Bool_t        FindPrevByTrigger(Int_t& i);
-
+  void Timeout(); // * SIGNAL*
 
   Int_t         GetEventId()         const { return fEventId; }
   AliRunLoader* GetRunLoader()       const { return fRunLoader; }
@@ -74,9 +89,12 @@ public:
   TFile*        GetAODFile()         const { return fAODFile; }
   TTree*        GetAODTree()         const { return fAODTree; }
   AliAODEvent*  GetAOD()             const { return fAOD;     }
-  virtual const Text_t* GetTitle()   const { return fPath.Data(); }
+  AliEveEventSelector* GetEventSelector() const { return fPEventSelector; }
   TString       GetEventInfoHorizontal() const;
   TString       GetEventInfoVertical()   const;
+  const AliEventInfo*  GetEventInfo();
+
+  static Int_t  CurrentEventId();
 
   static Bool_t HasRunLoader();
   static Bool_t HasESD();
@@ -91,8 +109,8 @@ public:
   static AliRawReader* AssertRawReader();
 
   static AliMagF*      AssertMagField();
-
   static TGeoManager*  AssertGeometry();
+  static AliRecoParam* AssertRecoParams();
 
   static AliEveEventManager* AddDependentManager(const TString& name, const TString& path);
   static AliEveEventManager* GetDependentManager(const TString& name);
@@ -100,28 +118,33 @@ public:
   static AliEveEventManager* GetMaster();
   static AliEveEventManager* GetCurrent();
 
+  static void                RegisterTransient    (TEveElement* element);
+  static void                RegisterTransientList(TEveElement* element);
+
+
   Double_t      GetAutoLoadTime()        const { return fAutoLoadTime; }
   Bool_t        GetAutoLoad()            const { return fAutoLoad;     }
   void          SetAutoLoadTime(Float_t time);
   void          SetAutoLoad(Bool_t autoLoad);
+  void          SetTrigSel(Int_t trig);
   void          AutoLoadNextEvent();
 
-  Bool_t        GetSelectOnTriggerType()     const { return fSelectOnTriggerType; }
-  TString       GetTriggerType()             const { return fTriggerType; }
-  void          SetTriggerType(const TString& triggertype) { fTriggerType = triggertype; }
-  void          SetSelectOnTriggerType(Bool_t sel)         { fSelectOnTriggerType = sel; }
-
   Bool_t        AreEventFilesOpened()    const { return fIsOpen;       }
   Bool_t        IsEventAvailable()       const { return fHasEvent;     }
   Bool_t        IsUnderExternalControl() const { return fExternalCtrl; }
+  
+  Bool_t        InsertGlobal(const TString& tag, TEveElement* model);
+  Bool_t        InsertGlobal(const TString& tag, TEveElement* model,
+                             Bool_t replace, Bool_t update);
+  TEveElement*  FindGlobal(const TString& tag);
 
   virtual void  AfterNewEventLoaded();
+  void          NewEventDataLoaded();  // *SIGNAL*
   void          NewEventLoaded();      // *SIGNAL*
 
   AliEveMacroExecutor* GetExecutor() const { return fExecutor; }
 
 protected:
-  TString       fPath;                 // URL to event-data.
   Int_t         fEventId;              // Id of current event.
 
   AliRunLoader* fRunLoader;            // Run loader.
@@ -136,7 +159,8 @@ protected:
   AliAODEvent  *fAOD;                  // AODEvent object.
 
   AliRawReader *fRawReader;             // Raw-data reader.
-
+  AliEventInfo fEventInfo;             // Current Event Info
+  
   Bool_t        fAutoLoad;              // Automatic loading of events (online)
   Float_t       fAutoLoadTime;          // Auto-load time in seconds
   TTimer       *fAutoLoadTimer;         // Timer for automatic event loading
@@ -145,14 +169,22 @@ protected:
   Bool_t        fHasEvent;              // Is an event available.
   Bool_t        fExternalCtrl;          // Are we under external event-loop.
 
-  Bool_t        fSelectOnTriggerType;   // Whether to select on trigger-type.
-  TString       fTriggerType;           // Trigger-type to select on.
+  TMap*         fGlobal;
+  Bool_t        fGlobalReplace;         // Are global replace
+  Bool_t        fGlobalUpdate;          // Are global updates
 
   AliEveMacroExecutor *fExecutor;       // Executor for std macros
 
+  TEveElementList     *fTransients;     // Container for additional transient (per event) elements.
+  TEveElementList     *fTransientLists; // Container for lists of transient (per event) elements.
+
+  AliEveEventSelector* fPEventSelector; // Event filter
+
   TList        *fSubManagers;           // Dependent event-managers, used for event embedding.
 
+  static TString  fgGAliceFileName;        // galice.root file
   static TString  fgESDFileName;        // Name by which to open ESD.
+  static TString  fgESDfriendsFileName;
   static TString  fgAODFileName;        // Name by which to open AOD.
   static TString  fgRawFileName;        // Name by which to open raw-data file.
   static TString  fgCdbUri;            // Global URI to CDB.
@@ -161,10 +193,15 @@ protected:
   static Bool_t   fgAssertAOD;         // Global flag specifying if AODEvent must be asserted during opening of the event-data.
   static Bool_t   fgAssertRaw;         // Global flag specifying if raw-data presence must be asserted during opening of the event-data.
 
-  static AliMagF *fgMagField;          // Global pointer to magnetic field.
-
   static TList   *fgAODfriends;         // Global list of AOD friend names to be attached during opening of the event-data (empty by default).
 
+  static Bool_t   fgRawFromStandardLoc; // Global flag to enable looking for raw data in ../../../raw/, as it is stored for central reco.
+
+  static Bool_t        fgGRPLoaded;     // Global run parameters loaded?
+  static AliMagF      *fgMagField;      // Global pointer to magnetic field.
+  static AliRecoParam* fgRecoParam;
+  static Bool_t        fgUniformField;  // Track with uniform field.
+
 private:
   AliEveEventManager(const AliEveEventManager&);            // Not implemented
   AliEveEventManager& operator=(const AliEveEventManager&); // Not implemented
@@ -173,6 +210,9 @@ private:
   void StartAutoLoadTimer();
   void StopAutoLoadTimer();
 
+  static Bool_t InitGRP();
+  static Bool_t InitRecoParam();
+
   Bool_t fAutoLoadTimerRunning; // State of auto-load timer.
 
   static AliEveEventManager* fgMaster;