AliPhysics  vAN-20150630 (513c479)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
AliEMCalTriggerBinningComponent.h
Go to the documentation of this file.
1 
13 #ifndef ALIEMCALTRIGGERBINNINGCOMPONENT_H
14 #define ALIEMCALTRIGGERBINNINGCOMPONENT_H
15 /* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
16  * See cxx source for full Copyright notice */
17 
18 #include <TArrayD.h>
19 #include <TNamed.h>
20 
21 class TObjArray;
22 
30 namespace EMCalTriggerPtAnalysis {
31 
39 class AliEMCalTriggerBinningDimension : public TNamed{
40 public:
45  TNamed(),
46  fBinning()
47  {}
54  TNamed(name, ""),
55  fBinning()
56  {}
64  AliEMCalTriggerBinningDimension(const char *name, int nbins, double *binning):
65  TNamed(name, ""),
66  fBinning(nbins+1, binning)
67  {}
74  AliEMCalTriggerBinningDimension(const char *name, const TArrayD &binning):
75  TNamed(name, ""),
76  fBinning(binning.GetSize(), binning.GetArray())
77  {}
82 
89  void Set(int nbins, double *binning) { fBinning.Set(nbins+1, binning); }
95  void Set(const TArrayD &binning) { fBinning = binning; }
101  const double *GetBinLimits() const { return fBinning.GetArray(); }
107  int GetNumberOfBins() const { return fBinning.GetSize() - 1; }
108  virtual void Print(Option_t *option="") const;
109 
110 private:
111  TArrayD fBinning;
112 
114  ClassDef(AliEMCalTriggerBinningDimension, 1);
116 };
117 
126 class AliEMCalTriggerBinningComponent: public TObject {
127 public:
132 
133  AliEMCalTriggerBinningDimension *GetBinning(const char *name) const;
134  void SetBinning(const char *dimname, int nbins, double *binning);
135  void SetBinning(const char *dimname, const TArrayD &binning);
136 
137 private:
138  TObjArray *fDimensions;
139 
141  ClassDef(AliEMCalTriggerBinningComponent, 1);
143 };
144 
145 } /* namespace EMCalTriggerPtAnalysis */
146 
147 #endif /* ALIEMCALTRIGGERBINNINGCOMPONENT_H */
void SetBinning(const char *dimname, int nbins, double *binning)
AliEMCalTriggerBinningDimension * GetBinning(const char *name) const
Global binning definition for the high- charged particle analysis.
AliEMCalTriggerBinningComponent & operator=(const AliEMCalTriggerBinningComponent &ref)
AliEMCalTriggerBinningDimension(const char *name, const TArrayD &binning)
AliEMCalTriggerBinningDimension(const char *name, int nbins, double *binning)