// must be overloaded by any specific cut implementation.
//
// This class provides some default instruments to check values
-// agains a reference or an allowed range, in order to permit
+// against a reference or an allowed range, in order to permit
// a unique way to execute such kind of checks.
+// Moreover, if one checks values and ranges using default methods
+// a debug message can be printed on request.
//
// authors: Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it)
// Martin Vala (martin.vala@cern.ch)
#include "AliRsnTarget.h"
-class AliRsnEvent;
+class AliRsnCut : public AliRsnTarget {
+public:
-class AliRsnCut : public AliRsnTarget
-{
- public:
+ AliRsnCut(const char *name = "dummy", RSNTARGET target = AliRsnTarget::kTargetTypes);
+ AliRsnCut(const char *name, RSNTARGET target, Int_t imin, Int_t imax = 0 , Double_t dmin = 0., Double_t dmax = 0.);
+ AliRsnCut(const char *name, RSNTARGET target, Double_t dmin, Double_t dmax = 0., Int_t imin = 0 , Int_t imax = 0);
+ AliRsnCut(const AliRsnCut& copy);
+ AliRsnCut& operator=(const AliRsnCut& copy);
+ virtual ~AliRsnCut() { };
- AliRsnCut(const char *name = "dummy", RSNTARGET target = AliRsnTarget::kTargetTypes);
- AliRsnCut(const char *name, RSNTARGET target, Int_t imin, Int_t imax=0 , Double_t dmin=0., Double_t dmax=0.);
- AliRsnCut(const char *name, RSNTARGET target, Double_t dmin, Double_t dmax=0., Int_t imin=0 , Int_t imax=0 );
- AliRsnCut(const AliRsnCut& copy);
- AliRsnCut& operator=(const AliRsnCut& copy);
- virtual ~AliRsnCut() { fEvent = 0x0; };
-
- Int_t GetMinI() {return fMinI;}
- Int_t GetMaxI() {return fMaxI;}
- Double_t GetMinD() {return fMinD;}
- Double_t GetMaxD() {return fMaxD;}
- Int_t GetCutValueI() {return fCutValueI;}
- Double_t GetCutValueD() {return fCutValueD;}
- Bool_t GetCutResult() {return fCutResult;}
-
- void SetRangeI(Int_t min, Int_t max) {fMinI = min; fMaxI = max;}
- void SetRangeD(Double_t min, Double_t max) {fMinD = min; fMaxD = max;}
+ Int_t GetMinI() const {return fMinI;}
+ Int_t GetMaxI() const {return fMaxI;}
+ Double_t GetMinD() const {return fMinD;}
+ Double_t GetMaxD() const {return fMaxD;}
+ Int_t GetCutValueI() const {return fCutValueI;}
+ Double_t GetCutValueD() const {return fCutValueD;}
+ Bool_t GetCutResult() const {return fCutResult;}
- void SetValueI(Int_t value) {fMinI = value;}
- void SetValueD(Double_t value) {fMinD = value;}
+ void SetRangeI(Int_t min, Int_t max) {fMinI = min; fMaxI = max;}
+ void SetRangeD(Double_t min, Double_t max) {fMinD = min; fMaxD = max;}
- Bool_t OkValueI();
- Bool_t OkRangeI();
- Bool_t OkValueD();
- Bool_t OkRangeD();
-
- virtual Bool_t IsSelected(TObject *object);
- virtual void Print(Option_t *opt = "") const;
+ void SetValueI(Int_t value) {fMinI = value;}
+ void SetValueD(Double_t value) {fMinD = value;}
- protected:
+ Bool_t OkValueI();
+ Bool_t OkRangeI();
+ Bool_t OkValueD();
+ Bool_t OkRangeD();
- Int_t fMinI; // lower edge of INT range or ref. value for INT CUT
- Int_t fMaxI; // upper edge of INT range (not used for value cuts)
- Double_t fMinD; // lower edge of DOUBLE range or ref. value for DOUBLE CUT
- Double_t fMaxD; // upper edge of DOUBLE range (not used for value cuts)
+ virtual Bool_t IsSelected(TObject *object);
+ virtual void Print(Option_t *opt = "") const;
- Int_t fCutValueI; // cut value INT
- Double_t fCutValueD; // cut value DOUBLE
-
- Bool_t fCutResult; // tells if the cut is passed or not
+protected:
- ClassDef(AliRsnCut, 1)
+ Int_t fMinI; // lower edge of INT range or ref. value for INT CUT
+ Int_t fMaxI; // upper edge of INT range (not used for value cuts)
+ Double_t fMinD; // lower edge of DOUBLE range or ref. value for DOUBLE CUT
+ Double_t fMaxD; // upper edge of DOUBLE range (not used for value cuts)
+
+ Int_t fCutValueI; // cut value INT
+ Double_t fCutValueD; // cut value DOUBLE
+
+ Bool_t fCutResult; // tells if the cut is passed or not
+
+ ClassDef(AliRsnCut, 1)
};
#endif