/[PAMELA software]/chewbacca/YodaProfiler/src/PamelaDBOperations.cpp
ViewVC logotype

Diff of /chewbacca/YodaProfiler/src/PamelaDBOperations.cpp

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

revision 1.26 by mocchiut, Wed Nov 25 09:39:50 2009 UTC revision 1.28 by mocchiut, Mon Dec 14 13:20:37 2009 UTC
# Line 185  void PamelaDBOperations::OpenL0File(TStr Line 185  void PamelaDBOperations::OpenL0File(TStr
185            if ( !chboot ){            if ( !chboot ){
186              qu.str("");              qu.str("");
187              //      qu << "SELECT BOOT_NUMBER from ROOT_TABLE where BOOT_NUMBER!=0 AND ABS(LAST_TIME_SYNC_INFO-"<< chlastts <<")<10000 AND ABS(REAL_TIME_INIT-"<< row2->GetField(10) <<")<7200 group by BOOT_NUMBER order by BOOT_NUMBER asc;";              //      qu << "SELECT BOOT_NUMBER from ROOT_TABLE where BOOT_NUMBER!=0 AND ABS(LAST_TIME_SYNC_INFO-"<< chlastts <<")<10000 AND ABS(REAL_TIME_INIT-"<< row2->GetField(10) <<")<7200 group by BOOT_NUMBER order by BOOT_NUMBER asc;";
188              qu << "SELECT BOOT_NUMBER from ROOT_TABLE where BOOT_NUMBER!=0 AND ABS(LAST_TIME_SYNC_INFO-"<< chlastts <<")<40000 AND ABS(REAL_TIME_INIT-"<< row2->GetField(10) <<")<40000 group by BOOT_NUMBER order by BOOT_NUMBER asc;"; // relax conditions... 090112 [8RED: error -29]              //      qu << "SELECT BOOT_NUMBER from ROOT_TABLE where BOOT_NUMBER!=0 AND ABS(LAST_TIME_SYNC_INFO-"<< chlastts <<")<40000 AND ABS(REAL_TIME_INIT-"<< row2->GetField(10) <<")<40000 group by BOOT_NUMBER order by BOOT_NUMBER asc;"; // relax conditions... 090112 [8RED: error -29]
189                qu << "SELECT BOOT_NUMBER from ROOT_TABLE where BOOT_NUMBER!=0 AND ABS(LAST_TIME_SYNC_INFO-"<< chlastts <<")<50000 AND ABS(REAL_TIME_INIT-"<< row2->GetField(10) <<")<50000 group by BOOT_NUMBER order by BOOT_NUMBER asc;"; // even more relaxed conditions... 091214 [9REDtest3: error -29]
190              if ( debug ) printf(" chewbacca: query is %s \n",qu.str().c_str());              if ( debug ) printf(" chewbacca: query is %s \n",qu.str().c_str());
191              result3 = conn->Query(qu.str().c_str());              result3 = conn->Query(qu.str().c_str());
192              if ( result3 ){              if ( result3 ){
# Line 4258  Int_t PamelaDBOperations::insertCALO_CAL Line 4259  Int_t PamelaDBOperations::insertCALO_CAL
4259          // check pedestal values for one plane, if all zeros calibration is not valid (calorimeter power problems) [8th data reduction bug, fixed on 25/11/2009 by E.M.]          // check pedestal values for one plane, if all zeros calibration is not valid (calorimeter power problems) [8th data reduction bug, fixed on 25/11/2009 by E.M.]
4260          //          //
4261          totped = 0.;          totped = 0.;
4262            Int_t ns = 0;
4263            if ( section == 2 ) ns = 3;
4264            if ( section == 3 ) ns = 1;
4265            if ( section == 1 ) ns = 2;
4266          for (UInt_t ss=0; ss<96; ss++){          for (UInt_t ss=0; ss<96; ss++){
4267            totped += calibCalPed->calped[section][0][ss];            totped += fabs(calibCalPed->calped[ns][0][ss]);
4268          }          }
4269          if ( totped < 1. ){          if ( totped < 1. ){
4270            if ( IsDebug() ) printf(" Section %i totped %f -  No calibration data! Calorimeter power problems? \n",section,totped);            if ( IsDebug() ) printf(" Section %i totped %f -  No calibration data! Calorimeter power problems? \n",section,totped);
# Line 4448  Int_t PamelaDBOperations::insertCALOPULS Line 4453  Int_t PamelaDBOperations::insertCALOPULS
4453            // check pulse values for one plane, if all zeros calibration is not valid (calorimeter power problems) [8th data reduction bug, fixed on 25/11/2009 by E.M.]            // check pulse values for one plane, if all zeros calibration is not valid (calorimeter power problems) [8th data reduction bug, fixed on 25/11/2009 by E.M.]
4454            //            //
4455            totpul = 0.;            totpul = 0.;
4456              Int_t ns = 0;
4457              if ( section == 2 ) ns = 3;
4458              if ( section == 3 ) ns = 1;
4459              if ( section == 1 ) ns = 2;
4460            for (UInt_t ss=0; ss<96; ss++){            for (UInt_t ss=0; ss<96; ss++){
4461              totpul += cp1->calpuls[section][0][ss];              totpul += cp1->calpuls[ns][0][ss];
4462            }            }
4463            if ( totpul >= 3145632. ){            if ( totpul >= 3145632. ){
4464              if ( IsDebug() ) printf(" PULSE1 Section %i totpul %f -  No calibration data! Calorimeter power problems? \n",section,totpul);              if ( IsDebug() ) printf(" PULSE1 Section %i totpul %f -  No calibration data! Calorimeter power problems? \n",section,totpul);
# Line 4617  Int_t PamelaDBOperations::insertCALOPULS Line 4626  Int_t PamelaDBOperations::insertCALOPULS
4626            // check pulse values for one plane, if all zeros calibration is not valid (calorimeter power problems) [8th data reduction bug, fixed on 25/11/2009 by E.M.]            // check pulse values for one plane, if all zeros calibration is not valid (calorimeter power problems) [8th data reduction bug, fixed on 25/11/2009 by E.M.]
4627            //            //
4628            totpul = 0.;            totpul = 0.;
4629              Int_t ns = 0;
4630              if ( section == 2 ) ns = 3;
4631              if ( section == 3 ) ns = 1;
4632              if ( section == 1 ) ns = 2;
4633            for (UInt_t ss=0; ss<96; ss++){            for (UInt_t ss=0; ss<96; ss++){
4634              totpul += cp2->calpuls[section][0][ss];              totpul += cp2->calpuls[ns][0][ss];
4635            }            }
4636            if ( totpul >= 3145632. ){            if ( totpul >= 3145632. ){
4637              if ( IsDebug() ) printf(" PULSE2 Section %i totpul %f -  No calibration data! Calorimeter power problems? \n",section,totpul);              if ( IsDebug() ) printf(" PULSE2 Section %i totpul %f -  No calibration data! Calorimeter power problems? \n",section,totpul);

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.28

  ViewVC Help
Powered by ViewVC 1.1.23