/[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.5 by mocchiut, Tue Sep 5 14:49:48 2006 UTC revision 1.8 by mocchiut, Fri Nov 17 10:08:10 2006 UTC
# Line 72  TArrayD *S4_paramfit(UInt_t atime, TSQLS Line 72  TArrayD *S4_paramfit(UInt_t atime, TSQLS
72    //    //
73    GL_S4_CALIB *glS4calib = new GL_S4_CALIB();    GL_S4_CALIB *glS4calib = new GL_S4_CALIB();
74    //    //
75      if ( !dbc->IsConnected() ) throw -504;
76    glS4calib->Query_GL_S4_CALIB(atime, dbc);    glS4calib->Query_GL_S4_CALIB(atime, dbc);
77    //    //
78    GL_ROOT *glroot = new GL_ROOT();    GL_ROOT *glroot = new GL_ROOT();
79      if ( !dbc->IsConnected() ) throw -504;
80    glroot->Query_GL_ROOT(glS4calib->ID_ROOT_L0,dbc);    glroot->Query_GL_ROOT(glS4calib->ID_ROOT_L0,dbc);
81    //    //
82    stringstream ftmpname;    stringstream ftmpname;
# Line 461  int S4Core(UInt_t run, TFile *file, TSQL Line 463  int S4Core(UInt_t run, TFile *file, TSQL
463      //      //
464      // prepare the timesync for the db      // prepare the timesync for the db
465      //      //
466        if ( !dbc->IsConnected() ) throw -504;
467      dbtime = new GL_TIMESYNC(runinfo->ID_ROOT_L0,"ID",dbc);      dbtime = new GL_TIMESYNC(runinfo->ID_ROOT_L0,"ID",dbc);
468      //      //
469      // Search in the DB the path and name of the LEVEL0 file to be processed.      // Search in the DB the path and name of the LEVEL0 file to be processed.
470      //      //
471        if ( !dbc->IsConnected() ) throw -504;
472      glroot->Query_GL_ROOT(runinfo->ID_ROOT_L0,dbc);      glroot->Query_GL_ROOT(runinfo->ID_ROOT_L0,dbc);
473      //      //
474      ftmpname.str("");      ftmpname.str("");
# Line 573  int S4Core(UInt_t run, TFile *file, TSQL Line 577  int S4Core(UInt_t run, TFile *file, TSQL
577        //        //
578        s4->Clear();        s4->Clear();
579        l0S4->GetEntry(re);        l0S4->GetEntry(re);
580        if (l0s4e->unpackError == 1)  continue;              if (l0s4e->unpackError == 0){
581        s4->S4adc = l0s4e->S4_DATA;          s4->S4adc = l0s4e->S4_DATA;
582            //
583            if ((l0s4e->S4_DATA) > 31 ){
584              s4->S4calibrated = ParamFit0*((l0s4e->S4_DATA)-32)+ParamFit1;
585            }else{
586              s4->S4calibrated = 0;
587            }
588          };
589        //        //
590        if ((l0s4e->S4_DATA) > 31 ){        s4->unpackError = l0s4e->unpackError;
         s4->S4calibrated = ParamFit0*((l0s4e->S4_DATA)-32)+ParamFit1;  
       }else{  
         s4->S4calibrated = 0;  
       }  
591        //        //
592        S4tr->Fill();        S4tr->Fill();
593        //            //    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.23