/[PAMELA software]/DarthVader/CalorimeterLevel2/src/CaloProcessing.cpp
ViewVC logotype

Diff of /DarthVader/CalorimeterLevel2/src/CaloProcessing.cpp

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

revision 1.4 by mocchiut, Wed Sep 6 11:03:31 2006 UTC revision 1.5 by mocchiut, Thu Sep 7 09:47:07 2006 UTC
# Line 91  void CaloProcessing::ProcessingInit(TSQL Line 91  void CaloProcessing::ProcessingInit(TSQL
91    GL_CALO_CALIB *glcalo = new GL_CALO_CALIB();    GL_CALO_CALIB *glcalo = new GL_CALO_CALIB();
92    //    //
93    sgnl = 0;    sgnl = 0;
94      UInt_t uptime = 0;
95    //    //
96    for (Int_t s = 0; s < 4; s++){    for (Int_t s = 0; s < 4; s++){
97      idcalib[s] = 0;      idcalib[s] = 0;
# Line 99  void CaloProcessing::ProcessingInit(TSQL Line 100  void CaloProcessing::ProcessingInit(TSQL
100      calibno[s] = 0;      calibno[s] = 0;
101      ClearCalibVals(s);      ClearCalibVals(s);
102      //      //
103      sgnl = glcalo->Query_GL_CALO_CALIB(hs,s,dbc);      sgnl = glcalo->Query_GL_CALO_CALIB(hs,uptime,s,dbc);
104      if ( sgnl < 0 ){      if ( sgnl < 0 ){
105          if ( verbose ) printf(" CALORIMETER - ERROR: error from GLTables\n");          if ( verbose ) printf(" CALORIMETER - ERROR: error from GLTables\n");
106          return;          return;
# Line 107  void CaloProcessing::ProcessingInit(TSQL Line 108  void CaloProcessing::ProcessingInit(TSQL
108      //        //  
109      idcalib[s] = glcalo->ID_ROOT_L0;      idcalib[s] = glcalo->ID_ROOT_L0;
110      fromtime[s] = glcalo->FROM_TIME;      fromtime[s] = glcalo->FROM_TIME;
111      totime[s] = glcalo->TO_TIME;      if ( glcalo->TO_TIME < hs ){ // calibration is corrupted and we are using the one that preceed the good one
112          totime[s] = uptime;
113        } else {
114          totime[s] = glcalo->TO_TIME;
115        };
116      calibno[s] = glcalo->EV_ROOT;      calibno[s] = glcalo->EV_ROOT;
117      //      //
118      if ( totime[s] == 0 ){      if ( totime[s] == 0 ){
# Line 791  Int_t CaloProcessing::Update(TSQLServer Line 796  Int_t CaloProcessing::Update(TSQLServer
796    calibno[s] = 0;    calibno[s] = 0;
797    ClearCalibVals(s);    ClearCalibVals(s);
798    //    //
799    sgnl = glcalo->Query_GL_CALO_CALIB(atime,s,dbc);    UInt_t uptime = 0;
800      //
801      sgnl = glcalo->Query_GL_CALO_CALIB(atime,uptime,s,dbc);
802    if ( sgnl < 0 ){    if ( sgnl < 0 ){
803      if ( verbose ) printf(" CALORIMETER - ERROR: error from GLTables\n");      if ( verbose ) printf(" CALORIMETER - ERROR: error from GLTables\n");
804      return(sgnl);      return(sgnl);
# Line 799  Int_t CaloProcessing::Update(TSQLServer Line 806  Int_t CaloProcessing::Update(TSQLServer
806    //      //  
807    idcalib[s] = glcalo->ID_ROOT_L0;    idcalib[s] = glcalo->ID_ROOT_L0;
808    fromtime[s] = glcalo->FROM_TIME;    fromtime[s] = glcalo->FROM_TIME;
809    totime[s] = glcalo->TO_TIME;    if ( glcalo->TO_TIME < atime ){ // calibration is corrupted and we are using the one that preceed the good one
810        totime[s] = uptime;
811      } else {
812        totime[s] = glcalo->TO_TIME;
813      };
814      //  totime[s] = glcalo->TO_TIME;
815    calibno[s] = glcalo->EV_ROOT;    calibno[s] = glcalo->EV_ROOT;
816    //    //
817    if ( totime[s] == 0 ){    if ( totime[s] == 0 ){

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

  ViewVC Help
Powered by ViewVC 1.1.23