* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id: AliTRDCalDCSGTU.cxx 18952 2007-06-08 11:36:12Z cblume $ */
///////////////////////////////////////////////////////////////////////////////
// //
//_____________________________________________________________________________
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;
-}