Changeset 2187 in Sophya for trunk/ArchTOIPipe/Kernel/fitstoirdr.cc
- Timestamp:
- Sep 9, 2002, 5:33:16 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/Kernel/fitstoirdr.cc
r2073 r2187 3 3 // Christophe Magneville 4 4 // Reza Ansari 5 // $Id: fitstoirdr.cc,v 1.4 0 2002-06-18 20:36:00 ansariExp $5 // $Id: fitstoirdr.cc,v 1.41 2002-09-09 15:33:14 aubourg Exp $ 6 6 7 7 #include "fitstoirdr.h" … … 172 172 snEnd = forcedMaxIn; 173 173 } 174 /* init */ 175 // snMin=snBegin; NNNNNOOOOOONNNNNN !!!! 176 // snMax=snEnd; 174 177 cout << "FITSTOIReader range " << snBegin << " -> " << snEnd << endl; 175 178 } … … 188 191 return snEnd < lastReq ? snEnd : lastReq; 189 192 } 193 194 195 // ajout vf 31/07/2002 196 bool FITSTOIReader::checkSampleLimits(long& min, long& max, int pass) 197 { 198 bool sample_ok=true; 199 chkinit(); 200 return TOIProcessor::checkSampleLimits(min, max, pass); 201 /* 202 cout << "check " << name << " in " << min << " - " << max << " ; " << snMin << " - " << snMax << endl; 203 204 // on verifie qu'on peut effectivement produire 205 206 if (min < snBegin) { 207 min = snBegin; 208 } 209 210 if (max > snEnd) { 211 max = snEnd; 212 } 213 214 215 // si intersection des intervals vide on leve une exception 216 //if (min >= snEnd || max <= snBegin) { 217 //cerr << " FITSTOIReader::checkSampleLimits(long& min long& max)/Error Sample out of bounds" << endl; 218 //throw ParmError(" FITSTOIReader::checkSampleLimits(long& min long& max) min >= snEnd || max <= snBegin"); 219 //} 220 221 // ajustements si necessaires 222 if (min < snMin) { 223 snMin = min; 224 } 225 if (max > snMax) { 226 snMax = max; 227 } 228 229 230 min=min<snMin?snMin:min; 231 max=max>snMax?snMax:max; 232 233 // cas sans contraintes, on retourne nos bornes 234 if (min>max) { 235 min = snBegin; 236 max = snEnd; 237 } 238 239 cout << "check " << name << " out " << min << " - " << max << " ; " << snMin << " - " << snMax << endl; 240 //cout << "fitstoirdr : limites verifiees : " << snBegin << " , " << snEnd << " : " << sample_ok << endl; 241 return sample_ok; 242 */ 243 } 244 245 void FITSTOIReader::calcSampleLimits(long& min, long& max) 246 { 247 chkinit(); 248 cout << "calc " << name << " in " << min << " - " << max << " ; " << snBegin << " - " << snEnd << endl; 249 250 min=min<snMin?snMin:min; 251 max=max>snMax?snMax:max; 252 snBegin=snMin; 253 snEnd=snMax; 254 cout << "calc " << name << " out " << min << " - " << max << " ; " << snBegin << " - " << snEnd << endl; 255 //cout << "fitstoirdr : limites temporaires calculees : " << snBegin << " , " << snEnd << endl; 256 257 } 258 // fin ajout vf 259 260 190 261 191 262 void FITSTOIReader::addFile(string fn) { … … 431 502 432 503 } 504 505 506 // affichage des limites 507 void FITSTOIReader::printLimits() 508 { 509 cout << "fitstoirdr " << name <<" : limites calculees : " << snBegin << " , " << snEnd << endl; 510 } 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527
Note:
See TracChangeset
for help on using the changeset viewer.