]>
Commit | Line | Data |
---|---|---|
df9db588 | 1 | #ifndef AliAODEvent_H |
2 | #define AliAODEvent_H | |
3 | /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //------------------------------------------------------------------------- | |
9 | // AOD base class | |
10 | // Author: Markus Oldenburg, CERN | |
11 | //------------------------------------------------------------------------- | |
12 | ||
13 | #include <TBuffer.h> | |
14 | #include <TClonesArray.h> | |
15 | #include <TList.h> | |
16 | #include <TNamed.h> | |
17 | ||
18 | #include "AliAODHeader.h" | |
19 | #include "AliAODTrack.h" | |
20 | #include "AliAODVertex.h" | |
a9255000 | 21 | #include "AliAODCluster.h" |
df9db588 | 22 | #include "AliAODJet.h" |
23 | ||
24 | class AliAODEvent : public TObject { | |
25 | ||
26 | public : | |
27 | AliAODEvent(); | |
28 | virtual ~AliAODEvent(); | |
29 | ||
30 | //AliAODEvent(const AliAODEvent& aodevent); // not implemented | |
31 | //AliAODEvent& operator=(const AliAODEvent& aodevent); // not implemented | |
32 | ||
33 | void AddObject(TObject *obj); | |
34 | TObject *GetObject(const char *objName) const; | |
35 | TList *GetList() const { return fAODObjects; } | |
36 | ||
37 | // -- Header | |
38 | AliAODHeader *GetHeader() const { return (AliAODHeader*)fHeader; } | |
39 | void AddHeader(const AliAODHeader* hdx) | |
40 | {delete fHeader; fHeader=new AliAODHeader(*hdx);} | |
41 | ||
42 | // -- Tracks | |
43 | TClonesArray *GetTracks() const { return fTracks; } | |
44 | Int_t GetNTracks() const { return fTracks->GetEntriesFast(); } | |
45 | AliAODTrack *GetTrack(Int_t nTrack) const { return (AliAODTrack*)fTracks->At(nTrack); } | |
46 | void AddTrack(const AliAODTrack* trk) | |
47 | {new((*fTracks)[fTracks->GetEntries()]) AliAODTrack(*trk);} | |
48 | ||
49 | // -- Vertex | |
50 | TClonesArray *GetVertices() const { return fVertices; } | |
51 | Int_t GetNVertices() const { return fVertices->GetEntriesFast(); } | |
52 | AliAODVertex *GetVertex(Int_t nVertex) const { return (AliAODVertex*)fVertices->At(nVertex); } | |
53 | void AddVertex(const AliAODVertex* vtx) | |
54 | {new((*fVertices)[fVertices->GetEntries()]) AliAODVertex(*vtx);} | |
5c2fdfa2 | 55 | virtual AliAODVertex *GetPrimaryVertex() const { return GetVertex(0); } |
56 | ||
df9db588 | 57 | |
a9255000 | 58 | // -- Cluster |
59 | TClonesArray *GetClusters() const { return fClusters; } | |
60 | Int_t GetNClusters() const { return fClusters->GetEntriesFast(); } | |
61 | AliAODCluster *GetCluster(Int_t nCluster) const { return (AliAODCluster*)fClusters->At(nCluster); } | |
62 | void AddCluster(const AliAODCluster* vtx) | |
63 | {new((*fClusters)[fClusters->GetEntries()]) AliAODCluster(*vtx);} | |
df9db588 | 64 | |
65 | // -- Jet | |
66 | TClonesArray *GetJets() const { return fJets; } | |
67 | Int_t GetNJets() const { return fJets->GetEntriesFast(); } | |
68 | AliAODJet *GetJet(Int_t nJet) const { return (AliAODJet*)fJets->At(nJet); } | |
69 | void AddJet(const AliAODJet* vtx) | |
70 | {new((*fJets)[fJets->GetEntries()]) AliAODJet(*vtx);} | |
71 | ||
72 | // -- Services | |
73 | void CreateStdContent(); | |
74 | void GetStdContent() const; | |
75 | void ResetStd(Int_t trkArrSize = 0, Int_t vtxArrSize = 0); | |
76 | ||
77 | private : | |
78 | ||
79 | AliAODEvent(const AliAODEvent&); // Not implemented | |
80 | AliAODEvent& operator=(const AliAODEvent&); // Not implemented | |
81 | ||
82 | TList *fAODObjects; // list of AODObjects | |
83 | ||
84 | // standard content | |
85 | mutable AliAODHeader *fHeader; //! event information | |
86 | mutable TClonesArray *fTracks; //! charged tracks | |
87 | mutable TClonesArray *fVertices; //! vertices | |
a9255000 | 88 | mutable TClonesArray *fClusters; //! neutral particles |
df9db588 | 89 | mutable TClonesArray *fJets; //! jets |
90 | ||
91 | ClassDef(AliAODEvent,1); | |
92 | }; | |
93 | ||
94 | #endif |