94 {
95
96 MsgStream log(
msgSvc(), name());
97
98
99
100 std::string fullPath = "/Calib/TofCal";
101 log << MSG::INFO<<"execute() fullPath = "<<fullPath<< endreq;
102
103 SmartDataPtr<CalibData::TofCalibData> btof(m_pCalibDataSvc, fullPath);
104
105 TFile *
f1 =
new TFile(
"TofCalConst.root",
"read");
106
107 TTree *btoftree = (TTree*)
f1 -> Get(
"BarTofPar");
108 double fCount[10];
109 double fLeft[5];
110 double fRight[5];
111 btoftree ->SetBranchAddress("FCounter0",&fCount[0]);
112 btoftree ->SetBranchAddress("FCounter1",&fCount[1]);
113 btoftree ->SetBranchAddress("FCounter2",&fCount[2]);
114 btoftree ->SetBranchAddress("FCounter3",&fCount[3]);
115 btoftree ->SetBranchAddress("FCounter4",&fCount[4]);
116 btoftree ->SetBranchAddress("FCounter5",&fCount[5]);
117 btoftree ->SetBranchAddress("FCounter6",&fCount[6]);
118 btoftree ->SetBranchAddress("FCounter7",&fCount[7]);
119 btoftree ->SetBranchAddress("FCounter8",&fCount[8]);
120 btoftree ->SetBranchAddress("FCounter9",&fCount[9]);
121 btoftree->SetBranchAddress("FLeft0",&fLeft[0]);
122 btoftree->SetBranchAddress("FLeft1",&fLeft[1]);
123 btoftree->SetBranchAddress("FLeft2",&fLeft[2]);
124 btoftree->SetBranchAddress("FLeft3",&fLeft[3]);
125 btoftree->SetBranchAddress("FLeft4",&fLeft[4]);
126 btoftree->SetBranchAddress("FRight0",&fRight[0]);
127 btoftree->SetBranchAddress("FRight1",&fRight[1]);
128 btoftree->SetBranchAddress("FRight2",&fRight[2]);
129 btoftree->SetBranchAddress("FRight3",&fRight[3]);
130 btoftree->SetBranchAddress("FRight4",&fRight[4]);
131
132
133
134 for(int i =0;i<176;i++) {
136
137 double bAtten0 = btof->getBTofAtten(i,0);
138 double bAtten1 = btof->getBTofAtten(i,1);
139 double bP0 = btof->getBTofPleft(i,0);
140 double bP1 = btof->getBTofPleft(i,1);
141 double bP2 = btof->getBTofPleft(i,2);
142 double bP3 = btof->getBTofPleft(i,3);
143 double bP4 = btof->getBTofPleft(i,4);
144 double bP5 = btof->getBTofPleft(i,5);
145 double bP10 = btof->getBTofPright(i,0);
146
147
148 double bSpeed0 = btof->getBTofSpeed(i,0);
149 double bSpeed1 = btof->getBTofSpeed(i,1);
150
151
152
153
154
155
156 double fCount1[10],fLeft1[5],fRight1[5];
157 for(int j=0;j<10;j++){
158 fCount1[j]=btof->getBTofFcounter(i,j);
159 if(fCount1[j]!=fCount[j]) std::cout<<"error error error error"<<std::endl;
160
161
162 }
163
164 for(int j=0;j<5;j++){
165 fLeft1[j]=btof->getBTofFleft(i,j);
166 if(fLeft1[j]!=fLeft[j]) std::cout<<"error error error error"<<std::endl;
167
168 }
169
170
171 for(int j=0;j<5;j++){
172 fRight1[j]=btof->getBTofFright(i,j);
173 if( fRight1[j]!= fRight[j]) std::cout<<"error error error error"<<std::endl;
174
175 }
176
177
178
179
180
181
182
183
184
185
186
187
188 }
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
268
269 for(int i=0;i<8;i++){
270 sigma[i]=btof->getBTofSigmaCorr(0,i);
271 std::cout<<
" sigma["<<i<<
"]="<<
sigma[i];
272 }
273 std::cout<<"\n";
274
275 std::cout<<" btof->getRunBegin()"<<btof->getRunBegin(0);
276 std::cout<<"btof->getRunEnd()"<<btof->getRunEnd(0);
277 std::cout<<"btof->getVersion()"<<btof->getVersion(0);
278 std::cout<<"btof->getQCorr()"<<btof->getQCorr(0);
279 std::cout<<"btof->getMisLable()"<<btof->getMisLable(0);
280 std::cout<<"btof->getQElec()"<<btof->getQElec(0);
281 for(int i=0;i<5;i++){
282 std::cout<<"i==="<<i<<std::endl;
283 std::cout<<" btof->getBrEast(int index)"<<btof->getBrEast(0,i);
284 std::cout<<" btof->getBrWest(int index)"<<btof->getBrWest(0,i);
285 std::cout<<" btof->getEndcap(int index)"<<btof->getEndcap(0,i);
286 }
287
288
289
290 return StatusCode::SUCCESS;
291}