/[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.27 by mocchiut, Wed Nov 25 11:19:26 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            Int_t ns = 0;
4262            if ( section == 2 ) ns = 3;
4263            if ( section == 3 ) ns = 1;
4264            if ( section == 1 ) ns = 2;
4265            for (UInt_t ss=0; ss<96; ss++){
4266              totped += fabs(calibCalPed->calped[ns][0][ss]);
4267            }
4268            if ( totped < 1. ){
4269              if ( IsDebug() ) printf(" Section %i totped %f -  No calibration data! Calorimeter power problems? \n",section,totped);
4270              valid = 0;
4271            };
4272            //
4273          ph = eh->GetPscuHeader();          ph = eh->GetPscuHeader();
4274          obt = ph->GetOrbitalTime();            obt = ph->GetOrbitalTime();  
4275          pkt = ph->GetCounter();            pkt = ph->GetCounter();  
# Line 4420  Int_t PamelaDBOperations::insertCALOPULS Line 4437  Int_t PamelaDBOperations::insertCALOPULS
4437    tr->SetBranchAddress("Header", &eh);    tr->SetBranchAddress("Header", &eh);
4438    nevents = tr->GetEntries();    nevents = tr->GetEntries();
4439    //    //
4440      Float_t totpul = 0.;
4441      //
4442    if ( nevents > 0 ){    if ( nevents > 0 ){
4443      //      //
4444      for (UInt_t i=0; i < nevents; i++){      for (UInt_t i=0; i < nevents; i++){
# Line 4429  Int_t PamelaDBOperations::insertCALOPULS Line 4448  Int_t PamelaDBOperations::insertCALOPULS
4448          if ( cp1->pstwerr[section] && cp1->unpackError == 0 ){          if ( cp1->pstwerr[section] && cp1->unpackError == 0 ){
4449            valid = 1;            valid = 1;
4450            if ( cp1->pperror[section] ) valid = 0;            if ( cp1->pperror[section] ) valid = 0;
4451              //
4452              // 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.]
4453              //
4454              totpul = 0.;
4455              Int_t ns = 0;
4456              if ( section == 2 ) ns = 3;
4457              if ( section == 3 ) ns = 1;
4458              if ( section == 1 ) ns = 2;
4459              for (UInt_t ss=0; ss<96; ss++){
4460                totpul += cp1->calpuls[ns][0][ss];
4461              }
4462              if ( totpul >= 3145632. ){
4463                if ( IsDebug() ) printf(" PULSE1 Section %i totpul %f -  No calibration data! Calorimeter power problems? \n",section,totpul);
4464                valid = 0;
4465              };
4466              //
4467            ph = eh->GetPscuHeader();            ph = eh->GetPscuHeader();
4468            obt = ph->GetOrbitalTime();              obt = ph->GetOrbitalTime();  
4469            pkt = ph->GetCounter();              pkt = ph->GetCounter();  
# Line 4586  Int_t PamelaDBOperations::insertCALOPULS Line 4621  Int_t PamelaDBOperations::insertCALOPULS
4621          if ( cp2->pstwerr[section] && cp2->unpackError == 0 ){          if ( cp2->pstwerr[section] && cp2->unpackError == 0 ){
4622            valid = 1;            valid = 1;
4623            if ( cp2->pperror[section] ) valid = 0;            if ( cp2->pperror[section] ) valid = 0;
4624              //
4625              // 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.]
4626              //
4627              totpul = 0.;
4628              Int_t ns = 0;
4629              if ( section == 2 ) ns = 3;
4630              if ( section == 3 ) ns = 1;
4631              if ( section == 1 ) ns = 2;
4632              for (UInt_t ss=0; ss<96; ss++){
4633                totpul += cp2->calpuls[ns][0][ss];
4634              }
4635              if ( totpul >= 3145632. ){
4636                if ( IsDebug() ) printf(" PULSE2 Section %i totpul %f -  No calibration data! Calorimeter power problems? \n",section,totpul);
4637                valid = 0;
4638              };
4639              //
4640            ph = eh->GetPscuHeader();            ph = eh->GetPscuHeader();
4641            obt = ph->GetOrbitalTime();              obt = ph->GetOrbitalTime();  
4642            pkt = ph->GetCounter();              pkt = ph->GetCounter();  

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

  ViewVC Help
Powered by ViewVC 1.1.23