Line data Source code
1 : /**************************************************************************
2 : * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 : * *
4 : * Author: The ALICE Off-line Project. *
5 : * Contributors are mentioned in the code where appropriate. *
6 : * *
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 : **************************************************************************/
15 :
16 : /* $Id: AliTRDCalDCS.cxx 18952 2007-06-08 11:36:12Z cblume $ */
17 :
18 : ///////////////////////////////////////////////////////////////////////////////
19 : // //
20 : // TRD calibration class for TRD DCS parameters //
21 : // //
22 : ///////////////////////////////////////////////////////////////////////////////
23 :
24 : #include "AliTRDCalDCS.h"
25 : #include "AliTRDCalDCSFEE.h"
26 : #include "AliTRDCalDCSGTU.h"
27 :
28 48 : ClassImp(AliTRDCalDCS)
29 :
30 : //_____________________________________________________________________________
31 : AliTRDCalDCS::AliTRDCalDCS()
32 0 : :TNamed()
33 0 : ,fGNumberOfTimeBins(-1)
34 0 : ,fGConfigTag(-1)
35 0 : ,fGSingleHitThres(-1)
36 0 : ,fGThreePadClustThres(-1)
37 0 : ,fGSelNoZS(-1)
38 0 : ,fGTCFilterWeight(-1)
39 0 : ,fGTCFilterShortDecPar(-1)
40 0 : ,fGTCFilterLongDecPar(-1)
41 0 : ,fGFastStatNoise(-1)
42 0 : ,fGConfigVersion(0)
43 0 : ,fGConfigName(0)
44 0 : ,fGFilterType(0)
45 0 : ,fGReadoutParam(0)
46 0 : ,fGTestPattern(0)
47 0 : ,fGTrackletMode(0)
48 0 : ,fGTrackletDef(0)
49 0 : ,fGTriggerSetup(0)
50 0 : ,fGAddOptions(0)
51 0 : ,fRunType("")
52 0 : ,fStartTime(0)
53 0 : ,fEndTime(0)
54 0 : ,fFEEArr(0)
55 0 : ,fPTRArr(0)
56 0 : ,fGTUObj(0)
57 0 : {
58 : //
59 : // AliTRDCalDCS default constructor
60 : //
61 :
62 0 : }
63 :
64 : //_____________________________________________________________________________
65 : AliTRDCalDCS::AliTRDCalDCS(const Text_t *name, const Text_t *title)
66 0 : :TNamed(name,title)
67 0 : ,fGNumberOfTimeBins(-1)
68 0 : ,fGConfigTag(-1)
69 0 : ,fGSingleHitThres(-1)
70 0 : ,fGThreePadClustThres(-1)
71 0 : ,fGSelNoZS(-1)
72 0 : ,fGTCFilterWeight(-1)
73 0 : ,fGTCFilterShortDecPar(-1)
74 0 : ,fGTCFilterLongDecPar(-1)
75 0 : ,fGFastStatNoise(-1)
76 0 : ,fGConfigVersion(0)
77 0 : ,fGConfigName(0)
78 0 : ,fGFilterType(0)
79 0 : ,fGReadoutParam(0)
80 0 : ,fGTestPattern(0)
81 0 : ,fGTrackletMode(0)
82 0 : ,fGTrackletDef(0)
83 0 : ,fGTriggerSetup(0)
84 0 : ,fGAddOptions(0)
85 0 : ,fRunType("")
86 0 : ,fStartTime(0)
87 0 : ,fEndTime(0)
88 0 : ,fFEEArr(new TObjArray(540))
89 0 : ,fPTRArr(new TObjArray(6))
90 0 : ,fGTUObj(new AliTRDCalDCSGTU())
91 0 : {
92 : //
93 : // AliTRDCalDCS constructor
94 : //
95 :
96 0 : }
97 :
98 : //_____________________________________________________________________________
99 : AliTRDCalDCS::AliTRDCalDCS(const AliTRDCalDCS &cd)
100 0 : :TNamed(cd)
101 0 : ,fGNumberOfTimeBins(-1)
102 0 : ,fGConfigTag(-1)
103 0 : ,fGSingleHitThres(-1)
104 0 : ,fGThreePadClustThres(-1)
105 0 : ,fGSelNoZS(-1)
106 0 : ,fGTCFilterWeight(-1)
107 0 : ,fGTCFilterShortDecPar(-1)
108 0 : ,fGTCFilterLongDecPar(-1)
109 0 : ,fGFastStatNoise(-1)
110 0 : ,fGConfigVersion(0)
111 0 : ,fGConfigName(0)
112 0 : ,fGFilterType(0)
113 0 : ,fGReadoutParam(0)
114 0 : ,fGTestPattern(0)
115 0 : ,fGTrackletMode(0)
116 0 : ,fGTrackletDef(0)
117 0 : ,fGTriggerSetup(0)
118 0 : ,fGAddOptions(0)
119 0 : ,fRunType("")
120 0 : ,fStartTime(0)
121 0 : ,fEndTime(0)
122 0 : ,fFEEArr(new TObjArray(540))
123 0 : ,fPTRArr(new TObjArray(6))
124 0 : ,fGTUObj(new AliTRDCalDCSGTU())
125 0 : {
126 : //
127 : // AliTRDCalDCS copy constructor
128 : //
129 :
130 0 : }
131 :
132 : //_____________________________________________________________________________
133 : AliTRDCalDCS &AliTRDCalDCS::operator=(const AliTRDCalDCS &cd)
134 : {
135 : //
136 : // Assignment operator
137 : //
138 0 : if (&cd == this) return *this;
139 :
140 0 : new (this) AliTRDCalDCS(cd);
141 0 : return *this;
142 0 : }
143 :
144 : //_____________________________________________________________________________
145 : void AliTRDCalDCS::EvaluateGlobalParameters()
146 : {
147 : //
148 : // Do an evaluation of all global parameters
149 : //
150 :
151 0 : for(Int_t i=0; i<540; i++) {
152 : AliTRDCalDCSFEE *iDCSFEEObj;
153 0 : iDCSFEEObj = GetCalDCSFEEObj(i);
154 0 : if(iDCSFEEObj != NULL) {
155 0 : if(iDCSFEEObj->GetStatusBit() == 0) {
156 : // first, set the parameters of the first good ROC as global
157 0 : fGNumberOfTimeBins = iDCSFEEObj->GetNumberOfTimeBins();
158 0 : fGConfigTag = iDCSFEEObj->GetConfigTag();
159 0 : fGSingleHitThres = iDCSFEEObj->GetSingleHitThres();
160 0 : fGThreePadClustThres = iDCSFEEObj->GetThreePadClustThres();
161 0 : fGSelNoZS = iDCSFEEObj->GetSelectiveNoZS();
162 0 : fGTCFilterWeight = iDCSFEEObj->GetTCFilterWeight();
163 0 : fGTCFilterShortDecPar = iDCSFEEObj->GetTCFilterShortDecPar();
164 0 : fGTCFilterLongDecPar = iDCSFEEObj->GetTCFilterLongDecPar();
165 0 : fGFastStatNoise = iDCSFEEObj->GetFastStatNoise();
166 0 : fGConfigVersion = iDCSFEEObj->GetConfigVersion();
167 0 : fGConfigName = iDCSFEEObj->GetConfigName();
168 0 : fGFilterType = iDCSFEEObj->GetFilterType();
169 0 : fGReadoutParam = iDCSFEEObj->GetReadoutParam();
170 0 : fGTestPattern = iDCSFEEObj->GetTestPattern();
171 0 : fGTrackletMode = iDCSFEEObj->GetTrackletMode();
172 0 : fGTrackletDef = iDCSFEEObj->GetTrackletDef();
173 0 : fGTriggerSetup = iDCSFEEObj->GetTriggerSetup();
174 0 : fGAddOptions = iDCSFEEObj->GetAddOptions();
175 0 : break;
176 : }
177 : }
178 0 : }
179 :
180 0 : for(Int_t i=0; i<540; i++) {
181 : AliTRDCalDCSFEE *iDCSFEEObj;
182 0 : iDCSFEEObj = GetCalDCSFEEObj(i);
183 0 : if(iDCSFEEObj != NULL) {
184 0 : if(iDCSFEEObj->GetStatusBit() == 0) {
185 : // second, if any of the other good chambers differ, set the global value to -1/""
186 0 : if(fGNumberOfTimeBins != iDCSFEEObj->GetNumberOfTimeBins()) fGNumberOfTimeBins = -2;
187 0 : if(fGConfigTag != iDCSFEEObj->GetConfigTag()) fGConfigTag = -2;
188 0 : if(fGSingleHitThres != iDCSFEEObj->GetSingleHitThres()) fGSingleHitThres = -2;
189 0 : if(fGThreePadClustThres != iDCSFEEObj->GetThreePadClustThres()) fGThreePadClustThres = -2;
190 0 : if(fGSelNoZS != iDCSFEEObj->GetSelectiveNoZS()) fGSelNoZS = -2;
191 0 : if(fGTCFilterWeight != iDCSFEEObj->GetTCFilterWeight()) fGTCFilterWeight = -2;
192 0 : if(fGTCFilterShortDecPar != iDCSFEEObj->GetTCFilterShortDecPar()) fGTCFilterShortDecPar = -2;
193 0 : if(fGTCFilterLongDecPar != iDCSFEEObj->GetTCFilterLongDecPar()) fGTCFilterLongDecPar = -2;
194 0 : if(fGFastStatNoise != iDCSFEEObj->GetFastStatNoise()) fGFastStatNoise = -2;
195 0 : if(fGConfigVersion != iDCSFEEObj->GetConfigVersion()) fGConfigVersion = "mixed";
196 0 : if(fGConfigName != iDCSFEEObj->GetConfigName()) fGConfigName = "mixed";
197 0 : if(fGFilterType != iDCSFEEObj->GetFilterType()) fGFilterType = "mixed";
198 0 : if(fGReadoutParam != iDCSFEEObj->GetReadoutParam()) fGReadoutParam = "mixed";
199 0 : if(fGTestPattern != iDCSFEEObj->GetTestPattern()) fGTestPattern = "mixed";
200 0 : if(fGTrackletMode != iDCSFEEObj->GetTrackletMode()) fGTrackletMode = "mixed";
201 0 : if(fGTrackletDef != iDCSFEEObj->GetTrackletDef()) fGTrackletDef = "mixed";
202 0 : if(fGTriggerSetup != iDCSFEEObj->GetTriggerSetup()) fGTriggerSetup = "mixed";
203 0 : if(fGAddOptions != iDCSFEEObj->GetAddOptions()) fGAddOptions = "mixed";
204 : }
205 : }
206 : }
207 0 : }
208 :
209 :
|