/[PAMELA software]/DarthVader/OrbitalInfo/src/OrbitalInfoCore.cpp
ViewVC logotype

Diff of /DarthVader/OrbitalInfo/src/OrbitalInfoCore.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.65 by mocchiut, Fri Jan 17 09:54:30 2014 UTC revision 1.68 by mocchiut, Wed Feb 26 13:01:05 2014 UTC
# Line 122  int OrbitalInfoCore(UInt_t run, TFile *f Line 122  int OrbitalInfoCore(UInt_t run, TFile *f
122    TTree *OrbitalInfotrclone = 0;    TTree *OrbitalInfotrclone = 0;
123    Bool_t reproc = false;    Bool_t reproc = false;
124    Bool_t reprocall = false;    Bool_t reprocall = false;
125      Bool_t igrfloaded = false;
126    UInt_t nobefrun = 0;    UInt_t nobefrun = 0;
127    UInt_t noaftrun = 0;    UInt_t noaftrun = 0;
128    UInt_t numbofrun = 0;    UInt_t numbofrun = 0;
# Line 590  int OrbitalInfoCore(UInt_t run, TFile *f Line 591  int OrbitalInfoCore(UInt_t run, TFile *f
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 ( irun == 0 ){      if ( !igrfloaded ){
595        if ( l0head->GetEntry(runinfo->EV_FROM) <= 0 ) throw -36;  
596        //        if ( l0head->GetEntry(runinfo->EV_FROM) > 0 ){
597        // absolute time of first event of the run (it should not matter a lot)          igrfloaded = true;
598        //          //
599        ph = eh->GetPscuHeader();          // absolute time of first event of the run (it should not matter a lot)
600        atime = dbtime->DBabsTime(ph->GetOrbitalTime());          //
601                  ph = eh->GetPscuHeader();
602        parerror=glparam->Query_GL_PARAM(atime-anni5,301,dbc); // parameters stored in DB in GL_PRAM table            atime = dbtime->DBabsTime(ph->GetOrbitalTime());
603        if ( parerror<0 ) {          
604          code = parerror;          parerror=glparam->Query_GL_PARAM(atime-anni5,301,dbc); // parameters stored in DB in GL_PRAM table  
605          goto closeandexit;          if ( parerror<0 ) {
606      };            code = parerror;
607        ltp1 = (Int_t)(glparam->PATH+glparam->NAME).Length();            goto closeandexit;
608        if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam->PATH+glparam->NAME).Data());          }
609        //          ltp1 = (Int_t)(glparam->PATH+glparam->NAME).Length();
610        parerror=glparam2->Query_GL_PARAM(atime,301,dbc); // parameters stored in DB in GL_PRAM table            if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam->PATH+glparam->NAME).Data());
611        if ( parerror<0 ) {          //
612          code = parerror;          parerror=glparam2->Query_GL_PARAM(atime,301,dbc); // parameters stored in DB in GL_PRAM table  
613          goto closeandexit;          if ( parerror<0 ) {
614        };            code = parerror;
615        ltp2 = (Int_t)(glparam2->PATH+glparam2->NAME).Length();            goto closeandexit;
616        if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam2->PATH+glparam2->NAME).Data());          }
617        //          ltp2 = (Int_t)(glparam2->PATH+glparam2->NAME).Length();
618        parerror=glparam3->Query_GL_PARAM(atime,302,dbc); // parameters stored in DB in GL_PRAM table          if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam2->PATH+glparam2->NAME).Data());
619        if ( parerror<0 ) {          //
620          code = parerror;          parerror=glparam3->Query_GL_PARAM(atime,302,dbc); // parameters stored in DB in GL_PRAM table
621          goto closeandexit;          if ( parerror<0 ) {
622        };            code = parerror;
623        ltp3 = (Int_t)(glparam3->PATH+glparam3->NAME).Length();            goto closeandexit;
624        if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam3->PATH+glparam3->NAME).Data());          }
625        //          ltp3 = (Int_t)(glparam3->PATH+glparam3->NAME).Length();
626        initize_((char *)(glparam->PATH+glparam->NAME).Data(),&ltp1,(char *)(glparam2->PATH+glparam2->NAME).Data(),&ltp2,(char *)(glparam3->PATH+glparam3->NAME).Data(),&ltp3);          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(),&ltp1,(char *)(glparam2->PATH+glparam2->NAME).Data(),&ltp2,(char *)(glparam3->PATH+glparam3->NAME).Data(),&ltp3);
629            //
630          }
631      }      }
632      //      //
633      // End IGRF stuff//      // End IGRF stuff//
# Line 843  int OrbitalInfoCore(UInt_t run, TFile *f Line 847  int OrbitalInfoCore(UInt_t run, TFile *f
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        //        //

Legend:
Removed from v.1.65  
changed lines
  Added in v.1.68

  ViewVC Help
Powered by ViewVC 1.1.23