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++)
135 {
137
138 double bAtten0 = btof->getBTofAtten(i,0);
139 double bAtten1 = btof->getBTofAtten(i,1);
140 double bP0 = btof->getBTofPleft(i,0);
141 double bP1 = btof->getBTofPleft(i,1);
142 double bP2 = btof->getBTofPleft(i,2);
143 double bP3 = btof->getBTofPleft(i,3);
144 double bP4 = btof->getBTofPleft(i,4);
145 double bP5 = btof->getBTofPleft(i,5);
146 double bP10 = btof->getBTofPright(i,0);
147
148
149 double bSpeed0 = btof->getBTofSpeed(i,0);
150 double bSpeed1 = btof->getBTofSpeed(i,1);
151
152
153
154
155
156
157 double fCount1[10],fLeft1[5],fRight1[5];
158 for(int j=0;j<10;j++){
159 fCount1[j]=btof->getBTofFcounter(i,j);
160 if(fCount1[j]!=fCount[j]) std::cout<<"error error error error"<<std::endl;
161
162
163 }
164
165 for(int j=0;j<5;j++){
166 fLeft1[j]=btof->getBTofFleft(i,j);
167 if(fLeft1[j]!=fLeft[j]) std::cout<<"error error error error"<<std::endl;
168
169 }
170
171
172 for(int j=0;j<5;j++){
173 fRight1[j]=btof->getBTofFright(i,j);
174 if( fRight1[j]!= fRight[j]) std::cout<<"error error error error"<<std::endl;
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
267
268 double sigma[8];
269
270 for(int i=0;i<8;i++){
271 sigma[i]=btof->getBTofSigmaCorr(i);
272 std::cout<<" sigma["<<i<<"]="<< sigma[i];
273}
274 std::cout<<"\n";
275
276 std::cout<<"t0offset0 ="<< btof->getBTofOffset(0)<<" t0offset1 ="<< btof->getBTofOffset(1)<<std::endl;
277
278std::cout<<" btof->getRunBegin()"<<btof->getRunBegin();
279 std::cout<<"btof->getRunEnd()"<<btof->getRunEnd();
280 std::cout<<"btof->getVersion()"<<btof->getVersion();
281 std::cout<<"btof->getQCorr()"<<btof->getQCorr();
282 std::cout<<"btof->getMisLable()"<<btof->getMisLable();
283 std::cout<<"btof->getQElec()"<<btof->getQElec();
284 for(int i=0;i<5;i++){
285 std::cout<<"i==="<<i<<std::endl;
286 std::cout<<" btof->getBrEast(int index)"<<btof->getBrEast(i);
287 std::cout<<" btof->getBrWest(int index)"<<btof->getBrWest(i);
288 std::cout<<" btof->getEndcap(int index)"<<btof->getEndcap(i);
289}
290
291
292
293 return StatusCode::SUCCESS;
294}