Changeset 3883 in Sophya for trunk/AddOn/TAcq/brfitsrd.cc
- Timestamp:
- Sep 23, 2010, 7:59:29 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AddOn/TAcq/brfitsrd.cc
r3700 r3883 78 78 << " signalII.fits IMin=" << imin_ << " IMax=" << imax_ << " IStep=" << istep_ << endl; 79 79 80 uint_8 prtcnt=0; 80 81 Byte* nextpaq=NULL; 81 82 bool fgok=true; … … 95 96 } 96 97 if (ReadNextAllFibers()) { fgok=false; break; } 98 prtcnt++; 99 if ((prtlev_>0)&&(prtcnt%prtmodulo_==0)) { 100 cout << "BRMultiFitsReader: NbPaqMFRead=" << prtcnt << " NSameFC=" 101 << totsamefc_ << " / NPaqFib0Read=" << totnpqrd_[0] 102 << " FracSameFC=" << 100*totsamefc_/totnpqrd_[0] << " %" << endl; 103 } 97 104 } 98 105 99 106 MoveToNextTarget(); // Pour faire traiter le dernier paquet si plein 100 107 MZoneManage(true); // Nettoyage final 101 usleep(50000); // Attente de traitement du dernier paquet102 memgr_.Stop(); // Arret103 108 104 109 cout << " ------------------ BRMultiFitsReader::run() END ----------------- " << endl; 105 110 ts.SetNow(); 106 111 tm.SplitQ(); 107 cout << " END reading : " << ts ; 108 if (rdsamefc_) cout << " NSameFC=" << totsamefc_ << endl; 109 else cout << endl; 112 cout << "BRMultiFitsReader::run(): END reading : " << ts << endl; 113 cout << "... NbPaqMFRead=" << prtcnt << " NSameFC=" 114 << totsamefc_ << " / NPaqFib0Read=" << totnpqrd_[0] 115 << " FracSameFC=" << 100*totsamefc_/totnpqrd_[0] << " %" << endl; 116 110 117 for(size_t fib=0; fib<(size_t)memgr_.NbFibres(); fib++) { 111 118 int perc=0; … … 121 128 cout << " ---------------------------------------------------------- " << endl; 122 129 130 usleep(50000); // Attente de traitement du dernier paquet 131 memgr_.Stop(); // Arret 132 123 133 } // Fin du bloc try 124 134 catch (std::exception& exc) { … … 142 152 if (ReadNext(fib)) return true; // probleme 143 153 } 144 if (!rdsamefc_ || (memgr_.NbFibres()<2)) { 145 totsamefc_++; return false; // c'est OK 146 } 147 uint_8 cfc=curfc_[0]; 148 bool fgsamefc=true; 149 for(size_t fib=1; fib<memgr_.NbFibres(); fib++) { 150 if (curfc_[fib]!=cfc) { 151 fgsamefc=false; 152 if (curfc_[fib] > cfc) cfc=curfc_[fib]; 153 } 154 } 155 if (fgsamefc) { 156 totsamefc_++; return false; // c'est OK , same framecounter 157 } 158 else { // else !fgsame 159 for(uint_4 fib=0; fib<memgr_.NbFibres(); fib++) { 160 while (curfc_[fib]<cfc) { 161 if (ReadNext(fib)) return true; // probleme 162 } 163 } 164 } // fin de else !fgsame 165 totsamefc_++; 166 return false; // c'est OK 154 if (!rdsamefc_ || (memgr_.NbFibres()<2)) { 155 uint_8 cfc=curfc_[0]; 156 bool fgsamefc=true; 157 for(size_t fib=1; fib<memgr_.NbFibres(); fib++) { 158 if (curfc_[fib]!=cfc) fgsamefc=false; 159 } 160 if (fgsamefc) totsamefc_++; 161 return false; // c'est OK 162 } 163 // On va essayer de lire jusqu'a avoir same_frame_counter 164 bool echec=true; 165 while (echec) { 166 uint_8 cfc=curfc_[0]; 167 bool fgsamefc=true; 168 for(size_t fib=1; fib<memgr_.NbFibres(); fib++) { 169 if (curfc_[fib]!=cfc) { 170 fgsamefc=false; 171 if (curfc_[fib] > cfc) cfc=curfc_[fib]; 172 } 173 } 174 if (fgsamefc) { 175 totsamefc_++; echec=false; return false; // c'est OK , same framecounter 176 } 177 else { // else !fgsame 178 for(uint_4 fib=0; fib<memgr_.NbFibres(); fib++) { 179 while (curfc_[fib]<cfc) { 180 if (ReadNext(fib)) return true; // probleme 181 } 182 } 183 } // fin de else !fgsame 184 } // fin de while(echec): lecture jusqu'a same_frame_counter 185 186 return true; // probleme 167 187 } 168 188
Note:
See TracChangeset
for help on using the changeset viewer.