1 #ifndef AliEmcalContainer_H
2 #define AliEmcalContainer_H
5 // container with name, TClonesArray
13 #include <TClonesArray.h>
15 class AliEmcalContainer : public TNamed {
18 AliEmcalContainer(const char *name);
19 virtual ~AliEmcalContainer(){;}
21 TClonesArray *GetArray() { return fClArray ; }
22 const TString& GetArrayName() const { return fClArrayName ; }
23 Int_t GetCurrentID() const { return fCurrentID-1 ; }
24 Bool_t GetIsParticleLevel() const { return fIsParticleLevel ; }
25 Int_t GetIndexFromLabel(Int_t lab) const;
26 Int_t GetNEntries() const { return fClArray->GetEntriesFast() ; }
27 virtual void GetMomentum(TLorentzVector &mom, Int_t i) const = 0;
28 void ResetCurrentID(Int_t i=0) { fCurrentID = i ; }
29 virtual void SetArray(AliVEvent *event);
30 void SetArrayName(const char *n) { fClArrayName = n ; }
31 void SetIsParticleLevel(Bool_t b) { fIsParticleLevel = b ; }
32 void SortArray() { fClArray->Sort() ; }
35 TString fClArrayName; // name of branch
36 TString fClassName; // name of the class in the TClonesArray
37 Bool_t fIsParticleLevel; // whether or not it is a particle level object collection
38 TClonesArray *fClArray; //!TClonesArray
39 Int_t fCurrentID; //!current ID for automatic loops
40 AliNamedArrayI *fLabelMap; //!Label-Index map
41 Double_t fVertex[3]; //!event vertex array
44 AliEmcalContainer(const AliEmcalContainer& obj); // copy constructor
45 AliEmcalContainer& operator=(const AliEmcalContainer& other); // assignment
47 ClassDef(AliEmcalContainer,3);