1 #ifndef ALIRSNMINIAXIS_H
2 #define ALIRSNMINIAXIS_H
5 // All implementations related to definition of an axis
6 // which is used in the output histogams.
7 // Simpler than TAxis, it defines an array of edges
8 // which is then ported to the output histogram definition.
9 // currently ported only in mini-package, but it could
10 // become a default also for general package.
16 class AliRsnMiniAxis : public TObject {
20 AliRsnMiniAxis(Int_t valID = -1) : fValueID(valID), fBins(0) { }
21 AliRsnMiniAxis(Int_t valID, Int_t nbins, Double_t min, Double_t max) : fValueID(valID), fBins(0) {Set(nbins, min, max);}
22 AliRsnMiniAxis(Int_t valID, Double_t min, Double_t max, Double_t step) : fValueID(valID), fBins(0) {Set(min, max, step);}
23 AliRsnMiniAxis(Int_t valID, Int_t nbins, Double_t *bins) : fValueID(valID), fBins(0) {Set(nbins, bins);}
24 AliRsnMiniAxis(const AliRsnMiniAxis ©) : TObject(copy), fValueID(copy.fValueID), fBins(copy.fBins) { }
25 AliRsnMiniAxis &operator=(const AliRsnMiniAxis ©) {if (this==©) return *this; fValueID = copy.fValueID; fBins = copy.fBins; return (*this);}
27 void SetValueID(Int_t id) {fValueID = id;}
28 Int_t GetValueID() const {return fValueID;}
30 Int_t NBins() {return fBins.GetSize() - 1;}
31 TArrayD *Bins() {return &fBins;}
32 Double_t *BinArray() {return fBins.GetArray();}
34 void Set(Int_t nbins, Double_t min, Double_t max);
35 void Set(Int_t nbins, Double_t *bins);
36 void Set(Double_t min, Double_t max, Double_t step);
40 Int_t fValueID; // index of used value in task collection
41 TArrayD fBins; // bins
43 ClassDef(AliRsnMiniAxis,1)