/[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.6 by mocchiut, Tue Nov 4 10:48:38 2008 UTC revision 1.8 by mocchiut, Tue Nov 4 15:48:27 2008 UTC
# Line 661  Int_t PamelaDBOperations::SetUpperLimits Line 661  Int_t PamelaDBOperations::SetUpperLimits
661      //UInt_t tjump = 100;      //UInt_t tjump = 100;
662      while ( tjump > 0 ){      while ( tjump > 0 ){
663        pktlast = numeric_limits<UInt_t>::max();        pktlast = numeric_limits<UInt_t>::max();
664        while ( pktlast > chpktmax && (Int_t)(nevent-1-it) >= 0 ){        while ( PKT(pktlast) > PKT(chpktmax) && (Int_t)(nevent-1-it) >= 0 ){
665          if ( (Int_t)(nevent-1-it) >= 0 ){          if ( (Int_t)(nevent-1-it) >= 0 ){
666            T->GetEntry(nevent-1-it);            T->GetEntry(nevent-1-it);
667            ph = eh->GetPscuHeader();            ph = eh->GetPscuHeader();
# Line 669  Int_t PamelaDBOperations::SetUpperLimits Line 669  Int_t PamelaDBOperations::SetUpperLimits
669          } else {          } else {
670            pktlast = chpktmax + 1;            pktlast = chpktmax + 1;
671          };          };
672          if ( (!(it%1000) || abs((int)pktlast - (int)chpktmax)<1000 ) && debug ) printf(" look for up %i %i %i nevent %u (nevent-1-it) %i \n",it,pktlast,chpktmax,nevent,(Int_t)(nevent-1-it));          if ( (!(it%1000) || abs((int)(PKT(pktlast) - PKT(chpktmax)))<1000 ) && debug ) printf(" look for up %i %i %i nevent %u (nevent-1-it) %i \n",it,pktlast,chpktmax,nevent,(Int_t)(nevent-1-it));
673          it += tjump;          it += tjump;
674        };        };
675        if ( tjump > 1 ) it -= 2*tjump;        if ( tjump > 1 ) it -= 2*tjump;
# Line 694  Int_t PamelaDBOperations::SetUpperLimits Line 694  Int_t PamelaDBOperations::SetUpperLimits
694      //tjump = 100;      //tjump = 100;
695      while ( tjump > 0 ){      while ( tjump > 0 ){
696        pktlast = 0;        pktlast = 0;
697        while ( pktlast < chpktmin && it < (Int_t)nevent ){        while ( PKT(pktlast) < PKT(chpktmin) && it < (Int_t)nevent ){
698          if ( it < (Int_t)nevent ){          if ( it < (Int_t)nevent ){
699            T->GetEntry(it);            T->GetEntry(it);
700            ph = eh->GetPscuHeader();            ph = eh->GetPscuHeader();
# Line 4892  Int_t PamelaDBOperations::insertTRK_CALI Line 4892  Int_t PamelaDBOperations::insertTRK_CALI
4892                  //                  //
4893              };              };
4894              //              //
4895    
4896                if( !(MISSING_pkt1&MISSING_pkt2) ){
4897                  this->HandleTRK_CALIB(!MISSING_pkt1,!MISSING_pkt2);
4898                  ncalib++;
4899                  if( MISSING_pkt1||MISSING_pkt2||!valid )try_to_recover=true;
4900                }
4901    
4902    
4903          } else {          } else {
4904              //            //
4905              if ( IsDebug() ) printf(" Trk calibration1 at time %u obt %u pkt %u OUTSIDE the considered time interval \n",fromtime,obt1,pkt1);              if ( IsDebug() ) printf(" Trk calibration1 at time %u obt %u pkt %u OUTSIDE the considered time interval \n",fromtime,obt1,pkt1);
4906              //      if ( PEDANTIC ) throw -79;              //      if ( PEDANTIC ) throw -79;
4907              //              //
4908          };          };
4909          //              //    
4910    
         if( !(MISSING_pkt1&MISSING_pkt2) ){  
             this->HandleTRK_CALIB(!MISSING_pkt1,!MISSING_pkt2);  
             ncalib++;  
             if( MISSING_pkt1||MISSING_pkt2||!valid )try_to_recover=true;  
         }  
   
4911      }; //end loop on pkt1      }; //end loop on pkt1
4912    
4913    
# Line 5130  Int_t PamelaDBOperations::insertTRK_CALI Line 5132  Int_t PamelaDBOperations::insertTRK_CALI
5132                      // ------------------------------------------------------                      // ------------------------------------------------------
5133                      // ... retrieve the calibration packets.                      // ... retrieve the calibration packets.
5134                      // ------------------------------------------------------                      // ------------------------------------------------------
5135                      TFile *file = new TFile((TString)gSystem->ExpandPathName(path)+"/"+name); // EM, path could be symbolic and we must expand it                      if ( IsDebug() ) printf(" file is %s/%s \n",((TString)gSystem->ExpandPathName(path.Data())).Data(),name.Data());
5136                        TFile *file = new TFile(((TString)gSystem->ExpandPathName(path.Data()))+"/"+name); // EM, path could be symbolic and we must expand it
5137                      if(!file)throw -100;                      if(!file)throw -100;
5138                      if(file->IsZombie())throw -100;                      if(file->IsZombie())throw -100;
5139                      //                      //

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

  ViewVC Help
Powered by ViewVC 1.1.23