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