| 591 |
// |
// |
| 592 |
// open IGRF files and do it only once if we are processing a full level2 file |
// open IGRF files and do it only once if we are processing a full level2 file |
| 593 |
// |
// |
| 594 |
if ( reprocall && !igrfloaded ){ |
if ( !igrfloaded ){ |
| 595 |
|
|
| 596 |
if ( l0head->GetEntry(runinfo->EV_FROM) > 0 ){ |
if ( l0head->GetEntry(runinfo->EV_FROM) > 0 ){ |
| 597 |
igrfloaded = true; |
igrfloaded = true; |
| 598 |
// |
// |
| 599 |
// absolute time of first event of the run (it should not matter a lot) |
// absolute time of first event of the run (it should not matter a lot) |
| 600 |
// |
// |
| 601 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
| 602 |
atime = dbtime->DBabsTime(ph->GetOrbitalTime()); |
atime = dbtime->DBabsTime(ph->GetOrbitalTime()); |
| 603 |
|
|
| 604 |
parerror=glparam->Query_GL_PARAM(atime-anni5,301,dbc); // parameters stored in DB in GL_PRAM table |
parerror=glparam->Query_GL_PARAM(atime-anni5,301,dbc); // parameters stored in DB in GL_PRAM table |
| 605 |
if ( parerror<0 ) { |
if ( parerror<0 ) { |
| 606 |
code = parerror; |
code = parerror; |
| 607 |
goto closeandexit; |
goto closeandexit; |
| 608 |
} |
} |
| 609 |
ltp1 = (Int_t)(glparam->PATH+glparam->NAME).Length(); |
ltp1 = (Int_t)(glparam->PATH+glparam->NAME).Length(); |
| 610 |
if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam->PATH+glparam->NAME).Data()); |
if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam->PATH+glparam->NAME).Data()); |
| 611 |
// |
// |
| 612 |
parerror=glparam2->Query_GL_PARAM(atime,301,dbc); // parameters stored in DB in GL_PRAM table |
parerror=glparam2->Query_GL_PARAM(atime,301,dbc); // parameters stored in DB in GL_PRAM table |
| 613 |
if ( parerror<0 ) { |
if ( parerror<0 ) { |
| 614 |
code = parerror; |
code = parerror; |
| 615 |
goto closeandexit; |
goto closeandexit; |
| 616 |
} |
} |
| 617 |
ltp2 = (Int_t)(glparam2->PATH+glparam2->NAME).Length(); |
ltp2 = (Int_t)(glparam2->PATH+glparam2->NAME).Length(); |
| 618 |
if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam2->PATH+glparam2->NAME).Data()); |
if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam2->PATH+glparam2->NAME).Data()); |
| 619 |
// |
// |
| 620 |
parerror=glparam3->Query_GL_PARAM(atime,302,dbc); // parameters stored in DB in GL_PRAM table |
parerror=glparam3->Query_GL_PARAM(atime,302,dbc); // parameters stored in DB in GL_PRAM table |
| 621 |
if ( parerror<0 ) { |
if ( parerror<0 ) { |
| 622 |
code = parerror; |
code = parerror; |
| 623 |
goto closeandexit; |
goto closeandexit; |
| 624 |
} |
} |
| 625 |
ltp3 = (Int_t)(glparam3->PATH+glparam3->NAME).Length(); |
ltp3 = (Int_t)(glparam3->PATH+glparam3->NAME).Length(); |
| 626 |
if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam3->PATH+glparam3->NAME).Data()); |
if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam3->PATH+glparam3->NAME).Data()); |
| 627 |
// |
// |
| 628 |
initize_((char *)(glparam->PATH+glparam->NAME).Data(),<p1,(char *)(glparam2->PATH+glparam2->NAME).Data(),<p2,(char *)(glparam3->PATH+glparam3->NAME).Data(),<p3); |
initize_((char *)(glparam->PATH+glparam->NAME).Data(),<p1,(char *)(glparam2->PATH+glparam2->NAME).Data(),<p2,(char *)(glparam3->PATH+glparam3->NAME).Data(),<p3); |
| 629 |
// |
// |
| 630 |
} |
} |
| 631 |
} |
} |
| 632 |
// |
// |
| 847 |
// |
// |
| 848 |
tof->Clear(); |
tof->Clear(); |
| 849 |
// |
// |
| 850 |
if ( ttof->GetEntry(itr) <= 0 ) throw -36; |
if ( ttof->GetEntry(itr) <= 0 ){ |
| 851 |
|
if ( verbose ) printf(" problems with tof tree entries... entry = %i in Level2 file\n",itr); |
| 852 |
|
if ( verbose ) printf(" nobefrun %u re %u evfrom %u jumped %u reprocall %i \n",nobefrun,re,evfrom,jumped,reprocall); |
| 853 |
|
throw -36; |
| 854 |
|
} |
| 855 |
// |
// |
| 856 |
}; |
}; |
| 857 |
// |
// |