/[PAMELA software]/chewbacca/PamOffLineSW/PamOffLineSW_Main.cpp
ViewVC logotype

Diff of /chewbacca/PamOffLineSW/PamOffLineSW_Main.cpp

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

revision 1.10 by mocchiut, Thu Feb 11 09:02:10 2010 UTC revision 1.13 by mocchiut, Fri Feb 12 12:45:49 2010 UTC
# Line 1  Line 1 
1  //============================================================================  //============================================================================
2  // $Id: PamOffLineSW_Main.cpp,v 1.9 2010/02/02 15:26:09 mocchiut Exp $  // $Id: PamOffLineSW_Main.cpp,v 1.12 2010/02/12 05:22:04 mocchiut Exp $
3  // Description : Pamela Off-Line Software  // Description : Pamela Off-Line Software
4  //============================================================================  //============================================================================
5    
# Line 62  int old_route = 999; Line 62  int old_route = 999;
62  Long64_t filelength = 0LL;  Long64_t filelength = 0LL;
63  Long64_t streamposi = 0LL;  Long64_t streamposi = 0LL;
64  Long64_t streamposisaved = 0LL;  Long64_t streamposisaved = 0LL;
65    Long64_t streamposiorig = 0LL;
66  Int_t numposi = 10;  Int_t numposi = 10;
67  Long64_t downcount = 1LL;  Long64_t downcount = 1LL;
68  TArrayL64 *dwin=new TArrayL64(12);  TArrayL64 *dwin=new TArrayL64(12);
69  Long64_t cadcount = 0LL;  Long64_t cadcount = 0LL;
70  Int_t horrorcount = 0;  Int_t horrorcount = 0;
71    Int_t hc = 0;
72    
73  bool skip_cadre = false;  bool skip_cadre = false;
74  long int iNumGoodCadres=0; //total number of good cadres  long int iNumGoodCadres=0; //total number of good cadres
# Line 953  void mainRead_RealData(char fni[]) Line 955  void mainRead_RealData(char fni[])
955                  //                  //
956                  // we completely missed more than 10 VRL packets                  // we completely missed more than 10 VRL packets
957                  //                  //
958                  //              if ( horrorcount > 10 ){                  if (  hc == 1100 ){
959                  if ( horrorcount > 1 ){                    fin.seekg(streamposiorig);
960                      stringstream os;                                              
961                      os<<" NEW (EM) UN-RECOVERABLE SYNC WITH VRL HEADERS, SIG! ";
962                      os<<" new position in file, go back to "<<streamposiorig;
963                      string ms = os.str();
964                      mainLogUtil->logAll(ms);
965                      hc++;
966                      continue;
967                    };
968                    if ( horrorcount > 10 && hc < 1100 ){
969                      hc++;
970                      //if ( horrorcount > 1 ){
971                    stringstream os;                                                                  stringstream os;                                              
972                    os<<" NEW (EM) THIS IS TOO MUCH, LOST SYNC WITH VRL HEADERS! try to recover horrorcount = "<<horrorcount;                    os<<" NEW (EM) THIS IS TOO MUCH, LOST SYNC WITH VRL HEADERS! try to recover horrorcount = "<<horrorcount;
973                    os<<" new position in file "<<(streamposi-(10LL*1024LL)+1LL);                    os<<" new position in file "<<(streamposi-(10LL*1024LL)+1LL);
# Line 1156  bool VRL_Header_Check(char* headVRL, int Line 1169  bool VRL_Header_Check(char* headVRL, int
1169                      " This error occurred after byte: "<<iByte_tot<<" ... Route number unused= "<<(int)headVRL[3]<<" Resetting ROUTE to old value = "<<old_route<<" (download="<<download<<")";                      " This error occurred after byte: "<<iByte_tot<<" ... Route number unused= "<<(int)headVRL[3]<<" Resetting ROUTE to old value = "<<old_route<<" (download="<<download<<")";
1170                    string ms = os.str();                    string ms = os.str();
1171                    mainLogUtil->logAll(ms);                    mainLogUtil->logAll(ms);
1172                      if ( !hc && !horrorcount ) streamposiorig = streamposi;
1173                    horrorcount++;                    horrorcount++;
1174                  };                  };
1175    

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.23