]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliAODEvent.h
Improvement of AliACORDEv1 class
[u/mrichter/AliRoot.git] / STEER / AliAODEvent.h
index 6102da0fbc7fe763ad2b051c74b8c2b2577280dc..d245eb0351dc01d2acbb700633cf9cc892cbdb94 100644 (file)
@@ -30,6 +30,7 @@
 #include "AliAODFmdCluster.h"
 
 class TTree;
+class TFolder;
 
 class AliAODEvent : public AliVEvent {
 
@@ -51,10 +52,11 @@ class AliAODEvent : public AliVEvent {
   AliAODEvent();
   virtual ~AliAODEvent();
 
-  //AliAODEvent(const AliAODEvent& aodevent);  // not implemented
-  //AliAODEvent& operator=(const AliAODEvent& aodevent);  // not implemented
+  AliAODEvent(const AliAODEvent& aodevent);             
+  AliAODEvent& operator=(const AliAODEvent& aodevent);  
 
   void          AddObject(TObject *obj);
+  void          RemoveObject(TObject *obj);
   TObject      *FindListObject(const char *objName) ;
   TList        *GetList()                const { return fAODObjects; }
 
@@ -104,7 +106,7 @@ class AliAODEvent : public AliVEvent {
 
   // -- Vertex
   TClonesArray *GetVertices()            const { return fVertices; }
-  Int_t         GetNVertices()           const { return fVertices->GetEntriesFast(); }
+  Int_t         GetNumberOfVertices()    const { return fVertices->GetEntriesFast(); }
   AliAODVertex *GetVertex(Int_t nVertex) const { return (AliAODVertex*)fVertices->UncheckedAt(nVertex); }
   Int_t         AddVertex(const AliAODVertex* vtx)
   {new((*fVertices)[fVertices->GetEntriesFast()]) AliAODVertex(*vtx); return fVertices->GetEntriesFast()-1;}
@@ -114,7 +116,7 @@ class AliAODEvent : public AliVEvent {
 
   // V0
   TClonesArray *GetV0s()                 const { return fV0s; }
-  Int_t         GetNV0s()                const { return fV0s->GetEntriesFast(); }
+  Int_t         GetNumberOfV0s()         const { return fV0s->GetEntriesFast(); }
   AliAODv0     *GetV0(Int_t nV0)         const { return (AliAODv0*)fV0s->UncheckedAt(nV0); }
   Int_t         AddV0(const AliAODv0* v0)
   {new((*fV0s)[fV0s->GetEntriesFast()]) AliAODv0(*v0); return fV0s->GetEntriesFast()-1;}
@@ -126,6 +128,10 @@ class AliAODEvent : public AliVEvent {
   Int_t         AddCaloCluster(const AliAODCaloCluster* clus)
   {new((*fCaloClusters)[fCaloClusters->GetEntriesFast()]) AliAODCaloCluster(*clus); return fCaloClusters->GetEntriesFast()-1;}
 
+  Int_t GetEMCALClusters(TRefArray *clusters) const;
+  Int_t GetPHOSClusters(TRefArray *clusters) const;
+
+
   // -- FMD Cluster
   TClonesArray *GetFmdClusters()        const { return fFmdClusters; }
   Int_t         GetNFmdClusters()       const { return fFmdClusters->GetEntriesFast(); }
@@ -158,6 +164,7 @@ class AliAODEvent : public AliVEvent {
   void    CreateStdContent();
   void    SetStdNames();
   void    GetStdContent();
+  void    CreateStdFolders();
   void    ResetStd(Int_t trkArrSize = 0, 
                   Int_t vtxArrSize = 0, 
                   Int_t v0ArrSize = 0, 
@@ -166,15 +173,17 @@ class AliAODEvent : public AliVEvent {
                   Int_t fmdClusSize = 0, 
                   Int_t pmdClusSize = 0);
   void    ClearStd();
-  void    ReadFromTree(TTree *tree);
+  void    ReadFromTree(TTree *tree, Option_t* opt = "");
   const void WriteToTree(TTree* tree) const {tree->Branch(fAODObjects);}
 
   void  Print(Option_t *option="") const;
-
+  void  MakeEntriesReferencable();
+  static void AssignIDtoCollection(TCollection* col);
  private :
 
-  TList *fAODObjects; //  list of AODObjects
-  
+  TList   *fAODObjects; //  list of AODObjects
+  TFolder *fAODFolder;  //  folder structure of branches
+  Bool_t   fConnected;  //! flag if leaves are alreday connected 
   // standard content
   AliAODHeader    *fHeader;       //! event information
   TClonesArray    *fTracks;       //! charged tracks
@@ -190,7 +199,7 @@ class AliAODEvent : public AliVEvent {
 
   static const char* fAODListName[kAODListN]; //!
 
-  ClassDef(AliAODEvent,3);
+  ClassDef(AliAODEvent, 4);
 };
 
 #endif