]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/Alieve/EventAlieve.h
New class AliESDEvent, backward compatibility with the old AliESD (Christian)
[u/mrichter/AliRoot.git] / EVE / Alieve / EventAlieve.h
index af4ef327a3dd1920cb37fee2a8257f7e12798582..5b79a46265e0f75fae6245a7bdf30ae43a2b7a0f 100644 (file)
@@ -3,22 +3,27 @@
 #ifndef ALIEVE_Event_H
 #define ALIEVE_Event_H
 
-#include <TNamed.h>
-#include <TString.h>
+#include <TList.h>
+
+#include <Reve/EventBase.h>
 
 class AliRunLoader;
-class AliESD;
+class AliESDEvent;
 class AliESDfriend;
 
+class AliMagF;
+
 class TFile;
 class TTree;
+class TGeoManager;
 
 namespace Alieve {
 
-class Event : public TNamed
+class Event : public Reve::EventBase
 {
 private:
-  void Init();
+  Event(const Event&);            // Not implemented
+  Event& operator=(const Event&); // Not implemented
 
 protected:
   TString       fPath;
@@ -28,36 +33,53 @@ protected:
 
   TFile*        fESDFile;
   TTree*        fESDTree;
-  AliESD*       fESD;
-  TFile*        fESDfriendFile;
-  TTree*        fESDfriendTree;
+  AliESDEvent*       fESD;
   AliESDfriend* fESDfriend;
+  Bool_t        fESDfriendExists;
+
+  TList         fNewEventCommands;
 
-  static Bool_t fgUseRunLoader;
-  static Bool_t fgUseESDTree;
+  static TString  fgCdbUri;
+  static Bool_t   fgAssertRunLoader;
+  static Bool_t   fgAssertESDTree;
+
+  static AliMagF* fgMagField;
 
 public:
-  static void Initialize(Bool_t use_runloader=true, Bool_t use_esd=true);
+  static void SetCdbUri(const Text_t* cdb) { if (cdb) fgCdbUri = cdb; }
+  static void SetAssertElements(Bool_t assertRunloader, Bool_t assertEsd)
+  { fgAssertRunLoader = assertRunloader; fgAssertESDTree = assertEsd; }
 
   Event();
   Event(TString path, Int_t ev=0);
 
   void Open();
+  void GotoEvent(Int_t event);
+  void NextEvent() { GotoEvent(fEventId + 1); }
+  void PrevEvent() { GotoEvent(fEventId - 1); }
   void Close();
 
+  virtual void  AfterNewEventLoaded();
+
+  TList& GetNewEventCommands() { return fNewEventCommands; }
+  void   AddNewEventCommand(const Text_t* cmd);
+
   Int_t         GetEventId()   const { return fEventId; }
   AliRunLoader* GetRunLoader() const { return fRunLoader; }
   TTree*        GetESDTree()   const { return fESDTree; }
-  AliESD*       GetESD()       const { return fESD; }
-  TTree*        GetESDfriendTree() const { return fESDfriendTree; }
-  AliESDfriend* GetESDfriend()     const { return fESDfriend; }
-
-  virtual const Text_t* GetTitle() const { return fPath.Data(); }
+  AliESDEvent*       GetESD()       const { return fESD; }
+  AliESDfriend* GetESDfriend()       const { return fESDfriend; }
+  Bool_t        GetESDfriendExists() const { return fESDfriendExists; }
+  virtual const Text_t* GetTitle()   const { return fPath.Data(); }
 
   static AliRunLoader* AssertRunLoader();
-  static AliESD*       AssertESD();
+  static AliESDEvent*       AssertESD();
   static AliESDfriend* AssertESDfriend();
 
+  static AliMagF*      AssertMagField();
+
+  static TGeoManager*  AssertGeometry();
+
   ClassDef(Event, 1);
 }; // endclass Event