Changeset 2448 in Sophya for trunk/ArchTOIPipe/Kernel
- Timestamp:
- Oct 13, 2003, 10:48:37 PM (22 years ago)
- Location:
- trunk/ArchTOIPipe/Kernel
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/Kernel/fitsringrdr.cc
r2370 r2448 2 2 // Christophe Magneville 3 3 // Reza Ansari 4 // $Id: fitsringrdr.cc,v 1. 6 2003-04-24 13:29:38aubourg Exp $4 // $Id: fitsringrdr.cc,v 1.7 2003-10-13 20:48:36 aubourg Exp $ 5 5 6 6 #include "fitsringrdr.h" … … 79 79 } 80 80 81 intFITSRingReader::calcMinOut() {81 long FITSRingReader::calcMinOut() { 82 82 chkinit(); 83 83 TOIManager* mgr = TOIManager::getManager(); 84 intfirstReq = mgr->getRequestedBegin();84 long firstReq = mgr->getRequestedBegin(); 85 85 return snBegin > firstReq ? snBegin : firstReq; 86 86 } 87 87 88 intFITSRingReader::calcMaxOut() {88 long FITSRingReader::calcMaxOut() { 89 89 chkinit(); 90 90 TOIManager* mgr = TOIManager::getManager(); 91 intlastReq = mgr->getRequestedEnd();91 long lastReq = mgr->getRequestedEnd(); 92 92 return snEnd < lastReq ? snEnd : lastReq; 93 93 } -
trunk/ArchTOIPipe/Kernel/fitsringrdr.h
r2359 r2448 6 6 // Christophe Magneville 7 7 // Reza Ansari 8 // $Id: fitsringrdr.h,v 1. 3 2003-04-01 13:27:48aubourg Exp $8 // $Id: fitsringrdr.h,v 1.4 2003-10-13 20:48:36 aubourg Exp $ 9 9 10 10 #ifndef FITSRINGRDR_H … … 35 35 36 36 protected: 37 virtual intcalcMinOut();38 virtual intcalcMaxOut();37 virtual long calcMinOut(); 38 virtual long calcMaxOut(); 39 39 40 40 // ajout vf 31/07/2002 -
trunk/ArchTOIPipe/Kernel/fitstoirdr.cc
r2194 r2448 3 3 // Christophe Magneville 4 4 // Reza Ansari 5 // $Id: fitstoirdr.cc,v 1.4 2 2002-09-16 13:28:29aubourg Exp $5 // $Id: fitstoirdr.cc,v 1.43 2003-10-13 20:48:37 aubourg Exp $ 6 6 7 7 #include "fitstoirdr.h" … … 178 178 } 179 179 180 intFITSTOIReader::calcMinOut() {180 long FITSTOIReader::calcMinOut() { 181 181 chkinit(); 182 182 TOIManager* mgr = TOIManager::getManager(); 183 intfirstReq = mgr->getRequestedBegin();183 long firstReq = mgr->getRequestedBegin(); 184 184 return snBegin > firstReq ? snBegin : firstReq; 185 185 } 186 186 187 intFITSTOIReader::calcMaxOut() {187 long FITSTOIReader::calcMaxOut() { 188 188 chkinit(); 189 189 TOIManager* mgr = TOIManager::getManager(); 190 intlastReq = mgr->getRequestedEnd();190 long lastReq = mgr->getRequestedEnd(); 191 191 return snEnd < lastReq ? snEnd : lastReq; 192 192 } -
trunk/ArchTOIPipe/Kernel/fitstoirdr.h
r2206 r2448 5 5 // Christophe Magneville 6 6 // Reza Ansari 7 // $Id: fitstoirdr.h,v 1.1 4 2002-10-07 14:23:02aubourg Exp $7 // $Id: fitstoirdr.h,v 1.15 2003-10-13 20:48:37 aubourg Exp $ 8 8 9 9 … … 45 45 46 46 protected: 47 virtual intcalcMinOut();48 virtual intcalcMaxOut();47 virtual long calcMinOut(); 48 virtual long calcMaxOut(); 49 49 50 50 // ajout vf 31/07/2002 -
trunk/ArchTOIPipe/Kernel/piotoirdr.cc
r2398 r2448 3 3 // Christophe Magneville 4 4 // Reza Ansari 5 // $Id: piotoirdr.cc,v 1.1 0 2003-06-05 08:15:47 aubourg Exp $5 // $Id: piotoirdr.cc,v 1.11 2003-10-13 20:48:37 aubourg Exp $ 6 6 7 7 #include "piotoirdr.h" … … 93 93 << snBegin << " " << snEnd << endl; 94 94 95 for ( intsnb = snBegin; snb <= snEnd; snb += bufferSize) {96 intsne = snb + bufferSize - 1;95 for (long snb = snBegin; snb <= snEnd; snb += bufferSize) { 96 long sne = snb + bufferSize - 1; 97 97 if (sne > snEnd) sne=snEnd; 98 98 // TBD : check if PIODOUBLE != double; 99 char command[ 80];99 char command[128]; 100 100 sprintf(command, "Begin=%d; End=%d", snb, sne); 101 101 double* data = NULL; … … 103 103 PIOBYTE* pioflags = NULL; 104 104 fits_lock(); 105 char objname[128]; 106 strcpy(objname, object.c_str()); 105 107 PIOLONG n = PIOReadTOI((void**) &data, 106 const_cast<char*>(object.c_str()),108 objname, 107 109 "PIODOUBLE", 108 110 command, … … 113 115 } 114 116 if (flagdef != "") { 117 char flagname[128]; 118 strcpy(flagname, flagdef.c_str()); 115 119 PIOLONG nf = PIOReadFLGObjectMask(&pioflags, 116 const_cast<char*>(flagdef.c_str()),117 118 120 flagname, 121 command, 122 pioGroup); 119 123 if (nf != n) { 120 124 cerr << "*** PIO Error, inconsistent read, data " << n << " flags " -
trunk/ArchTOIPipe/Kernel/toimanager.cc
r2393 r2448 3 3 // Christophe Magneville 4 4 // Reza Ansari 5 // $Id: toimanager.cc,v 1.2 3 2003-05-28 21:03:53aubourg Exp $5 // $Id: toimanager.cc,v 1.24 2003-10-13 20:48:37 aubourg Exp $ 6 6 7 7 #include "toimanager.h" … … 11 11 #include <unistd.h> 12 12 #include <map> 13 14 //#ifndef NOCFITSIO 15 #include "fitstoiwtr.h" 16 //#endif 13 17 14 18 #ifndef MAXINT … … 139 143 // fin ajout vf 140 144 141 void TOIManager::setRequestedSample( int begin, intend) {145 void TOIManager::setRequestedSample(long begin, long end) { 142 146 cout << "TOIManager::setRequestedSample should not be called anymore" << endl; 143 147 cout << " call same method one any toiprocessor" << endl; … … 229 233 230 234 if (withFlag) { // Si c'est un FITSTOIWriter 235 //#ifndef NOCFITSIO 231 236 FITSTOIWriter* ftw = dynamic_cast< FITSTOIWriter* >(&prin); 232 237 if (ftw) ftw->addInput(in, toi, withFlag); 233 238 else prin.addInput(in, toi); 239 //#else 240 // prin.addInput(in, toi); 241 //#endif 234 242 } 235 243 else prin.addInput(in, toi); -
trunk/ArchTOIPipe/Kernel/toimanager.h
r2386 r2448 5 5 // Christophe Magneville 6 6 // Reza Ansari 7 // $Id: toimanager.h,v 1.1 8 2003-05-20 10:10:09aubourg Exp $7 // $Id: toimanager.h,v 1.19 2003-10-13 20:48:37 aubourg Exp $ 8 8 9 9 … … 25 25 #include "toiseqbuff.h" 26 26 #include "toisegment.h" 27 #include "fitstoiwtr.h"27 //#include "fitstoiwtr.h" 28 28 29 29 #ifdef WITH_SOPHYA … … 44 44 static TOIManager* getManager(); 45 45 virtual ~TOIManager() {} 46 void setRequestedSample( int begin, intend);46 void setRequestedSample(long begin, long end); 47 47 int getRequestedBegin(); 48 48 int getRequestedEnd(); -
trunk/ArchTOIPipe/Kernel/toiprocessor.cc
r2282 r2448 3 3 // Christophe Magneville 4 4 // Reza Ansari 5 // $Id: toiprocessor.cc,v 1.2 7 2002-11-28 15:49:21aubourg Exp $5 // $Id: toiprocessor.cc,v 1.28 2003-10-13 20:48:37 aubourg Exp $ 6 6 7 7 #include "toiprocessor.h" … … 93 93 } 94 94 95 intTOIProcessor::getMinOut() {95 long TOIProcessor::getMinOut() { 96 96 // return snBegin + lowExtra; 97 97 return snBegin; 98 98 } 99 99 100 intTOIProcessor::getMaxOut() {100 long TOIProcessor::getMaxOut() { 101 101 // return snEnd - upExtra; 102 102 return snEnd; 103 103 } 104 104 105 intTOIProcessor::calcMinOut() {105 long TOIProcessor::calcMinOut() { 106 106 return getMinIn() + lowExtra; 107 107 } 108 108 109 intTOIProcessor::calcMaxOut() {109 long TOIProcessor::calcMaxOut() { 110 110 return getMaxIn() - upExtra; 111 111 } 112 112 113 intTOIProcessor::getMinIn() {113 long TOIProcessor::getMinIn() { 114 114 // return snBegin; 115 115 return snBegin - lowExtra; 116 116 } 117 117 118 intTOIProcessor::getMaxIn() {118 long TOIProcessor::getMaxIn() { 119 119 // return snEnd; 120 120 return snEnd + upExtra; … … 312 312 #ifndef NO_SOPHYA 313 313 /* ---- l'interface va etre modifiee, NE PAS UTILISER 314 Array TOIProcessor::getData(int toiIndex, int iStart, intiEnd) {314 Array TOIProcessor::getData(int toiIndex, long iStart, long iEnd) { 315 315 TOI* toi = getInputTOI(toiIndex); 316 316 toi->waitForData(iStart, iEnd); … … 318 318 } 319 319 320 Array TOIProcessor::getError(int toiIndex, int iStart, intiEnd) {320 Array TOIProcessor::getError(int toiIndex, long iStart, long iEnd) { 321 321 TOI* toi = getInputTOI(toiIndex); 322 322 toi->waitForData(iStart, iEnd); … … 324 324 } 325 325 326 TArray<int_4> TOIProcessor::getFlag(int toiIndex, int iStart, intiEnd) {326 TArray<int_4> TOIProcessor::getFlag(int toiIndex, long iStart, long iEnd) { 327 327 TOI* toi = getInputTOI(toiIndex); 328 328 toi->waitForData(iStart, iEnd); … … 332 332 #endif 333 333 334 double TOIProcessor::getData(int toiIndex, inti) {334 double TOIProcessor::getData(int toiIndex, long i) { 335 335 TOI* toi = getInputTOI(toiIndex); 336 336 if (toi->needSyncOldWay()) toi->waitForData(i); // seulement pour autre que segmented … … 339 339 } 340 340 341 void TOIProcessor::getData(int toiIndex, inti, double &data, uint_8 &flag)341 void TOIProcessor::getData(int toiIndex, long i, double &data, uint_8 &flag) 342 342 { 343 343 TOI* toi = getInputTOI(toiIndex); … … 348 348 } 349 349 350 void TOIProcessor::getData(int toiIndex, int i, intn, double* d)350 void TOIProcessor::getData(int toiIndex, long i, long n, double* d) 351 351 { 352 352 TOI* toi = getInputTOI(toiIndex); … … 357 357 } 358 358 359 void TOIProcessor::getData(int toiIndex, int i, intn, double* d, uint_8* f)359 void TOIProcessor::getData(int toiIndex, long i, long n, double* d, uint_8* f) 360 360 { 361 361 TOI* toi = getInputTOI(toiIndex); … … 368 368 369 369 /*RZCMV 370 double TOIProcessor::getError(int toiIndex, inti) {370 double TOIProcessor::getError(int toiIndex, long i) { 371 371 TOI* toi = getInputTOI(toiIndex); 372 372 toi->waitForData(i); … … 374 374 } 375 375 376 int_4 TOIProcessor::getFlag(int toiIndex, inti) {376 int_4 TOIProcessor::getFlag(int toiIndex, long i) { 377 377 TOI* toi = getInputTOI(toiIndex); 378 378 toi->waitForData(i); … … 381 381 */ 382 382 383 void TOIProcessor::setNeededHistory( intnsamples) {383 void TOIProcessor::setNeededHistory(long nsamples) { 384 384 neededHistory = nsamples; 385 385 } 386 386 387 void TOIProcessor::wontNeedBefore( inti) {387 void TOIProcessor::wontNeedBefore(long i) { 388 388 if (i<wontNeedValue) return; 389 389 wontNeedValue = i; … … 394 394 } 395 395 396 void TOIProcessor::autoWontNeed( intiCur) {396 void TOIProcessor::autoWontNeed(long iCur) { 397 397 if (neededHistory <=0) return; 398 398 if (iCur < lastAWN + neededHistory/10) return; … … 409 409 410 410 411 void TOIProcessor::putData(int toiIndex, inti, double value, uint_8 flg) {411 void TOIProcessor::putData(int toiIndex, long i, double value, uint_8 flg) { 412 412 TOI* toi = getOutputTOI(toiIndex); 413 413 if (toi == NULL) return; … … 417 417 } 418 418 419 void TOIProcessor::putData(int toiIndex, int i, intn, double const* val,419 void TOIProcessor::putData(int toiIndex, long i, long n, double const* val, 420 420 uint_8 const* flg) { 421 421 TOI* toi = getOutputTOI(toiIndex); … … 426 426 427 427 /*RZCMV 428 void TOIProcessor::putDataError(int toiIndex, inti, double value,428 void TOIProcessor::putDataError(int toiIndex, long i, double value, 429 429 double error, int_4 flg) { 430 430 TOI* toi = getOutputTOI(toiIndex); -
trunk/ArchTOIPipe/Kernel/toiprocessor.h
r2187 r2448 5 5 // Christophe Magneville 6 6 // Reza Ansari 7 // $Id: toiprocessor.h,v 1.2 0 2002-09-09 15:33:15aubourg Exp $7 // $Id: toiprocessor.h,v 1.21 2003-10-13 20:48:37 aubourg Exp $ 8 8 9 9 … … 48 48 virtual void run(); 49 49 50 virtual intgetMinOut();51 virtual intgetMaxOut();50 virtual long getMinOut(); 51 virtual long getMaxOut(); 52 52 53 53 // rajout vf 29/07/2002 … … 71 71 #ifndef NO_SOPHYA 72 72 /* ---- l'interface va etre modifiee, NE PAS UTILISER 73 Array getData(int toiIndex, int iStart, intiEnd);74 Array getError(int toiIndex, int iStart, intiEnd);75 TArray<int_4> getFlag(int toiIndex, int iStart, intiEnd);73 Array getData(int toiIndex, long iStart, long iEnd); 74 Array getError(int toiIndex, long iStart, long iEnd); 75 TArray<int_4> getFlag(int toiIndex, long iStart, long iEnd); 76 76 l'interface va etre modifiee, NE PAS UTILISER ---- */ 77 77 #endif … … 80 80 // Les methodes qui suivent ne peuvent etre 81 81 // utilisees que sur des entrees simples 82 double getData(int toiIndex, inti);83 void getData(int toiIndex, inti, double &data, uint_8 &flag);84 85 void getData(int toiIndex, int i, intn, double* d);86 void getData(int toiIndex, int i, intn, double* d, uint_8* f);87 88 //RZCMV double getError(int toiIndex, inti);89 //RZCMV int_4 getFlag(int toiIndex, inti);90 91 void wontNeedBefore( inti);92 intwontNeedValue;93 void setNeededHistory( intnsamples); // -1 : disable94 95 void putData(int toiIndex, inti, double value, uint_8 flag=0);96 //RZCMV void putDataError(int toiIndex, inti, double value,82 double getData(int toiIndex, long i); 83 void getData(int toiIndex, long i, double &data, uint_8 &flag); 84 85 void getData(int toiIndex, long i, long n, double* d); 86 void getData(int toiIndex, long i, long n, double* d, uint_8* f); 87 88 //RZCMV double getError(int toiIndex, long i); 89 //RZCMV int_4 getFlag(int toiIndex, long i); 90 91 void wontNeedBefore(long i); 92 long wontNeedValue; 93 void setNeededHistory(long nsamples); // -1 : disable 94 95 void putData(int toiIndex, long i, double value, uint_8 flag=0); 96 //RZCMV void putDataError(int toiIndex, long i, double value, 97 97 //RZCMV double error, int_4 flag=0); 98 98 99 void putData(int toiIndex, int i, intn, double const* val,99 void putData(int toiIndex, long i, long n, double const* val, 100 100 uint_8 const* flg=0); 101 101 … … 103 103 public: 104 104 // Methodes passees en public par Reza, 14/5/2002 105 virtual intcalcMinOut(); // Protected ?106 virtual intcalcMaxOut(); // Protected ?107 108 virtual intgetMinIn();109 virtual intgetMaxIn();105 virtual long calcMinOut(); // Protected ? 106 virtual long calcMaxOut(); // Protected ? 107 108 virtual long getMinIn(); 109 virtual long getMaxIn(); 110 110 protected: 111 111 // Implementation par defaut 112 intminOut; // Cache for calcMinOut() value. Protected ?113 intmaxOut; // Cache for calcMaxOut() value. Protected ?112 long minOut; // Cache for calcMinOut() value. Protected ? 113 long maxOut; // Cache for calcMaxOut() value. Protected ? 114 114 115 115 int upExtra; // MaxIn - MaxOut : extra samples for processing 116 116 int lowExtra; // MinOut - MinIn : extra samples for processing 117 117 118 intforcedMinIn; // to process a subset of data119 intforcedMaxIn; // to process a subset of data120 void setSampleSubset( int min, intmax);118 long forcedMinIn; // to process a subset of data 119 long forcedMaxIn; // to process a subset of data 120 void setSampleSubset(long min, long max); 121 121 122 122 int neededHistory; … … 134 134 // Fin rajout Reza 11/3/2001 135 135 136 void autoWontNeed( intiCur);137 intlastAWN;136 void autoWontNeed(long iCur); 137 long lastAWN; 138 138 139 139 … … 158 158 virtual ~TOIProcessor(); 159 159 160 void setMinSn( intn) {forcedMinIn = n;}161 void setMaxSn( intn) {forcedMaxIn = n;}160 void setMinSn(long n) {forcedMinIn = n;} 161 void setMaxSn(long n) {forcedMaxIn = n;} 162 162 163 163 // ajout vf 23/08/2002
Note:
See TracChangeset
for help on using the changeset viewer.