4 // Definition of a single value which can be computed
5 // from any of the defined input objects implemented
6 // in the resonance package.
18 class AliRsnValue : public TNamed
54 AliRsnValue(const char *name, EValueType type, Int_t n = 0, Double_t min = 0.0, Double_t max = 0.0);
55 AliRsnValue(const char *name, EValueType type, Double_t min, Double_t max, Double_t step);
56 AliRsnValue(const char *name, EValueType type, Int_t n, Double_t *array);
57 AliRsnValue(const AliRsnValue& copy) : TNamed(copy),fValue(copy.fValue),fType(copy.fType),fArray(copy.fArray) {}
58 AliRsnValue& operator=(const AliRsnValue& copy) {SetName(copy.GetName());fType=copy.fType;fValue=copy.fValue;fArray=copy.fArray;return (*this);}
59 virtual ~AliRsnValue() { }
61 TArrayD GetArray() const {return fArray;}
62 Double_t GetValue() const {return fValue;}
63 EValueType GetValueType() {return fType;}
65 void SetValueType(EValueType type) {fType = type;}
66 void SetBins(Int_t n, Double_t min, Double_t max);
67 void SetBins(Double_t min, Double_t max, Double_t step);
68 void SetBins(Int_t n, Double_t *array);
69 void Set(EValueType type, Int_t n = 0, Double_t min = 0.0, Double_t max = 0.0) {fType = type; SetBins(n, min, max);}
70 void Set(EValueType type, Double_t min, Double_t max, Double_t step) {fType = type; SetBins(min, max, step);}
71 void Set(EValueType type, Int_t n, Double_t *array) {fType = type; SetBins(n, array);}
73 Bool_t Eval(AliRsnMother * const mother, AliRsnPairDef * const pairDef, AliRsnEvent * const event);
74 Bool_t Eval(AliRsnDaughter * const daughter, AliRsnEvent * const event);
75 void Print(Option_t *option = "") const;
79 Double_t fValue; // computed value
83 EValueType fType; // value type
84 TArrayD fArray; // array of bins (when necessary)
87 ClassDef(AliRsnValue, 1)