2 // *** Class AliRsnTarget ***
4 // Base class used wherever it is needed to check the class type of
5 // an object (daughter, mother, event) which could be used for
6 // cut checking or value computing.
7 // Since most of these operation are implemented into classes that
8 // operate on any of such objects, then this class helps in making sure
9 // that the object being processed corresponds to what is expected.
12 #ifndef ALIRSNTARGET_H
13 #define ALIRSNTARGET_H
17 class AliRsnTarget : public TNamed
29 AliRsnTarget() : fTargetType(kTargetTypes) { /*nothing*/ }
30 AliRsnTarget(const char *name, ETargetType type) : TNamed(name, ""), fTargetType(type) { /*nothing*/ }
31 AliRsnTarget(const AliRsnTarget& copy) : TNamed(copy), fTargetType(copy.fTargetType) { /*nothing*/ }
32 AliRsnTarget& operator=(const AliRsnTarget& copy) { TNamed::operator=(copy); fTargetType = copy.fTargetType; return (*this); }
33 virtual ~AliRsnTarget() { /*nothing*/ }
35 Bool_t IsTarget(ETargetType targetType) {return (fTargetType == targetType);}
36 ETargetType GetTargetType() const {return fTargetType;}
37 Char_t GetTargetTypeChar() const;
38 const char* GetTargetTypeName() const;
39 void SetTargetType(ETargetType type) {fTargetType = type;}
40 Bool_t TargetOK(TObject *object);
44 ETargetType fTargetType; // target type selected for this object
47 ClassDef(AliRsnTarget, 1)
50 typedef AliRsnTarget::ETargetType RSNTARGET;