| 235 |
Int_t ltp1 = 0; |
Int_t ltp1 = 0; |
| 236 |
Int_t ltp2 = 0; |
Int_t ltp2 = 0; |
| 237 |
Int_t ltp3 = 0; |
Int_t ltp3 = 0; |
| 238 |
Int_t uno = 1; |
// Int_t uno = 1; |
| 239 |
const char *niente = " "; |
// const char *niente = " "; |
| 240 |
GL_PARAM *glparam = new GL_PARAM(); |
GL_PARAM *glparam = new GL_PARAM(); |
| 241 |
GL_PARAM *glparam2 = new GL_PARAM(); |
GL_PARAM *glparam2 = new GL_PARAM(); |
| 242 |
GL_PARAM *glparam3 = new GL_PARAM(); |
GL_PARAM *glparam3 = new GL_PARAM(); |
| 272 |
ifstream in((glparam->PATH+glparam->NAME).Data(),ios::in); |
ifstream in((glparam->PATH+glparam->NAME).Data(),ios::in); |
| 273 |
if ( parerror<0 ) { |
if ( parerror<0 ) { |
| 274 |
code = parerror; |
code = parerror; |
| 275 |
//goto closeandexit; |
goto closeandexit; |
| 276 |
} |
} |
| 277 |
while(!in.eof()){ |
while(!in.eof()){ |
| 278 |
recqtime.resize(recqtime.size()+1); |
recqtime.resize(recqtime.size()+1); |
| 290 |
} |
} |
| 291 |
if ( verbose ) cout<<"We have read recovered data"<<endl; |
if ( verbose ) cout<<"We have read recovered data"<<endl; |
| 292 |
|
|
| 293 |
parerror=glparam->Query_GL_PARAM(1,301,(dbc-anni5)); // parameters stored in DB in GL_PRAM table |
|
| 294 |
if ( parerror<0 ) { |
// IGRF stuff moved inside run loop! |
| 295 |
code = parerror; |
|
|
goto closeandexit; |
|
|
}; |
|
|
ltp1 = (Int_t)(glparam->PATH+glparam->NAME).Length(); |
|
|
if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam->PATH+glparam->NAME).Data()); |
|
|
// |
|
|
parerror=glparam2->Query_GL_PARAM(1,301,dbc); // parameters stored in DB in GL_PRAM table |
|
|
if ( parerror<0 ) { |
|
|
code = parerror; |
|
|
goto closeandexit; |
|
|
}; |
|
|
ltp2 = (Int_t)(glparam2->PATH+glparam->NAME).Length(); |
|
|
if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam2->PATH+glparam2->NAME).Data()); |
|
|
// |
|
|
parerror=glparam3->Query_GL_PARAM(1,302,dbc); // parameters stored in DB in GL_PRAM table |
|
|
if ( parerror<0 ) { |
|
|
code = parerror; |
|
|
goto closeandexit; |
|
|
}; |
|
|
ltp3 = (Int_t)(glparam3->PATH+glparam2->NAME).Length(); |
|
|
if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam3->PATH+glparam3->NAME).Data()); |
|
|
// |
|
|
initize_((char *)(glparam->PATH+glparam->NAME).Data(),<p1,(char *)(glparam2->PATH+glparam2->NAME).Data(),<p2,(char *)(glparam3->PATH+glparam3->NAME).Data(),<p3); |
|
|
// |
|
|
// End IGRF stuff// |
|
|
// |
|
| 296 |
for (Int_t ip=0;ip<nz;ip++){ |
for (Int_t ip=0;ip<nz;ip++){ |
| 297 |
zin[ip] = tof->GetZTOF(tof->GetToFPlaneID(ip)); |
zin[ip] = tof->GetZTOF(tof->GetToFPlaneID(ip)); |
| 298 |
}; |
}; |
| 577 |
code = -12; |
code = -12; |
| 578 |
goto closeandexit; |
goto closeandexit; |
| 579 |
}; |
}; |
| 580 |
|
|
| 581 |
|
// |
| 582 |
|
// open IGRF files and do it only once if we are processing a full level2 file |
| 583 |
|
// |
| 584 |
|
if ( irun == 0 ){ |
| 585 |
|
if ( l0head->GetEntry(runinfo->EV_FROM) <= 0 ) throw -36; |
| 586 |
|
// |
| 587 |
|
// absolute time of first event of the run (it should not matter a lot) |
| 588 |
|
// |
| 589 |
|
ph = eh->GetPscuHeader(); |
| 590 |
|
atime = dbtime->DBabsTime(ph->GetOrbitalTime()); |
| 591 |
|
|
| 592 |
|
parerror=glparam->Query_GL_PARAM(atime-anni5,301,dbc); // parameters stored in DB in GL_PRAM table |
| 593 |
|
if ( parerror<0 ) { |
| 594 |
|
code = parerror; |
| 595 |
|
goto closeandexit; |
| 596 |
|
}; |
| 597 |
|
ltp1 = (Int_t)(glparam->PATH+glparam->NAME).Length(); |
| 598 |
|
if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam->PATH+glparam->NAME).Data()); |
| 599 |
|
// |
| 600 |
|
parerror=glparam2->Query_GL_PARAM(atime,301,dbc); // parameters stored in DB in GL_PRAM table |
| 601 |
|
if ( parerror<0 ) { |
| 602 |
|
code = parerror; |
| 603 |
|
goto closeandexit; |
| 604 |
|
}; |
| 605 |
|
ltp2 = (Int_t)(glparam2->PATH+glparam->NAME).Length(); |
| 606 |
|
if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam2->PATH+glparam2->NAME).Data()); |
| 607 |
|
// |
| 608 |
|
parerror=glparam3->Query_GL_PARAM(atime,302,dbc); // parameters stored in DB in GL_PRAM table |
| 609 |
|
if ( parerror<0 ) { |
| 610 |
|
code = parerror; |
| 611 |
|
goto closeandexit; |
| 612 |
|
}; |
| 613 |
|
ltp3 = (Int_t)(glparam3->PATH+glparam2->NAME).Length(); |
| 614 |
|
if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam3->PATH+glparam3->NAME).Data()); |
| 615 |
|
// |
| 616 |
|
initize_((char *)(glparam->PATH+glparam->NAME).Data(),<p1,(char *)(glparam2->PATH+glparam2->NAME).Data(),<p2,(char *)(glparam3->PATH+glparam3->NAME).Data(),<p3); |
| 617 |
|
// |
| 618 |
|
} |
| 619 |
|
// |
| 620 |
|
// End IGRF stuff// |
| 621 |
|
// |
| 622 |
|
|
| 623 |
// |
// |
| 624 |
// TTree *tp = (TTree*)l0File->Get("RunHeader"); |
// TTree *tp = (TTree*)l0File->Get("RunHeader"); |
| 625 |
// tp->SetBranchAddress("Header", &eH); |
// tp->SetBranchAddress("Header", &eH); |