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: AliTRDCalDCS.cxx 18952 2007-06-08 11:36:12Z cblume $ */
18 ///////////////////////////////////////////////////////////////////////////////
20 // TRD calibration class for TRD DCS parameters //
22 ///////////////////////////////////////////////////////////////////////////////
24 #include "AliTRDCalDCS.h"
25 #include "AliTRDCalDCSFEE.h"
26 #include "AliTRDCalDCSGTU.h"
28 ClassImp(AliTRDCalDCS)
30 //_____________________________________________________________________________
31 AliTRDCalDCS::AliTRDCalDCS()
33 ,fGNumberOfTimeBins(-1)
36 ,fGThreePadClustThres(-1)
39 ,fGTCFilterShortDecPar(-1)
40 ,fGTCFilterLongDecPar(-1)
59 // AliTRDCalDCS default constructor
64 //_____________________________________________________________________________
65 AliTRDCalDCS::AliTRDCalDCS(const Text_t *name, const Text_t *title)
67 ,fGNumberOfTimeBins(-1)
70 ,fGThreePadClustThres(-1)
73 ,fGTCFilterShortDecPar(-1)
74 ,fGTCFilterLongDecPar(-1)
88 ,fFEEArr(new TObjArray(540))
89 ,fPTRArr(new TObjArray(6))
90 ,fGTUObj(new AliTRDCalDCSGTU())
93 // AliTRDCalDCS constructor
98 //_____________________________________________________________________________
99 AliTRDCalDCS::AliTRDCalDCS(const AliTRDCalDCS &cd)
101 ,fGNumberOfTimeBins(-1)
103 ,fGSingleHitThres(-1)
104 ,fGThreePadClustThres(-1)
106 ,fGTCFilterWeight(-1)
107 ,fGTCFilterShortDecPar(-1)
108 ,fGTCFilterLongDecPar(-1)
122 ,fFEEArr(new TObjArray(540))
123 ,fPTRArr(new TObjArray(6))
124 ,fGTUObj(new AliTRDCalDCSGTU())
127 // AliTRDCalDCS copy constructor
132 //_____________________________________________________________________________
133 AliTRDCalDCS &AliTRDCalDCS::operator=(const AliTRDCalDCS &cd)
136 // Assignment operator
138 if (&cd == this) return *this;
140 new (this) AliTRDCalDCS(cd);
144 //_____________________________________________________________________________
145 void AliTRDCalDCS::EvaluateGlobalParameters()
148 // Do an evaluation of all global parameters
151 for(Int_t i=0; i<540; i++) {
152 AliTRDCalDCSFEE *iDCSFEEObj;
153 iDCSFEEObj = GetCalDCSFEEObj(i);
154 if(iDCSFEEObj != NULL) {
155 if(iDCSFEEObj->GetStatusBit() == 0) {
156 // first, set the parameters of the first good ROC as global
157 fGNumberOfTimeBins = iDCSFEEObj->GetNumberOfTimeBins();
158 fGConfigTag = iDCSFEEObj->GetConfigTag();
159 fGSingleHitThres = iDCSFEEObj->GetSingleHitThres();
160 fGThreePadClustThres = iDCSFEEObj->GetThreePadClustThres();
161 fGSelNoZS = iDCSFEEObj->GetSelectiveNoZS();
162 fGTCFilterWeight = iDCSFEEObj->GetTCFilterWeight();
163 fGTCFilterShortDecPar = iDCSFEEObj->GetTCFilterShortDecPar();
164 fGTCFilterLongDecPar = iDCSFEEObj->GetTCFilterLongDecPar();
165 fGFastStatNoise = iDCSFEEObj->GetFastStatNoise();
166 fGConfigVersion = iDCSFEEObj->GetConfigVersion();
167 fGConfigName = iDCSFEEObj->GetConfigName();
168 fGFilterType = iDCSFEEObj->GetFilterType();
169 fGReadoutParam = iDCSFEEObj->GetReadoutParam();
170 fGTestPattern = iDCSFEEObj->GetTestPattern();
171 fGTrackletMode = iDCSFEEObj->GetTrackletMode();
172 fGTrackletDef = iDCSFEEObj->GetTrackletDef();
173 fGTriggerSetup = iDCSFEEObj->GetTriggerSetup();
174 fGAddOptions = iDCSFEEObj->GetAddOptions();
180 for(Int_t i=0; i<540; i++) {
181 AliTRDCalDCSFEE *iDCSFEEObj;
182 iDCSFEEObj = GetCalDCSFEEObj(i);
183 if(iDCSFEEObj != NULL) {
184 if(iDCSFEEObj->GetStatusBit() == 0) {
185 // second, if any of the other good chambers differ, set the global value to -1/""
186 if(fGNumberOfTimeBins != iDCSFEEObj->GetNumberOfTimeBins()) fGNumberOfTimeBins = -2;
187 if(fGConfigTag != iDCSFEEObj->GetConfigTag()) fGConfigTag = -2;
188 if(fGSingleHitThres != iDCSFEEObj->GetSingleHitThres()) fGSingleHitThres = -2;
189 if(fGThreePadClustThres != iDCSFEEObj->GetThreePadClustThres()) fGThreePadClustThres = -2;
190 if(fGSelNoZS != iDCSFEEObj->GetSelectiveNoZS()) fGSelNoZS = -2;
191 if(fGTCFilterWeight != iDCSFEEObj->GetTCFilterWeight()) fGTCFilterWeight = -2;
192 if(fGTCFilterShortDecPar != iDCSFEEObj->GetTCFilterShortDecPar()) fGTCFilterShortDecPar = -2;
193 if(fGTCFilterLongDecPar != iDCSFEEObj->GetTCFilterLongDecPar()) fGTCFilterLongDecPar = -2;
194 if(fGFastStatNoise != iDCSFEEObj->GetFastStatNoise()) fGFastStatNoise = -2;
195 if(fGConfigVersion != iDCSFEEObj->GetConfigVersion()) fGConfigVersion = "mixed";
196 if(fGConfigName != iDCSFEEObj->GetConfigName()) fGConfigName = "mixed";
197 if(fGFilterType != iDCSFEEObj->GetFilterType()) fGFilterType = "mixed";
198 if(fGReadoutParam != iDCSFEEObj->GetReadoutParam()) fGReadoutParam = "mixed";
199 if(fGTestPattern != iDCSFEEObj->GetTestPattern()) fGTestPattern = "mixed";
200 if(fGTrackletMode != iDCSFEEObj->GetTrackletMode()) fGTrackletMode = "mixed";
201 if(fGTrackletDef != iDCSFEEObj->GetTrackletDef()) fGTrackletDef = "mixed";
202 if(fGTriggerSetup != iDCSFEEObj->GetTriggerSetup()) fGTriggerSetup = "mixed";
203 if(fGAddOptions != iDCSFEEObj->GetAddOptions()) fGAddOptions = "mixed";