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"
27 ClassImp(AliTRDCalDCS)
29 //_____________________________________________________________________________
30 AliTRDCalDCS::AliTRDCalDCS()
32 ,fGNumberOfTimeBins(-1)
35 ,fGThreePadClustThres(-1)
38 ,fGTCFilterShortDecPar(-1)
39 ,fGTCFilterLongDecPar(-1)
50 ,fFEEArr(new TObjArray(540))
51 ,fPTRArr(new TObjArray(6))
52 ,fGTUArr(new TObjArray(19))
55 // AliTRDCalDCS default constructor
59 //_____________________________________________________________________________
60 AliTRDCalDCS::AliTRDCalDCS(const Text_t *name, const Text_t *title)
62 ,fGNumberOfTimeBins(-1)
65 ,fGThreePadClustThres(-1)
68 ,fGTCFilterShortDecPar(-1)
69 ,fGTCFilterLongDecPar(-1)
80 ,fFEEArr(new TObjArray(540))
81 ,fPTRArr(new TObjArray(6))
82 ,fGTUArr(new TObjArray(19))
85 // AliTRDCalDCS constructor
89 //_____________________________________________________________________________
90 AliTRDCalDCS::AliTRDCalDCS(const AliTRDCalDCS &cd)
92 ,fGNumberOfTimeBins(-1)
95 ,fGThreePadClustThres(-1)
98 ,fGTCFilterShortDecPar(-1)
99 ,fGTCFilterLongDecPar(-1)
115 // AliTRDCalDCS copy constructor
119 //_____________________________________________________________________________
120 AliTRDCalDCS &AliTRDCalDCS::operator=(const AliTRDCalDCS &cd)
123 // Assignment operator
125 if (&cd == this) return *this;
127 new (this) AliTRDCalDCS(cd);
131 //_____________________________________________________________________________
132 void AliTRDCalDCS::EvaluateGlobalParameters()
134 for(Int_t i=0; i<540; i++) {
135 AliTRDCalDCSFEE *iDCSFEEObj;
136 iDCSFEEObj = GetCalDCSFEEObj(i);
137 if(iDCSFEEObj != NULL) {
138 if(iDCSFEEObj->GetStatusBit() == 0) {
139 // first, set the parameters of the first good ROC as global
140 fGNumberOfTimeBins = iDCSFEEObj->GetNumberOfTimeBins();
141 fGConfigTag = iDCSFEEObj->GetConfigTag();
142 fGSingleHitThres = iDCSFEEObj->GetSingleHitThres();
143 fGThreePadClustThres = iDCSFEEObj->GetThreePadClustThres();
144 fGSelNoZS = iDCSFEEObj->GetSelectiveNoZS();
145 fGTCFilterWeight = iDCSFEEObj->GetTCFilterWeight();
146 fGTCFilterShortDecPar = iDCSFEEObj->GetTCFilterShortDecPar();
147 fGTCFilterLongDecPar = iDCSFEEObj->GetTCFilterLongDecPar();
148 fGFastStatNoise = iDCSFEEObj->GetFastStatNoise();
149 fGConfigVersion = iDCSFEEObj->GetConfigVersion();
150 fGConfigName = iDCSFEEObj->GetConfigName();
151 fGFilterType = iDCSFEEObj->GetFilterType();
152 fGReadoutParam = iDCSFEEObj->GetReadoutParam();
153 fGTestPattern = iDCSFEEObj->GetTestPattern();
154 fGTrackletMode = iDCSFEEObj->GetTrackletMode();
155 fGTrackletDef = iDCSFEEObj->GetTrackletDef();
156 fGTriggerSetup = iDCSFEEObj->GetTriggerSetup();
157 fGAddOptions = iDCSFEEObj->GetAddOptions();
163 for(Int_t i=0; i<540; i++) {
164 AliTRDCalDCSFEE *iDCSFEEObj;
165 iDCSFEEObj = GetCalDCSFEEObj(i);
166 if(iDCSFEEObj != NULL) {
167 if(iDCSFEEObj->GetStatusBit() == 0) {
168 // second, if any of the other good chambers differ, set the global value to -1/""
169 if(fGNumberOfTimeBins != iDCSFEEObj->GetNumberOfTimeBins()) fGNumberOfTimeBins = -2;
170 if(fGConfigTag != iDCSFEEObj->GetConfigTag()) fGConfigTag = -2;
171 if(fGSingleHitThres != iDCSFEEObj->GetSingleHitThres()) fGSingleHitThres = -2;
172 if(fGThreePadClustThres != iDCSFEEObj->GetThreePadClustThres()) fGThreePadClustThres = -2;
173 if(fGSelNoZS != iDCSFEEObj->GetSelectiveNoZS()) fGSelNoZS = -2;
174 if(fGTCFilterWeight != iDCSFEEObj->GetTCFilterWeight()) fGTCFilterWeight = -2;
175 if(fGTCFilterShortDecPar != iDCSFEEObj->GetTCFilterShortDecPar()) fGTCFilterShortDecPar = -2;
176 if(fGTCFilterLongDecPar != iDCSFEEObj->GetTCFilterLongDecPar()) fGTCFilterLongDecPar = -2;
177 if(fGFastStatNoise != iDCSFEEObj->GetFastStatNoise()) fGFastStatNoise = -2;
178 if(fGConfigVersion != iDCSFEEObj->GetConfigVersion()) fGConfigVersion = "mixed";
179 if(fGConfigName != iDCSFEEObj->GetConfigName()) fGConfigName = "mixed";
180 if(fGFilterType != iDCSFEEObj->GetFilterType()) fGFilterType = "mixed";
181 if(fGReadoutParam != iDCSFEEObj->GetReadoutParam()) fGReadoutParam = "mixed";
182 if(fGTestPattern != iDCSFEEObj->GetTestPattern()) fGTestPattern = "mixed";
183 if(fGTrackletMode != iDCSFEEObj->GetTrackletMode()) fGTrackletMode = "mixed";
184 if(fGTrackletDef != iDCSFEEObj->GetTrackletDef()) fGTrackletDef = "mixed";
185 if(fGTriggerSetup != iDCSFEEObj->GetTriggerSetup()) fGTriggerSetup = "mixed";
186 if(fGAddOptions != iDCSFEEObj->GetAddOptions()) fGAddOptions = "mixed";