Changeset 614 in Sophya for trunk/Poubelle/archTOI.old


Ignore:
Timestamp:
Nov 22, 1999, 11:13:09 AM (26 years ago)
Author:
ansari
Message:

fin fichier

Location:
trunk/Poubelle/archTOI.old
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Poubelle/archTOI.old/toiiter.cc

    r612 r614  
    257257  return true;
    258258}
     259<<<<<<< toiiter.cc
    259260
    260261bool TOIIter::next1() {
     
    290291      }     
    291292    }
     293    if (endFound && curSample >= fset.getSampleIndex()+71) return false;
    292294    bool found=false;
    293295    //bool valuesAhead = false;
     
    296298      if ((*i).second->canGetValue(curSample, (*i).first)) {found=true;break;}
    297299      //if ((*i).second->lastSampleNum((*i).first)>curSample) valuesAhead=true;
    298     }
     300=======
     301
     302bool TOIIter::next1() {
     303// On tente de produire curSample+1 pour toutes les toi
     304// Eventuellement en avancant sur le fichier...
     305// Puis on regarde si une TOI triggering a eu une nouvelle
     306// valeur.
     307// Si on a epuise les fichiers de donnees, on s'arrete des qu'aucune
     308// TOI n'a de valeurs apres curSample...
     309  if (curSample <= 0) curSample = sStart-1; 
     310  if (curSample <= 0) {
     311    long sn = archParam.acq.MJD2SN(mjdStart) - 1;
     312    if (sn > curSample) curSample = sn;
     313  }
     314 
     315  if (curSample <= 0) curSample = fset.getSampleIndex()-1;
     316 
     317  if (curSample >= sEnd || archParam.acq.SN2MJD(curSample) >= mjdEnd) return false;
     318 
     319  static long lastClean = 0;
     320  if (curSample - lastClean > 100) {
     321    for (int i=0; i<request.size(); i++)
     322      request[i].second->wontNeedEarlier(request[i].first, this, curSample);
     323    lastClean = curSample;
     324  }
     325
     326  bool endFound = false;
     327  while(1) {
     328    curSample++;
     329    for (vector<TOIInfo>::iterator i = request.begin(); i != request.end(); i++) {
     330      while ((*i).second->canGetValueLater(curSample, (*i).first)) {
     331        if (! fset.next()) {endFound = true; break;} //return false;
     332      }     
     333    }
     334    bool found=false;
     335    //bool valuesAhead = false;
     336    for (vector<TOIInfo>::iterator i = request.begin(); i != request.end(); i++) {
     337      if (((*i).third & triggering) == 0) continue;
     338      if ((*i).second->canGetValue(curSample, (*i).first)) {found=true;break;}
     339      //if ((*i).second->lastSampleNum((*i).first)>curSample) valuesAhead=true;
     340>>>>>>> 1.24
     341    }
     342<<<<<<< toiiter.cc
     343    if (found) break;
     344=======
    299345    if (found) break;
    300346    if (endFound && curSample >= fset.getSampleIndex()+71) return false;
     347>>>>>>> 1.24
    301348  }
    302349  return true;
Note: See TracChangeset for help on using the changeset viewer.