4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 ////////////////////////////////////////////////////////////////////////////////
9 // General class for cut/computation target objects (daughter/pair/event).
11 ////////////////////////////////////////////////////////////////////////////////
15 #include "AliRsnEvent.h"
20 class AliRsnTarget : public TNamed {
30 AliRsnTarget() : fTargetType(kTargetTypes), fDaughter(0x0), fMother(0x0), fEvent(0x0) { /*nothing*/ }
31 AliRsnTarget(const char *name, ETargetType type = kTargetTypes) : TNamed(name, ""), fTargetType(type), fDaughter(0x0), fMother(0x0), fEvent(0x0) { /*nothing*/ }
32 AliRsnTarget(const AliRsnTarget& copy) : TNamed(copy), fTargetType(copy.fTargetType), fDaughter(0x0), fMother(0x0), fEvent(0x0) { /*nothing*/ }
33 AliRsnTarget& operator=(const AliRsnTarget& copy) { TNamed::operator=(copy); fTargetType = copy.fTargetType; return (*this); }
34 virtual ~AliRsnTarget() { /*nothing*/ }
36 Bool_t IsAllNull() const {return (!fDaughter && !fMother && !fEvent);}
37 Bool_t IsTarget(ETargetType targetType) const {return (fTargetType == targetType);}
38 Bool_t TargetOK(TObject *object);
40 void SetTargetType(ETargetType type) {fTargetType = type;}
41 ETargetType GetTargetType() const {return fTargetType;}
42 Char_t GetTargetTypeChar() const;
43 const char* GetTargetTypeName() const;
45 AliRsnDaughter* GetTargetDaughter() {return fDaughter;}
46 AliRsnMother* GetTargetMother() {return fMother;}
47 AliRsnEvent* GetTargetEvent() {return fEvent;}
51 ETargetType fTargetType; // target type selected for this object
52 AliRsnDaughter *fDaughter; //! internal pointer to which any checked object is cast if it matches expected type
53 AliRsnMother *fMother; //! internal pointer to which any checked object is cast if it matches expected type
54 AliRsnEvent *fEvent; //! internal pointer to which any checked object is cast if it matches expected type
57 ClassDef(AliRsnTarget, 2)
60 typedef AliRsnTarget::ETargetType RSNTARGET;