/[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.25 by pam-fi, Wed Aug 5 18:48:44 2009 UTC revision 1.26 by mocchiut, Wed Nov 25 09:39:50 2009 UTC
# Line 4236  Int_t PamelaDBOperations::insertCALO_CAL Line 4236  Int_t PamelaDBOperations::insertCALO_CAL
4236    UInt_t totime = 0;    UInt_t totime = 0;
4237    UInt_t obt = 0;    UInt_t obt = 0;
4238    UInt_t pkt = 0;    UInt_t pkt = 0;
4239      Float_t totped = 0.;
4240    //    //
4241    tr = (TTree*)file->Get("CalibCalPed");    tr = (TTree*)file->Get("CalibCalPed");
4242    if ( !tr || tr->IsZombie() ) throw -21;    if ( !tr || tr->IsZombie() ) throw -21;
# Line 4253  Int_t PamelaDBOperations::insertCALO_CAL Line 4254  Int_t PamelaDBOperations::insertCALO_CAL
4254        if ( calibCalPed->cstwerr[section] ){        if ( calibCalPed->cstwerr[section] ){
4255          valid = 1;          valid = 1;
4256          if ( calibCalPed->cperror[section] ) valid = 0;          if ( calibCalPed->cperror[section] ) valid = 0;
4257            //
4258            // 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.]
4259            //
4260            totped = 0.;
4261            for (UInt_t ss=0; ss<96; ss++){
4262              totped += calibCalPed->calped[section][0][ss];
4263            }
4264            if ( totped < 1. ){
4265              if ( IsDebug() ) printf(" Section %i totped %f -  No calibration data! Calorimeter power problems? \n",section,totped);
4266              valid = 0;
4267            };
4268            //
4269          ph = eh->GetPscuHeader();          ph = eh->GetPscuHeader();
4270          obt = ph->GetOrbitalTime();            obt = ph->GetOrbitalTime();  
4271          pkt = ph->GetCounter();            pkt = ph->GetCounter();  
# Line 4420  Int_t PamelaDBOperations::insertCALOPULS Line 4433  Int_t PamelaDBOperations::insertCALOPULS
4433    tr->SetBranchAddress("Header", &eh);    tr->SetBranchAddress("Header", &eh);
4434    nevents = tr->GetEntries();    nevents = tr->GetEntries();
4435    //    //
4436      Float_t totpul = 0.;
4437      //
4438    if ( nevents > 0 ){    if ( nevents > 0 ){
4439      //      //
4440      for (UInt_t i=0; i < nevents; i++){      for (UInt_t i=0; i < nevents; i++){
# Line 4429  Int_t PamelaDBOperations::insertCALOPULS Line 4444  Int_t PamelaDBOperations::insertCALOPULS
4444          if ( cp1->pstwerr[section] && cp1->unpackError == 0 ){          if ( cp1->pstwerr[section] && cp1->unpackError == 0 ){
4445            valid = 1;            valid = 1;
4446            if ( cp1->pperror[section] ) valid = 0;            if ( cp1->pperror[section] ) valid = 0;
4447              //
4448              // 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.]
4449              //
4450              totpul = 0.;
4451              for (UInt_t ss=0; ss<96; ss++){
4452                totpul += cp1->calpuls[section][0][ss];
4453              }
4454              if ( totpul >= 3145632. ){
4455                if ( IsDebug() ) printf(" PULSE1 Section %i totpul %f -  No calibration data! Calorimeter power problems? \n",section,totpul);
4456                valid = 0;
4457              };
4458              //
4459            ph = eh->GetPscuHeader();            ph = eh->GetPscuHeader();
4460            obt = ph->GetOrbitalTime();              obt = ph->GetOrbitalTime();  
4461            pkt = ph->GetCounter();              pkt = ph->GetCounter();  
# Line 4586  Int_t PamelaDBOperations::insertCALOPULS Line 4613  Int_t PamelaDBOperations::insertCALOPULS
4613          if ( cp2->pstwerr[section] && cp2->unpackError == 0 ){          if ( cp2->pstwerr[section] && cp2->unpackError == 0 ){
4614            valid = 1;            valid = 1;
4615            if ( cp2->pperror[section] ) valid = 0;            if ( cp2->pperror[section] ) valid = 0;
4616              //
4617              // 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.]
4618              //
4619              totpul = 0.;
4620              for (UInt_t ss=0; ss<96; ss++){
4621                totpul += cp2->calpuls[section][0][ss];
4622              }
4623              if ( totpul >= 3145632. ){
4624                if ( IsDebug() ) printf(" PULSE2 Section %i totpul %f -  No calibration data! Calorimeter power problems? \n",section,totpul);
4625                valid = 0;
4626              };
4627              //
4628            ph = eh->GetPscuHeader();            ph = eh->GetPscuHeader();
4629            obt = ph->GetOrbitalTime();              obt = ph->GetOrbitalTime();  
4630            pkt = ph->GetCounter();              pkt = ph->GetCounter();  

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

  ViewVC Help
Powered by ViewVC 1.1.23