Changeset 634 in Sophya for trunk/Poubelle


Ignore:
Timestamp:
Nov 25, 1999, 9:34:50 AM (26 years ago)
Author:
ansari
Message:

linux-ppc, gcc 2.95.1

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

Legend:

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

    r555 r634  
    109109{
    110110  if (format == ascii_fmt) {
    111     openFile   = &openFile_A;
    112     outHeader  = &outHeader_A;
    113     outValue   = &outValue_A;
    114     endLine    = &endLine_A;
    115     closeFile  = &closeFile_A;
     111    openFile   = &ArchTOI::openFile_A;
     112    outHeader  = &ArchTOI::outHeader_A;
     113    outValue   = &ArchTOI::outValue_A;
     114    endLine    = &ArchTOI::endLine_A;
     115    closeFile  = &ArchTOI::closeFile_A;
    116116  } else { // fits_fmt
    117     openFile   = &openFile_F;
    118     outHeader  = &outHeader_F;
    119     outValue   = &outValue_F;
    120     endLine    = &endLine_F;
    121     closeFile  = &closeFile_F;
     117    openFile   = &ArchTOI::openFile_F;
     118    outHeader  = &ArchTOI::outHeader_F;
     119    outValue   = &ArchTOI::outValue_F;
     120    endLine    = &ArchTOI::endLine_F;
     121    closeFile  = &ArchTOI::closeFile_F;
    122122  }
    123123 
  • trunk/Poubelle/archTOI.old/archtoimain.cc

    r555 r634  
    3232    }
    3333   
    34 //    ProfilerInit(collectDetailed, bestTimeBase, 10000, 200);
     34 //   ProfilerInit(collectDetailed, bestTimeBase, 10000, 200);
    3535
    3636    if (argv[1] == string("-h")) {
     
    4949    }
    5050   
    51 //    ProfilerDump("\pprofiler.data");
     51 //   ProfilerDump("\pprofiler.data");
    5252    return(0);
    5353}
  • trunk/Poubelle/archTOI.old/asigps.cc

    r426 r634  
    44#include "asigps.h"
    55#include <fstream.h>
     6#include <stdio.h>
    67
    78ASIGPS::ASIGPS(string const& filename) {
  • trunk/Poubelle/archTOI.old/gyrocalibrator.cc

    r555 r634  
    139139    }
    140140  }
     141 
     142  // Si nos fournisseurs ne peuvent pas, nous non plus...
     143  map<TOI, TOIProducer*> & m = (*(neededTOIs.begin())).second;
     144  for (map<TOI, TOIProducer*>::iterator i = m.begin(); i != m.end(); i++) {
     145    TOI const& inToi = (*i).first;
     146    TOIProducer* prod =  (*i).second;
     147    if (!prod->canGetValue(sampleNum, inToi) && !prod->canGetValueLater(sampleNum, inToi)) return false;
     148
     149  }
     150 
    141151  if (lastFence1<0 || lastFence2<0) return true;
    142152  if (sampleNum > lastFence2) return true;
     
    170180
    171181
    172 void GyroCalibrator::propagateLowBound(TOI const&, long /*sampleNum*/) {
     182void GyroCalibrator::propagateLowBound(TOI const& toi, long sampleNum) {
    173183   if (startSample < lastFence1) {
    174184     if (gyro[0].size() > lastFence1 - startSample) {
     
    180190     }
    181191   }
     192   TOIPullProducer::propagateLowBound(toi, sampleNum);
    182193}
    183194
  • trunk/Poubelle/archTOI.old/toi.cc

    r555 r634  
    55#include "tokenizer.h"
    66#include "archexc.h"
     7#include <stdio.h>
    78
    89vector<TOI> TOI::alltois;
    910
    1011TOI::TOI(string n, int i, string opts, string u)
    11 : name(n), index(i), unit(u)
     12: name(n), index(i), unit(u), ref(-1)
    1213{
    1314  options = Tokenizer(opts).getTokenSet();
     
    1617
    1718TOI::TOI(string n, int i, string opts, string u, string reqopts)
    18 : name(n), index(i), unit(u)
     19: name(n), index(i), unit(u), ref(-1)
    1920{
    2021  options = Tokenizer(opts).getTokenSet();
     
    2526
    2627TOI::TOI(string n, int i, set<string> opts, string u)
    27 : name(n), options(opts), index(i), unit(u)
     28: name(n), options(opts), index(i), unit(u), ref(-1)
    2829{
    2930  findref();
     
    3132
    3233TOI::TOI(string s, string u)
    33 : index(unspec), unit(u)
     34: index(unspec), unit(u), ref(-1)
    3435{
    3536  vector<string> v = Tokenizer(s).getTokenVector();
     
    4849}
    4950
     51// $CHECK$ a optimiser avec hash ou arbre...
    5052void TOI::findref() {
    5153  for (vector<TOI>::iterator i = alltois.begin();
  • trunk/Poubelle/archTOI.old/toiboloproducer.cc

    r612 r634  
    1111
    1212TOIBoloProducer::TOIBoloProducer() {
    13   possibleTOIs.insert(TOI(boloMuV, TOI::all, "linfilt sqfilt", "microVolts")); 
     13  possibleTOIs.insert(TOI(boloMuV, TOI::all, "linfilt sqfilt total", "microVolts")); 
    1414}
    1515
     
    2424
    2525void TOIBoloProducer::dataFeed(TOIProducer* source, TOI const& toi, long sampleNum, double value) {
     26 if (toi.name == "boloDACV") {
     27    boloDacV[toi.index] = value;
     28 }
     29
     30 if (toi.name == "boloRawMuV") {
    2631  if (source->canGetValue(sampleNum-1, toi)) {
    2732    value = (value + source->getValue(sampleNum-1, toi))/2.;
     
    3136
    3237    TOI toi2(boloMuV, toi.index, "sqfilt", toi.unit);
    33     computedValue(toi2, sampleNum, value);
     38    if (isProducing(toi2))
     39      computedValue(toi2, sampleNum, value);
     40     
     41    toi2.options.insert("total"); toi2.findref();
     42    if (isProducing(toi2)) {
     43      computedValue(toi2, sampleNum, boloDacV[toi.index] - value);
     44    }
    3445  }
    3546 
     
    5162    if (isProducing(toi2))
    5263      computedValue(toi2, sampleNum - filtHalfRange, y);
     64    toi2.options.insert("total"); toi2.findref();
     65    if (isProducing(toi2)) {
     66      computedValue(toi2, sampleNum - filtHalfRange, boloDacV[toi.index] - y);
     67    }
    5368    TOI toi3(boloMuV, toi.index, "", toi.unit);
    5469    if (isProducing(toi3))
    5570      computedValue(toi3, sampleNum - filtHalfRange, y);
     71    toi2.options.insert("total"); toi2.findref();
     72    if (isProducing(toi3)) {
     73      computedValue(toi3, sampleNum - filtHalfRange, boloDacV[toi.index] - y);
     74    }
    5675  }
     76 }
    5777}
    5878
     
    6181  if (toi.name == boloMuV) {
    6282    TOI toi2("boloRawMuV", toi.index);
    63     //toi2.name = "boloRawMuV";
    6483    t.insert(toi2);
    6584  } else {
    6685    throw ArchExc("Cannot produce "+toi.name);
     86  }
     87  if (toi.options.find("total") != toi.options.end()) {
     88    TOI toi2("boloDACV", toi.index);
     89    t.insert(toi2);
    6790  }
    6891  return t;
  • trunk/Poubelle/archTOI.old/toiboloproducer.h

    r612 r634  
    1818  virtual set<TOI>     reqTOIFor(TOI const&);
    1919  virtual void         propagateLowBound(TOI const&, long sampleNum);
     20  map<int, double>     boloDacV;
    2021 
    2122  static int filtHalfRange;
Note: See TracChangeset for help on using the changeset viewer.