1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 /* $Id: AliTRDCalDCSGTU.cxx 18952 2007-06-08 11:36:12Z cblume $ */
18 ///////////////////////////////////////////////////////////////////////////////
20 // TRD calibration class for TRD DCS GTU parameters //
22 ///////////////////////////////////////////////////////////////////////////////
24 #include "AliTRDCalDCSGTU.h"
26 ClassImp(AliTRDCalDCSGTU)
28 //_____________________________________________________________________________
29 AliTRDCalDCSGTU::AliTRDCalDCSGTU()
37 // AliTRDCalDCSGTU default constructor
40 // link not active: 0, link active: 1, bit not set: 2
41 for (Int_t i=0;i<18;i++) {
43 for (Int_t j=0;j<5;j++) {
45 for (Int_t k=0;k<12;k++) {
46 fLinkMask[i][j][k] = 2;
53 //_____________________________________________________________________________
54 AliTRDCalDCSGTU::AliTRDCalDCSGTU(const char *name, const char *title)
62 // AliTRDCalDCSGTU constructor
65 // link not active: 0, link active: 1, bit not set: 2
66 for(int i=0;i<18;i++) {
68 for(int j=0;j<5;j++) {
70 for(int k=0;k<12;k++) {
71 fLinkMask[i][j][k] = 2;
78 //_____________________________________________________________________________
79 Int_t AliTRDCalDCSGTU::SetSMMask(const char* smmask)
81 // if something goes wrong here, the errorcode is 10x
82 TString smMaskStr = smmask;
83 // return false in case of wrong length
84 if (smMaskStr.Length() != 18) return 101;
86 for (Int_t i=0;i<18;i++) {
87 TString bit = smMaskStr[i];
88 if (!bit.IsDigit()) return 102; // must be 0 or 1 -> a digit!
89 fSMMask[i] = bit.Atoi();
94 //_____________________________________________________________________________
95 Int_t AliTRDCalDCSGTU::SetLinkMask(Int_t smid, Int_t stid, const char* lkmask)
97 // if something goes wrong here, the errorcode is 11x
98 if (smid == 99 || stid == 99) return 111; // 99: missing assignment
100 TString lkMaskStr = lkmask;
101 // return false in case of wrong length
102 if (lkMaskStr.Length() != 12) return 112;
104 for (Int_t i=0;i<12;i++) {
105 TString bit = lkMaskStr[i];
106 if (!bit.IsDigit()) return 113; // must be 0 or 1
107 fLinkMask[smid][stid][i] = bit.Atoi();