- Timestamp:
- Nov 25, 1999, 9:34:50 AM (26 years ago)
- Location:
- trunk/Poubelle/archTOI.old
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Poubelle/archTOI.old/archtoi.cc
r555 r634 109 109 { 110 110 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; 116 116 } 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; 122 122 } 123 123 -
trunk/Poubelle/archTOI.old/archtoimain.cc
r555 r634 32 32 } 33 33 34 //ProfilerInit(collectDetailed, bestTimeBase, 10000, 200);34 // ProfilerInit(collectDetailed, bestTimeBase, 10000, 200); 35 35 36 36 if (argv[1] == string("-h")) { … … 49 49 } 50 50 51 //ProfilerDump("\pprofiler.data");51 // ProfilerDump("\pprofiler.data"); 52 52 return(0); 53 53 } -
trunk/Poubelle/archTOI.old/asigps.cc
r426 r634 4 4 #include "asigps.h" 5 5 #include <fstream.h> 6 #include <stdio.h> 6 7 7 8 ASIGPS::ASIGPS(string const& filename) { -
trunk/Poubelle/archTOI.old/gyrocalibrator.cc
r555 r634 139 139 } 140 140 } 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 141 151 if (lastFence1<0 || lastFence2<0) return true; 142 152 if (sampleNum > lastFence2) return true; … … 170 180 171 181 172 void GyroCalibrator::propagateLowBound(TOI const& , long /*sampleNum*/) {182 void GyroCalibrator::propagateLowBound(TOI const& toi, long sampleNum) { 173 183 if (startSample < lastFence1) { 174 184 if (gyro[0].size() > lastFence1 - startSample) { … … 180 190 } 181 191 } 192 TOIPullProducer::propagateLowBound(toi, sampleNum); 182 193 } 183 194 -
trunk/Poubelle/archTOI.old/toi.cc
r555 r634 5 5 #include "tokenizer.h" 6 6 #include "archexc.h" 7 #include <stdio.h> 7 8 8 9 vector<TOI> TOI::alltois; 9 10 10 11 TOI::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) 12 13 { 13 14 options = Tokenizer(opts).getTokenSet(); … … 16 17 17 18 TOI::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) 19 20 { 20 21 options = Tokenizer(opts).getTokenSet(); … … 25 26 26 27 TOI::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) 28 29 { 29 30 findref(); … … 31 32 32 33 TOI::TOI(string s, string u) 33 : index(unspec), unit(u) 34 : index(unspec), unit(u), ref(-1) 34 35 { 35 36 vector<string> v = Tokenizer(s).getTokenVector(); … … 48 49 } 49 50 51 // $CHECK$ a optimiser avec hash ou arbre... 50 52 void TOI::findref() { 51 53 for (vector<TOI>::iterator i = alltois.begin(); -
trunk/Poubelle/archTOI.old/toiboloproducer.cc
r612 r634 11 11 12 12 TOIBoloProducer::TOIBoloProducer() { 13 possibleTOIs.insert(TOI(boloMuV, TOI::all, "linfilt sqfilt ", "microVolts"));13 possibleTOIs.insert(TOI(boloMuV, TOI::all, "linfilt sqfilt total", "microVolts")); 14 14 } 15 15 … … 24 24 25 25 void 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") { 26 31 if (source->canGetValue(sampleNum-1, toi)) { 27 32 value = (value + source->getValue(sampleNum-1, toi))/2.; … … 31 36 32 37 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 } 34 45 } 35 46 … … 51 62 if (isProducing(toi2)) 52 63 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 } 53 68 TOI toi3(boloMuV, toi.index, "", toi.unit); 54 69 if (isProducing(toi3)) 55 70 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 } 56 75 } 76 } 57 77 } 58 78 … … 61 81 if (toi.name == boloMuV) { 62 82 TOI toi2("boloRawMuV", toi.index); 63 //toi2.name = "boloRawMuV";64 83 t.insert(toi2); 65 84 } else { 66 85 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); 67 90 } 68 91 return t; -
trunk/Poubelle/archTOI.old/toiboloproducer.h
r612 r634 18 18 virtual set<TOI> reqTOIFor(TOI const&); 19 19 virtual void propagateLowBound(TOI const&, long sampleNum); 20 map<int, double> boloDacV; 20 21 21 22 static int filtHalfRange;
Note:
See TracChangeset
for help on using the changeset viewer.