291 {
292
293 MsgStream log(
msgSvc(),
"RootDedxCalibDataCnv");
294
295
297 if(!sc)
298 { log<<MSG::ERROR<<"unable to open files"<<endreq;
299 }
300
301 int i;
303
304 double rungain;
305 double runmean;
306 double runno;
307 double runresol;
308 TTree *rungcalibtree = new TTree("rungcalib", "rungCalib");
309 rungcalibtree -> Branch("rungain", &rungain, "S/D");
310 rungcalibtree -> Branch("runmean", &runmean, "S/D");
311 rungcalibtree -> Branch("runno", &runno, "S/D");
312 rungcalibtree -> Branch("runresol", &runresol, "S/D");
314 for(i=0; i<N; i++){
315 rungain = tmpObject->
getrung(0,i);
316 runmean = tmpObject->
getrung(1,i);
317 runno = tmpObject->
getrung(2,i);
318 runresol = tmpObject->
getrung(3,i);
319 rungcalibtree -> Fill();
320 }
321
322
323
324
325 double ddg0;
326 double ddg1;
327 double ddg2;
328 double ddg3;
329 TTree *ddgcalibtree = new TTree("ddgcalib", "ddgCalib");
330 ddgcalibtree -> Branch("ddg0", &ddg0, "S/D");
331 ddgcalibtree -> Branch("ddg1", &ddg1, "S/D");
332 ddgcalibtree -> Branch("ddg2", &ddg2, "S/D");
333 ddgcalibtree -> Branch("ddg3", &ddg3, "S/D");
334 for(i=0; i<43; i++){
335 ddg0 = tmpObject->
getddg(0,i);
336 ddg1 = tmpObject->
getddg(1,i);
337 ddg2 = tmpObject->
getddg(2,i);
338 ddg3 = tmpObject->
getddg(3,i);
339 ddgcalibtree -> Fill();
340 }
341
342
343 double ggs0;
344 double ggs1;
345 double ggs2;
346 double ggs3;
347 TTree *ggscalibtree = new TTree("ggscalib", "ggsCalib");
348 ggscalibtree -> Branch("ggs0", &ggs0, "S/D");
349 ggscalibtree -> Branch("ggs1", &ggs1, "S/D");
350 ggscalibtree -> Branch("ggs2", &ggs2, "S/D");
351 ggscalibtree -> Branch("ggs3", &ggs3, "S/D");
352 for(i=0; i<43; i++){
353 ggs0 = tmpObject->
getggs(0,i);
354 ggs1 = tmpObject->
getggs(1,i);
355 ggs2 = tmpObject->
getggs(2,i);
356 ggs3 = tmpObject->
getggs(3,i);
357 ggscalibtree -> Fill();
358 }
359
360
361 double zdep0;
362 double zdep1;
363 double zdep2;
364 double zdep3;
365 TTree *zdepcalibtree = new TTree("zdepcalib", "zdepCalib");
366 zdepcalibtree -> Branch("zdep0", &zdep0, "S/D");
367 zdepcalibtree -> Branch("zdep1", &zdep1, "S/D");
368 zdepcalibtree -> Branch("zdep2", &zdep2, "S/D");
369 zdepcalibtree -> Branch("zdep3", &zdep3, "S/D");
370 for(i=0; i<43; i++){
371 zdep0 = tmpObject->
getzdep(0,i);
372 zdep1 = tmpObject->
getzdep(1,i);
373 zdep2 = tmpObject->
getzdep(2,i);
374 zdep3 = tmpObject->
getzdep(3,i);
375 zdepcalibtree -> Fill();
376 }
377
378
379 double enta0;
380 double enta1;
381 double enta2;
382 double enta3;
383 TTree *entacalibtree = new TTree("entacalib", "entaCalib");
384 entacalibtree -> Branch("enta0", &enta0, "S/D");
385 entacalibtree -> Branch("enta1", &enta1, "S/D");
386 entacalibtree -> Branch("enta2", &enta2, "S/D");
387 entacalibtree -> Branch("enta3", &enta3, "S/D");
388 for(i=0; i<43; i++){
389 enta0 = tmpObject->
getenta(0,i);
390 enta1 = tmpObject->
getenta(1,i);
391 enta2 = tmpObject->
getenta(2,i);
392 enta3 = tmpObject->
getenta(3,i);
393 entacalibtree -> Fill();
394 }
395
396
397
398
399 double gain;
400 TTree *gaintree = new TTree("gaincalib", "gainCalib");
401 gaintree -> Branch("gain", &gain, "S/D");
403 gaintree -> Fill();
404
405
406 double resol;
407 TTree *resoltree = new TTree("resolcalib", "resolCalib");
408 resoltree -> Branch("resol", &resol, "S/D");
410 resoltree -> Fill();
411
412
413
414 double wireg;
415 TTree *wiregcalibtree = new TTree("wiregcalib", "wiregCalib");
416 wiregcalibtree -> Branch("wireg", &wireg, "S/D");
417 for(i=0; i<6796; i++){
419 wiregcalibtree -> Fill();
420 }
421
422
423 double layerg;
424 TTree *layergcalibtree = new TTree("layergcalib", "layergCalib");
425 layergcalibtree -> Branch("layerg", &layerg, "S/D");
426 for(i=0; i<43; i++){
428 layergcalibtree -> Fill();
429 }
430
431
432 rungcalibtree -> Write();
433 ddgcalibtree -> Write();
434 ggscalibtree -> Write();
435 zdepcalibtree -> Write();
436 entacalibtree -> Write();
437 gaintree -> Write();
438 resoltree -> Write();
439 wiregcalibtree -> Write();
440 layergcalibtree -> Write();
441
442 delete rungcalibtree;
443 delete ddgcalibtree;
444 delete ggscalibtree;
445 delete zdepcalibtree;
446 delete entacalibtree;
447 delete gaintree;
448 delete resoltree;
449 delete wiregcalibtree;
450 delete layergcalibtree;
452 log<<MSG::INFO<<"successfully create RootFile"<<endreq;
453 return sc;
454
455}
double getenta(int i, int j) const
double getzdep(int i, int j) const
double getrung(int i, int j) const
double getlayerg(int i) const
double getwireg(int i) const
double getddg(int i, int j) const
double getggs(int i, int j) const
virtual StatusCode openWrite(const std::string &fname)