49 DataObject*& refpObject) {
51 MsgStream log(
msgSvc(),
"RootDedxCalibDataCnv");
52 log<<MSG::DEBUG<<
"SetProperty"<<endreq;
55 { log<<MSG::ERROR<<
"unable to open files"<<endreq;
64 int runno, evtfrom, evtto;
66 TTree *rungtree = (TTree*)
m_inFile -> Get(
"runcalib");
71 if(rungtree->GetBranchStatus(
"evtfrom")){ rungtree ->
SetBranchAddress(
"evtfrom", &evtfrom); rungtree ->
SetBranchAddress(
"evtto", &evtto); }
else{ evtfrom = 0; evtto = 1000000000; }
72 int N = rungtree -> GetEntries();
73 tmpObject -> setrunNO(N);
78 tmpObject -> setrung(rungain,0);
79 tmpObject -> setrung(runmean,1);
80 tmpObject -> setrung(runno,2);
81 tmpObject -> setrung(runresol,3);
82 tmpObject -> setrung(evtfrom,4);
83 tmpObject -> setrung(evtto,5);
94 double iner_chi[1600];
95 double iner_gain[1600];
96 double iner_hits[1600];
97 double ip_eangle[1600];
99 double out_gain[1600];
100 double out_hits[1600];
102 TTree *ddgtree = (TTree*)
m_inFile -> Get(
"ddgcalib");
107 TBranch *bbb = ddgtree->FindBranch(
"Id_doca");
120 tmpObject -> setddg(ddg0[i],0,i);
121 tmpObject -> setddg(ddg1[i],1,i);
122 tmpObject -> setddg(ddg2[i],2,i);
123 tmpObject -> setddg(ddg3[i],3,i);
126 for(i=0; i<1600; i++){
137 tmpObject -> set_id_doca(id_doca[i],i);
138 tmpObject -> set_iner_chi(iner_chi[i],i);
139 tmpObject -> set_iner_gain(iner_gain[i],i);
140 tmpObject -> set_iner_hits(iner_hits[i],i);
141 tmpObject -> set_ip_eangle(ip_eangle[i],i);
142 tmpObject -> set_out_chi(out_chi[i],i);
143 tmpObject -> set_out_gain(out_gain[i],i);
144 tmpObject -> set_out_hits(out_hits[i],i);
154 TTree *entratree = (TTree*)
m_inFile -> Get(
"entracalib");
163 tmpObject -> setenta(entra0[i],0,i);
164 tmpObject -> setenta(entra1[i],1,i);
165 tmpObject -> setenta(entra2[i],2,i);
166 tmpObject -> setenta(entra3[i],3,i);
168 tmpObject -> set_enanglesize(engle_no);
169 for(i=0; i<engle_no; i++){
170 tmpObject -> set_enangle(engle[i],i);
180 double gcostheta[80];
183 TTree *ggstree = (TTree*)
m_inFile -> Get(
"ggscalib");
195 tmpObject -> setggs(ggs0[i],0,i);
196 tmpObject -> setggs(ggs1[i],1,i);
197 tmpObject -> setggs(ggs2[i],2,i);
198 tmpObject -> setggs(ggs3[i],3,i);
202 if(!bbb) gcostheta[i]=0;
207 log<<MSG::FATAL<<
"hadron entry is larger than 20, larger than designed"<<endreq;
208 return StatusCode::FAILURE;
213 for(i=0;i<hadron_entry;i++){
223 TTree *zdeptree = (TTree*)
m_inFile -> Get(
"zdepcalib");
231 tmpObject -> setzdep(zdep0[i],0,i);
232 tmpObject -> setzdep(zdep1[i],1,i);
233 tmpObject -> setzdep(zdep2[i],2,i);
234 tmpObject -> setzdep(zdep3[i],3,i);
239 double gt0[35],gdedx[35];
240 TTree *gaintree = (TTree*)
m_inFile -> Get(
"gaincalib");
247 tmpObject -> setgain(gain);
253 tmpObject->
set_t0(gt0[i],i);
259 TTree *resoltree = (TTree*)
m_inFile -> Get(
"resolcalib");
262 tmpObject -> setresol(resol);
266 TTree *wiregtree = (TTree*)
m_inFile -> Get(
"wiregcalib");
270 tmpObject -> setwireg(wireg[i],i);
275 TTree *layergtree = (TTree*)
m_inFile -> Get(
"layergcalib");
280 tmpObject -> setlayerg(layerg[i],i);
283 refpObject=tmpObject;
290 return StatusCode::SUCCESS;