]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/Cal/AliTRDCalDCSGTU.cxx
AliCFGridSparse : propagate the bin labels during projections
[u/mrichter/AliRoot.git] / TRD / Cal / AliTRDCalDCSGTU.cxx
index f0b35a25eeec404b2ebbee5c7d7b2b46b03992bf..5e0ecb540ef93ab1a9ddfc7e978e3912da4be4c3 100644 (file)
@@ -13,6 +13,7 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+/* $Id: AliTRDCalDCSGTU.cxx 18952 2007-06-08 11:36:12Z cblume $ */
 
 ///////////////////////////////////////////////////////////////////////////////
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "AliTRDCalDCSGTU.h"
+#include "AliTRDCalDCSGTUTgu.h"
+#include <TObjArray.h>
 
 ClassImp(AliTRDCalDCSGTU)
 
 //_____________________________________________________________________________
 AliTRDCalDCSGTU::AliTRDCalDCSGTU()
   :TNamed()
-  ,fDCSID(0)
-  ,fSMMask()
-  ,fStackMask()
-  ,fLinkMask()
+    ,fRunNumber(0)
+    ,fSORFlag(0)
+    ,fSerial(0)
+    ,fDNR(-1)
+    ,fSegmentsArr(new TObjArray())
+    ,fTgu(new AliTRDCalDCSGTUTgu())
 {
   //
   // AliTRDCalDCSGTU default constructor
   //
-
-  // link not active: 0, link active: 1, bit not set: 2
-  for (Int_t i=0;i<18;i++) {
-    fSMMask[i] = 2;
-    for (Int_t j=0;j<5;j++) {
-      fStackMask[i][j] = 2;
-      for (Int_t k=0;k<12;k++) {
-       fLinkMask[i][j][k] = 2;
-      }
-    }
-  }
-
+  fSegmentsArr->SetOwner();
 }
 
 //_____________________________________________________________________________
 AliTRDCalDCSGTU::AliTRDCalDCSGTU(const char *name, const char *title)
   :TNamed(name,title)
-  ,fDCSID(0)
-  ,fSMMask()
-  ,fStackMask()
-  ,fLinkMask()
+    ,fRunNumber(0)
+    ,fSORFlag(0)
+    ,fSerial(0)
+    ,fDNR(-1)
+    ,fSegmentsArr(new TObjArray())
+    ,fTgu(new AliTRDCalDCSGTUTgu())
 {
   //
   // AliTRDCalDCSGTU constructor
   //
-
-  // link not active: 0, link active: 1, bit not set: 2
-  for(int i=0;i<18;i++) {
-    fSMMask[i] = 2;
-    for(int j=0;j<5;j++) {
-      fStackMask[i][j] = 2;
-      for(int k=0;k<12;k++) {
-       fLinkMask[i][j][k] = 2;
-      }
-    }
-  }
-
 }
 
 //_____________________________________________________________________________
-Int_t AliTRDCalDCSGTU::SetSMMask(const char* smmask)
+AliTRDCalDCSGTU::AliTRDCalDCSGTU(const AliTRDCalDCSGTU&)
+  :TNamed("","")
+    ,fRunNumber(0)
+    ,fSORFlag(0)
+    ,fSerial(0)
+    ,fDNR(-1)
+    ,fSegmentsArr(new TObjArray())
+    ,fTgu(new AliTRDCalDCSGTUTgu())
 {
-  // if something goes wrong here, the errorcode is 10x
-  TString smMaskStr = smmask;
-  // return false in case of wrong length
-  if (smMaskStr.Length() != 18) return 101;
-
-  for (Int_t i=0;i<18;i++) {
-    TString bit = smMaskStr[i];
-    if (!bit.IsDigit()) return 102; // must be 0 or 1 -> a digit!
-    fSMMask[i] = bit.Atoi();
-  }
-  return 0;
+  //
+  // AliTRDCalDCSGTU constructor
+  //
 }
 
 //_____________________________________________________________________________
-Int_t AliTRDCalDCSGTU::SetLinkMask(Int_t smid, Int_t stid, const char* lkmask)
+AliTRDCalDCSGTU& AliTRDCalDCSGTU::operator=(const AliTRDCalDCSGTU& sh)
 {
-  // if something goes wrong here, the errorcode is 11x
-  if (smid == 99 || stid == 99) return 111; // 99: missing assignment
+  //
+  // AliTRDCalDCSGTU constructor
+  //
+  if (&sh == this) return *this;
+  
+  new (this) AliTRDCalDCSGTU(sh);
+  return *this;
+}
 
-  TString lkMaskStr = lkmask;
-  // return false in case of wrong length
-  if (lkMaskStr.Length() != 12) return 112;
 
-  for (Int_t i=0;i<12;i++) {
-    TString bit = lkMaskStr[i];
-    if (!bit.IsDigit()) return 113; // must be 0 or 1
-    fLinkMask[smid][stid][i] = bit.Atoi();
-  }
-  return 0;
-}