/[PAMELA software]/DarthVader/S4Level2/src/S4Core.cpp
ViewVC logotype

Diff of /DarthVader/S4Level2/src/S4Core.cpp

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

revision 1.4 by mocchiut, Tue Sep 5 13:21:12 2006 UTC revision 1.7 by mocchiut, Thu Nov 9 17:05:47 2006 UTC
# Line 451  int S4Core(UInt_t run, TFile *file, TSQL Line 451  int S4Core(UInt_t run, TFile *file, TSQL
451        sgnl = 0;        sgnl = 0;
452      };      };
453      //      //
454      // now you can access that variables using the RunInfo class this way runinfo->ID_REG_RUN      // now you can access that variables using the RunInfo class this way runinfo->ID_ROOT_L0
455      //      //
456      if ( runinfo->ID_ROOT_L0 == 0 ){      if ( runinfo->ID_ROOT_L0 == 0 ){
457        if ( debug ) printf("\n S4 - ERROR: no run with ID_RUN = %u \n\n Exiting... \n\n",idRun);        if ( debug ) printf("\n S4 - ERROR: no run with ID_RUN = %u \n\n Exiting... \n\n",idRun);
# Line 525  int S4Core(UInt_t run, TFile *file, TSQL Line 525  int S4Core(UInt_t run, TFile *file, TSQL
525        goto closeandexit;        goto closeandexit;
526      };      };
527      //      //
528      if ( runinfo->NEVENTS > nevents-1 ) {      if ( runinfo->EV_TO > nevents-1 ) {
529        if ( debug ) printf(" S4 - ERROR: too few entries in the S4 tree\n");        if ( debug ) printf(" S4 - ERROR: too few entries in the S4 tree\n");
530        l0File->Close();        l0File->Close();
531        code = -12;        code = -12;
# Line 573  int S4Core(UInt_t run, TFile *file, TSQL Line 573  int S4Core(UInt_t run, TFile *file, TSQL
573        //        //
574        s4->Clear();        s4->Clear();
575        l0S4->GetEntry(re);        l0S4->GetEntry(re);
576        if (l0s4e->unpackError == 1)  continue;              if (l0s4e->unpackError == 0){
577        s4->S4adc = l0s4e->S4_DATA;          s4->S4adc = l0s4e->S4_DATA;
578            //
579            if ((l0s4e->S4_DATA) > 31 ){
580              s4->S4calibrated = ParamFit0*((l0s4e->S4_DATA)-32)+ParamFit1;
581            }else{
582              s4->S4calibrated = 0;
583            }
584          };
585        //        //
586        if ((l0s4e->S4_DATA) > 31 ){        s4->unpackError = l0s4e->unpackError;
         s4->S4calibrated = ParamFit0*((l0s4e->S4_DATA)-32)+ParamFit1;  
       }else{  
         s4->S4calibrated = 0;  
       }  
587        //        //
588        S4tr->Fill();        S4tr->Fill();
589        //            //    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.23