]>
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" | |
21 | #include "AliAODNeutral.h" | |
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);} | |
55 | ||
56 | // -- Neutral | |
57 | TClonesArray *GetNeutrals() const { return fNeutrals; } | |
58 | Int_t GetNNeutrals() const { return fNeutrals->GetEntriesFast(); } | |
59 | AliAODNeutral *GetNeutral(Int_t nNeutral) const { return (AliAODNeutral*)fNeutrals->At(nNeutral); } | |
60 | void AddNeutral(const AliAODNeutral* vtx) | |
61 | {new((*fNeutrals)[fNeutrals->GetEntries()]) AliAODNeutral(*vtx);} | |
62 | ||
63 | // -- Jet | |
64 | TClonesArray *GetJets() const { return fJets; } | |
65 | Int_t GetNJets() const { return fJets->GetEntriesFast(); } | |
66 | AliAODJet *GetJet(Int_t nJet) const { return (AliAODJet*)fJets->At(nJet); } | |
67 | void AddJet(const AliAODJet* vtx) | |
68 | {new((*fJets)[fJets->GetEntries()]) AliAODJet(*vtx);} | |
69 | ||
70 | // -- Services | |
71 | void CreateStdContent(); | |
72 | void GetStdContent() const; | |
73 | void ResetStd(Int_t trkArrSize = 0, Int_t vtxArrSize = 0); | |
74 | ||
75 | private : | |
76 | ||
77 | AliAODEvent(const AliAODEvent&); // Not implemented | |
78 | AliAODEvent& operator=(const AliAODEvent&); // Not implemented | |
79 | ||
80 | TList *fAODObjects; // list of AODObjects | |
81 | ||
82 | // standard content | |
83 | mutable AliAODHeader *fHeader; //! event information | |
84 | mutable TClonesArray *fTracks; //! charged tracks | |
85 | mutable TClonesArray *fVertices; //! vertices | |
86 | mutable TClonesArray *fNeutrals; //! neutral particles | |
87 | mutable TClonesArray *fJets; //! jets | |
88 | ||
89 | ClassDef(AliAODEvent,1); | |
90 | }; | |
91 | ||
92 | #endif |