From 719bd6720a895b8365c9eb7b5c85cf3c993c9a8c Mon Sep 17 00:00:00 2001 From: panos Date: Fri, 4 Aug 2006 15:49:56 +0000 Subject: [PATCH] Changed setters from SetXXX(Int_t n) to SetXXX() which sets the fXXX field to kTRUE when used. --- STEER/AliDetectorTag.cxx | 91 ++++++++++++++++++++++++---------------- STEER/AliDetectorTag.h | 90 +++++++++++++++++++-------------------- 2 files changed, 98 insertions(+), 83 deletions(-) diff --git a/STEER/AliDetectorTag.cxx b/STEER/AliDetectorTag.cxx index 365d706d972..1482f2663db 100644 --- a/STEER/AliDetectorTag.cxx +++ b/STEER/AliDetectorTag.cxx @@ -25,49 +25,66 @@ ClassImp(AliDetectorTag) -//______________________________________________________________________________ -AliDetectorTag::AliDetectorTag() +//___________________________________________________________________________ + AliDetectorTag::AliDetectorTag() : + TObject(), + fITS(kFALSE), + fTPC(kFALSE), + fTRD(kFALSE), + fTOF(kFALSE), + fHMPID(kFALSE), + fPHOS(kFALSE), + fZDC(kFALSE), + fMUON(kFALSE), + fPMD(kFALSE), + fEMCAL(kFALSE), + fVZERO(kFALSE), + fTZERO(kFALSE) { // Default constructor - fITS = 0; - fTPC = 0; - fTRD = 0; - fTOF = 0; - fHMPID = 0; - fPHOS = 0; - fZDC = 0; - fMUON = 0; - fABSORBER = 0; - fPMD = 0; - fRICH = 0; - fEMCAL = 0; - fVZERO = 0; - fTZERO = 0; } -//______________________________________________________________________________ -AliDetectorTag::AliDetectorTag(const AliDetectorTag & detTag) : - TObject(detTag) -{ +//___________________________________________________________________________ +AliDetectorTag::AliDetectorTag(const AliDetectorTag & detTag) : TObject(detTag) { // DetectorTag copy constructor - SetITS(detTag.GetITS()); - SetTPC(detTag.GetTPC()); - SetTRD(detTag.GetTRD()); - SetTOF(detTag.GetTOF()); - SetHMPID(detTag.GetHMPID()); - SetPHOS(detTag.GetPHOS()); - SetZDC(detTag.GetZDC()); - SetMUON(detTag.GetMUON()); - SetABSORBER(detTag.GetABSORBER()); - SetPMD(detTag.GetPMD()); - SetRICH(detTag.GetRICH()); - SetEMCAL(detTag.GetEMCAL()); - SetVZERO(detTag.GetVZERO()); - SetTZERO(detTag.GetTZERO()); + SetITS(); + SetTPC(); + SetTRD(); + SetTOF(); + SetHMPID(); + SetPHOS(); + SetZDC(); + SetMUON(); + SetPMD(); + SetEMCAL(); + SetVZERO(); + SetTZERO(); } -//______________________________________________________________________________ -AliDetectorTag::~AliDetectorTag() -{ +//___________________________________________________________________________ +AliDetectorTag & AliDetectorTag::operator=(const AliDetectorTag &detTag) { + //DetectorTag assignment operator + if (this != &detTag) { + TObject::operator=(detTag); + + SetITS(); + SetTPC(); + SetTRD(); + SetTOF(); + SetHMPID(); + SetPHOS(); + SetZDC(); + SetMUON(); + SetPMD(); + SetEMCAL(); + SetVZERO(); + SetTZERO(); + } + return *this; +} + + +//___________________________________________________________________________ +AliDetectorTag::~AliDetectorTag() { // Destructor } diff --git a/STEER/AliDetectorTag.h b/STEER/AliDetectorTag.h index 3139762384e..02a8eb7e304 100644 --- a/STEER/AliDetectorTag.h +++ b/STEER/AliDetectorTag.h @@ -14,61 +14,59 @@ //------------------------------------------------------------------------- #include "TObject.h" -//______________________________________________________________________________ -class AliDetectorTag : public TObject -{ +//___________________________________________________________________________ +class AliDetectorTag : public TObject { public: AliDetectorTag(); AliDetectorTag(const AliDetectorTag & t); + + AliDetectorTag &operator=(const AliDetectorTag &rhs); virtual ~AliDetectorTag(); - void SetITS(Int_t n) {fITS = n;} - void SetTPC(Int_t n) {fTPC = n;} - void SetTRD(Int_t n) {fTRD = n;} - void SetTOF(Int_t n) {fTOF = n;} - void SetHMPID(Int_t n) {fHMPID = n;} - void SetPHOS(Int_t n) {fPHOS = n;} - void SetZDC(Int_t n) {fZDC = n;} - void SetMUON(Int_t n) {fMUON = n;} - void SetABSORBER(Int_t n) {fABSORBER = n;} - void SetPMD(Int_t n) {fPMD = n;} - void SetRICH(Int_t n) {fRICH = n;} - void SetEMCAL(Int_t n) {fEMCAL = n;} - void SetVZERO(Int_t n) {fVZERO = n;} - void SetTZERO(Int_t n) {fTZERO = n;} + //____________________________________________________// + void SetITS() {fITS = kTRUE;} + void SetTPC() {fTPC = kTRUE;} + void SetTRD() {fTRD = kTRUE;} + void SetTOF() {fTOF = kTRUE;} + void SetHMPID() {fHMPID = kTRUE;} + void SetPHOS() {fPHOS = kTRUE;} + void SetZDC() {fZDC = kTRUE;} + void SetMUON() {fMUON = kTRUE;} + void SetPMD() {fPMD = kTRUE;} + void SetEMCAL() {fEMCAL = kTRUE;} + void SetVZERO() {fVZERO = kTRUE;} + void SetTZERO() {fTZERO = kTRUE;} - Bool_t GetITS() const {return fITS;} - Bool_t GetTPC() const {return fTPC;} - Bool_t GetTRD() const {return fTRD;} - Bool_t GetTOF() const {return fTOF;} - Bool_t GetHMPID() const {return fHMPID;} - Bool_t GetPHOS() const {return fPHOS;} - Bool_t GetZDC() const {return fZDC;} - Bool_t GetMUON() const {return fMUON;} - Bool_t GetABSORBER() const {return fABSORBER;} - Bool_t GetPMD() const {return fPMD;} - Bool_t GetRICH() const {return fRICH;} - Bool_t GetEMCAL() const {return fEMCAL;} - Bool_t GetVZERO() const {return fVZERO;} - Bool_t GetTZERO() const {return fTZERO;} + //____________________________________________________// + Bool_t GetITS() const {return fITS;} + Bool_t GetTPC() const {return fTPC;} + Bool_t GetTRD() const {return fTRD;} + Bool_t GetTOF() const {return fTOF;} + Bool_t GetHMPID() const {return fHMPID;} + Bool_t GetPHOS() const {return fPHOS;} + Bool_t GetZDC() const {return fZDC;} + Bool_t GetMUON() const {return fMUON;} + Bool_t GetPMD() const {return fPMD;} + Bool_t GetEMCAL() const {return fEMCAL;} + Bool_t GetVZERO() const {return fVZERO;} + Bool_t GetTZERO() const {return fTZERO;} + //____________________________________________________// private: - Bool_t fITS; //ITS active = 1 - Bool_t fTPC; //TPC active = 1 - Bool_t fTRD; //TRD active = 1 - Bool_t fTOF; //TOF active = 1 - Bool_t fHMPID; //HMPID active = 1 - Bool_t fPHOS; //PHOS active = 1 - Bool_t fZDC; //ZDC active = 1 - Bool_t fMUON; //MUON active = 1 - Bool_t fABSORBER; //ABSORBER active = 1 - Bool_t fPMD; //PMD active = 1 - Bool_t fRICH; //RICH active = 1 - Bool_t fEMCAL; //EMCAL active = 1 - Bool_t fVZERO; //VZERO active = 1 - Bool_t fTZERO; //TZERO active = 1 + Bool_t fITS; //ITS active = 1 + Bool_t fTPC; //TPC active = 1 + Bool_t fTRD; //TRD active = 1 + Bool_t fTOF; //TOF active = 1 + Bool_t fHMPID; //HMPID active = 1 + Bool_t fPHOS; //PHOS active = 1 + Bool_t fZDC; //ZDC active = 1 + Bool_t fMUON; //MUON active = 1 + Bool_t fPMD; //PMD active = 1 + Bool_t fEMCAL; //EMCAL active = 1 + Bool_t fVZERO; //VZERO active = 1 + Bool_t fTZERO; //TZERO active = 1 - ClassDef(AliDetectorTag,1) //(ClassName, ClassVersion) + ClassDef(AliDetectorTag,2) //(ClassName, ClassVersion) }; //______________________________________________________________________________ -- 2.43.0