]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Changed setters from SetXXX(Int_t n) to SetXXX() which sets the fXXX field to kTRUE...
authorpanos <panos@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Aug 2006 15:49:56 +0000 (15:49 +0000)
committerpanos <panos@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 4 Aug 2006 15:49:56 +0000 (15:49 +0000)
STEER/AliDetectorTag.cxx
STEER/AliDetectorTag.h

index 365d706d972a003552eaec3eed51d1c4582cfc12..1482f2663dba37694e79e874af7c08cb7f42e399 100644 (file)
 
 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
 }
index 3139762384e5c1cc380a20fa40723d153d2e1d58..02a8eb7e304698f4300cf87d30ae22c73cbc1764 100644 (file)
 //-------------------------------------------------------------------------
 
 #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)
 };
 //______________________________________________________________________________