Changeset 2282 in Sophya for trunk/ArchTOIPipe


Ignore:
Timestamp:
Nov 28, 2002, 4:49:21 PM (23 years ago)
Author:
aubourg
Message:

deadlock work

Location:
trunk/ArchTOIPipe
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/Kernel/Makefile.in

    r2227 r2282  
    5656SRCFILES = toi.cc toimanager.cc toiprocessor.cc  \
    5757           fitstoirdr.cc fitstoiwtr.cc asciitoiwtr.cc \
    58            toisegment.cc toiseqbuff.cc cgt.cc
     58           toisegment.cc toiseqbuff.cc cgt.cc \
     59           fitsringwtr.cc
    5960
    6061FILES=$(patsubst %.c,%.o,$(SRCFILES:.cc=.o))
  • trunk/ArchTOIPipe/Kernel/toiprocessor.cc

    r2187 r2282  
    33//                               Christophe Magneville
    44//                               Reza Ansari
    5 // $Id: toiprocessor.cc,v 1.26 2002-09-09 15:33:15 aubourg Exp $
     5// $Id: toiprocessor.cc,v 1.27 2002-11-28 15:49:21 aubourg Exp $
    66
    77#include "toiprocessor.h"
     
    9494
    9595int TOIProcessor::getMinOut() {
    96   /*
    97   //cout << name << "minout" << endl;
    98   if (minOut < 0)  minOut = calcMinOut();
    99   //cout << name << "minout=" << minOut << endl;
    100   return minOut;
    101   */
    102   return snBegin + lowExtra;
     96  //  return snBegin + lowExtra;
     97  return snBegin;
    10398}
    10499
    105100int TOIProcessor::getMaxOut() {
    106   /*
    107   //cout << name << "maxout" << endl;
    108   if (maxOut < 0) maxOut = calcMaxOut();
    109   //cout << name << "maxout=" << maxOut << endl;
    110   return maxOut;
    111   */
    112   return snEnd - upExtra;
     101  //  return snEnd - upExtra;
     102  return snEnd;
    113103}
    114104
     
    122112
    123113int TOIProcessor::getMinIn() {
    124   /*
    125   int nIn = inIx.size();
    126   int minIn = 0;
    127   for (int i=0; i<nIn; i++) {
    128     TOI* toi = inTOIs[i];
    129     if (toi == NULL) continue;  // Protection - Reza  13/3/2001
    130     int x = toi->getMinSn();
    131     if (x > minIn) minIn = x;
    132   }
    133   if (forcedMinIn > 0 && forcedMinIn > minIn) minIn = forcedMinIn;
    134   return minIn;
    135   */
    136   return snBegin;
     114  //  return snBegin;
     115  return snBegin - lowExtra;
    137116}
    138117
    139118int TOIProcessor::getMaxIn() {
    140   /*
    141   int_4 nIn = inIx.size();
    142   int_4 maxIn = MAXINT;
    143   for (int i=0; i<nIn; i++) {
    144     TOI* toi = inTOIs[i];
    145     if (toi == NULL) continue;  // Protection - Reza  13/3/2001
    146     int_4 x = toi->getMaxSn();
    147     if (x < maxIn) maxIn = x;
    148   }
    149   if (forcedMaxIn > 0 && forcedMaxIn < maxIn) maxIn = forcedMaxIn;
    150   return maxIn;
    151   */
    152   return snEnd;
     119  //  return snEnd;
     120  return snEnd + upExtra;
    153121}
    154122
  • trunk/ArchTOIPipe/Kernel/toisegment.cc

    r1964 r2282  
    33//                               Christophe Magneville
    44//                               Reza Ansari
    5 // $Id: toisegment.cc,v 1.27 2002-04-16 08:28:53 aubourg Exp $
     5// $Id: toisegment.cc,v 1.28 2002-11-28 15:49:21 aubourg Exp $
    66
    77#include "toisegment.h"
     
    290290void  TOISegmented::BufferView::ensure(int sn) { /* Single-thread, reader thread */
    291291  if (sn < sn0) {
    292     cout << "TOISegmented::BufferView::ensure requested sample before first" << endl;
     292    cout << "TOISegmented::BufferView::ensure : requested sample before first" << endl;
    293293    cout << "sn " << sn << " sn0 " << sn0 << endl;
     294    cout << "name : " << master->name << endl;
    294295    abort();
    295296  }
     
    622623           << endl;
    623624       
    624       abort();
     625      cout << "lets try something before failing, but the program may block" << endl;
     626      pthread_cond_broadcast(&read_wait_condv);
     627      //usleep(1000);
     628      //      abort();
    625629    }
    626630  }
  • trunk/ArchTOIPipe/Processors/toimedfilter.cc

    r2222 r2282  
    33//                               Christophe Magneville
    44//                               Reza Ansari
    5 // $Id: toimedfilter.cc,v 1.3 2002-10-23 21:08:27 aubourg Exp $
     5// $Id: toimedfilter.cc,v 1.4 2002-11-28 15:49:21 aubourg Exp $
    66
    77#include <algorithm>
     
    3333    int j = i+window-1;
    3434    if (j>=sne) j = sne;
    35     //    cout << "median: fetching " << i << " -> " << j << endl;
     35    //   cout << "median: fetching " << i << " -> " << j << endl;
    3636    getData(0, i, j-i+1, data);
    3737    for (int ii=i+w/2; ii<=j-w/2; ii++) {
     
    5050
    5151void TOIMedFilter::run() {
     52  cout << "TOIMedFilter in : " << getMinIn() << " - " << getMaxIn()
     53       << " out : " << getMinOut() << " - " << getMaxOut() << endl;
    5254  multiset<double> low;  // w/2
    5355  multiset<double> high; // w/2
     
    7072
    7173  putData(0, snb+w/2, mid);
    72   //  cout << snb+w/2<< " -> " << mid << endl;
     74    cout << snb+w/2<< " -> " << mid << endl;
    7375
    7476  {for (int i=snb+w; i<=sne; i ++) {
Note: See TracChangeset for help on using the changeset viewer.