Changeset 1462 in Sophya
- Timestamp:
- Apr 10, 2001, 6:35:25 PM (24 years ago)
- Location:
- trunk/ArchTOIPipe
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/Kernel/asciitoiwtr.cc
r1370 r1462 39 39 int sne = getMaxIn(); 40 40 41 double val; 42 int_4 flg; 41 43 for (int sn = snb; sn <= sne; sn++) { 42 44 s << sn << " "; 43 45 for (int i=0; i<ncols; i++) { 44 double x = getData(i, sn); 45 s << x << " "; 46 if (outFlags) { 47 int_4 f = getFlag(i, sn); 48 s << f << " "; 49 } 46 getData(i, sn, val, flg); 47 s << val << " "; 48 if (outFlags) 49 s << flg << " "; 50 50 } 51 51 s << '\n'; -
trunk/ArchTOIPipe/Kernel/fitstoiwtr.cc
r1442 r1462 115 115 // cout << " DBG-A-FitsWriter::run()" << sn << endl; 116 116 try { 117 int_4 out_flg; 118 double out_val; 117 119 for (i=0; i<ndata; i++) { 118 120 if (tabck[i]) { 119 tabdata[i] = getData(i, sn); 120 if (outFlags) tabflag[i] = getFlag(i, sn); 121 getData(i,sn, out_val, out_flg); 122 tabdata[i] = out_val; 123 if (outFlags) tabflag[i] = out_flg; 121 124 } 122 125 } -
trunk/ArchTOIPipe/Kernel/toi.cc
r1437 r1462 80 80 #endif 81 81 82 /*RZCMV 82 83 double TOI::getError(int i) { 83 84 if (errorTOI == NULL) throw NotFoundExc("TOI::getDataError : no Error TOI"); … … 91 92 } 92 93 94 */ 95 93 96 #ifndef NO_SOPHYA 94 97 Array TOI::getData(int iStart, int iEnd) { … … 103 106 double TOI::getData(int i) { 104 107 lock(); 105 double dat = doGetData(i); 108 int_4 flg; 109 double dat; 110 doGetData(i, dat, flg); 106 111 unlock(); 107 112 if (fgsigput) { fgsigput = false; broadcast(); } … … 109 114 } 110 115 116 void TOI::getData(int i, double &data,int_4 &flag) { 117 lock(); 118 doGetData(i, data, flag); 119 unlock(); 120 if (fgsigput) { fgsigput = false; broadcast(); } 121 return; 122 } 123 124 111 125 112 126 #ifndef NO_SOPHYA … … 120 134 #endif 121 135 122 int_4 TOI::getFlag(int i) {123 lock();124 int_4 f = doGetFlag(i);125 unlock();126 if (fgsigput) { fgsigput = false; broadcast(); }127 return f;128 }129 136 130 137 … … 249 256 #endif 250 257 251 double TOIRegularWindow::doGetData(int i) {258 void TOIRegularWindow::doGetData(int i, double & val, int_4 & flg) { 252 259 if (isDataAvailNL(i) != DATA_OK) { 253 260 cerr << "TOI::getData : data not available " << i << endl; 254 261 throw RangeCheckError("TOI::getData : data not available"); 255 262 } 256 double dat = data[i - i0]; 257 return dat; 263 264 val = data[i - i0]; 265 flg = flags[i - i0]; 266 258 267 } 259 268 … … 271 280 #endif 272 281 282 /*RZCMV 273 283 int_4 TOIRegularWindow::doGetFlag(int i) { 274 284 if (isDataAvailNL(i) != DATA_OK) { … … 278 288 return flags[i - i0]; 279 289 } 290 */ 280 291 281 292 -
trunk/ArchTOIPipe/Kernel/toi.h
r1437 r1462 32 32 33 33 #ifdef WITH_SOPHYA 34 // l'interface va etre modifiee, NE PAS UTILISER 34 35 virtual Array getData(int iStart, int iEnd); 35 36 virtual Array getError(int iStart, int iEnd); 36 37 virtual TArray<int_4> getFlag(int iStart, int iEnd); 38 // l'interface va etre modifiee, NE PAS UTILISER 37 39 #endif 40 41 enum DataStatus {DATA_OK=0, DATA_DELETED, DATA_NOT_YET}; 38 42 39 43 virtual double getData(int i); 40 virtual double getError(int i);41 virtual int_4 getFlag(int i);44 virtual void getData(int i,double &data,int_4 &flag); 45 //RZCMV virtual DataStatus getDataError(int i,double &data,double &error,int_4 &flag); 42 46 43 enum DataStatus {DATA_OK=0, DATA_DELETED, DATA_NOT_YET};44 47 virtual DataStatus isDataAvail(int iStart, int iEnd); 45 48 virtual DataStatus isDataAvail(int i); … … 51 54 52 55 virtual void putData(int i, double value, int_4 flag=0); 53 virtual void putDataError(int i, double value,54 double error, int_4 flag=0);56 //RZCMV virtual void putDataError(int i, double value, 57 // double error, int_4 flag=0); 55 58 56 59 virtual void wontNeedBefore(int i); … … 82 85 virtual TArray<int_4> doGetFlag(int iStart, int iEnd)=0; 83 86 #endif 84 virtual double doGetData(int i)=0; 85 virtual int_4 doGetFlag(int i)=0; 87 virtual void doGetData(int i, double& data, int_4& flag)=0; 86 88 virtual void doPutData(int i, double value, int_4 flag=0)=0; 87 89 virtual void doWontNeedBefore(int i); … … 156 158 virtual TArray<int_4> doGetFlag(int iStart, int iEnd); 157 159 #endif 158 virtual double doGetData(int i); 159 virtual int_4 doGetFlag(int i); 160 virtual void doGetData(int i, double & val, int_4 & flg); 160 161 161 162 virtual void doPutData(int i, double value, int_4 flag=0); -
trunk/ArchTOIPipe/Kernel/toiprocessor.cc
r1439 r1462 284 284 } 285 285 286 void TOIProcessor::getData(int toiIndex, int i, double &data,int_4 &flag) 287 { 288 TOI* toi = getInputTOI(toiIndex); 289 toi->waitForData(i); 290 toi->getData(i, data, flag); 291 return; 292 } 293 294 /*RZCMV 286 295 double TOIProcessor::getError(int toiIndex, int i) { 287 296 TOI* toi = getInputTOI(toiIndex); … … 295 304 return toi->getFlag(i); 296 305 } 306 */ 297 307 298 308 void TOIProcessor::setNeededHistory(int nsamples) { … … 334 344 } 335 345 336 346 /*RZCMV 337 347 void TOIProcessor::putDataError(int toiIndex, int i, double value, 338 348 double error, int_4 flg) { … … 344 354 notify(); 345 355 } 346 347 356 */ 357 -
trunk/ArchTOIPipe/Kernel/toiprocessor.h
r1443 r1462 52 52 // utilisees que sur des entrees simples 53 53 double getData(int toiIndex, int i); 54 double getError(int toiIndex, int i); 55 int_4 getFlag(int toiIndex, int i); 54 void getData(int toiIndex, int i, double &data,int_4 &flag); 55 56 //RZCMV double getError(int toiIndex, int i); 57 //RZCMV int_4 getFlag(int toiIndex, int i); 56 58 57 59 void wontNeedBefore(int i); … … 60 62 61 63 void putData(int toiIndex, int i, double value, int_4 flag=0); 62 void putDataError(int toiIndex, int i, double value,63 double error, int_4 flag=0);64 //RZCMV void putDataError(int toiIndex, int i, double value, 65 //RZCMV double error, int_4 flag=0); 64 66 65 67 // Gestion des bornes pour les transformations de TOIs... -
trunk/ArchTOIPipe/Kernel/toiseqbuff.cc
r1442 r1462 96 96 #endif 97 97 98 double TOISeqBuffered::doGetData(int i) {98 void TOISeqBuffered::doGetData(int i, double & val, int_4 & flg) { 99 99 if (!started) { 100 100 cout << " TOISeqBuffered::doGetData() - waitGet() Waiting for start ... " << endl; … … 121 121 } 122 122 cleanWaitGet(); 123 double dat = dataRef(i); 123 val = dataRef(i); 124 flg = flagRef(i); 124 125 if (first_out < 0) first_out = i; 125 126 if ((i+1) > next_out) next_out = i+1; … … 131 132 signalPut(); 132 133 } 133 return dat;134 return; 134 135 } 135 136 … … 149 150 #endif 150 151 152 /*RZCMV 151 153 int_4 TOISeqBuffered::doGetFlag(int i) { 152 154 if (!started) waitGet(); … … 158 160 return dat; 159 161 } 162 */ 160 163 161 164 -
trunk/ArchTOIPipe/Kernel/toiseqbuff.h
r1442 r1462 47 47 virtual TArray<int_4> doGetFlag(int iStart, int iEnd); 48 48 #endif 49 virtual double doGetData(int i); 50 virtual int_4 doGetFlag(int i); 49 virtual void doGetData(int i, double & val, int_4 & flg); 51 50 52 51 virtual void doPutData(int i, double value, int_4 flag=0); -
trunk/ArchTOIPipe/ProcWSophya/rztoi.cc
r1443 r1462 1 #include "array.h" 1 2 #include "rztoi.h" 2 3 #include "toimanager.h" -
trunk/ArchTOIPipe/ProcWSophya/simtoipr.cc
r1454 r1462 1 #include "array.h" 1 2 #include "simtoipr.h" 2 3 #include <math.h> -
trunk/ArchTOIPipe/SMakefile
r1442 r1462 1 USERFLAGS = -I$(EXTLIBDIR)/Include/FitsIO -DWITH_SOPHYA 1 # USERFLAGS = -I$(EXTLIBDIR)/Include/FitsIO -DWITH_SOPHYA 2 USERFLAGS = -I$(EXTLIBDIR)/Include/FitsIO 2 3 include $(DPCBASEREP)/Include/MakefileUser.h 3 4 ALIB := ./ Objs/5 AOBJ := ./ Objs/4 5 ALIB := ./$(MACHDIR)/ 6 AOBJ := ./$(MACHDIR)/ 6 7 7 8 $(AOBJ)%.o:%.cc 8 $(COMPILE.cc) 9 $(COMPILE.cc) $(USERFLAGS) -o $@ $< 9 10 $(AOBJ)%.o:%.c 10 $(COMPILE.c) -c$(CFLAGS) $(USERFLAGS) -o $@ $<11 $(COMPILE.c) $(CFLAGS) $(USERFLAGS) -o $@ $< 11 12 12 LIBOLIST := $(AOBJ)asciitoiwtr.o $(AOBJ)fitstoirdr.o $(AOBJ)fitstoiwtr.o $(AOBJ)toi.o $(AOBJ)toimanager.o $(AOBJ)toiprocessor.o $(AOBJ)toisqfilter.o \ 13 $(AOBJ)toiseqbuff.o $(AOBJ)simtoipr.o 14 EXEOLIST := $(AOBJ)fits2asc.o $(AOBJ)tsttoi.o $(AOBJ)tsttoi2.o 15 EXELIST := $(AOBJ)simtst $(AOBJ)tstrztoi $(AOBJ)fits2asc $(AOBJ)tsttoi $(AOBJ)tsttoi2 13 LIBOLIST := $(AOBJ)asciitoiwtr.o $(AOBJ)fitstoirdr.o $(AOBJ)fitstoiwtr.o \ 14 $(AOBJ)toi.o $(AOBJ)toimanager.o $(AOBJ)toiprocessor.o \ 15 $(AOBJ)toisqfilter.o $(AOBJ)toiseqbuff.o $(AOBJ)simtoipr.o \ 16 $(AOBJ)map2toi.o $(AOBJ)toi2map.o 17 EXEOLIST := $(AOBJ)fits2asc.o $(AOBJ)tsttoi.o $(AOBJ)tsttoi2.o $(AOBJ)simtst.o \ 18 $(AOBJ)tstrztoi.o $(AOBJ)rztoi.o \ 19 $(AOBJ)fits2ascii.o $(AOBJ)tstmap2toi.o $(AOBJ)tsttoi2map.o 20 EXELIST := $(AOBJ)simtst $(AOBJ)tstrztoi $(AOBJ)fits2asc $(AOBJ)tsttoi \ 21 $(AOBJ)tsttoi2 $(AOBJ)fits2ascii $(AOBJ)tstmap2toi $(AOBJ)tsttoi2map 16 22 17 23 INCLIST := asciitoiwtr.h fitstoirdr.h fitstoiwtr.h toi.h config.h conf.h \ 18 toiprocessor.h toimanager.h toiseqbuff.h simtoipr.h 19 24 toiprocessor.h toimanager.h toiseqbuff.h simtoipr.h map2toi.h toi2map.h 20 25 21 26 all : $(EXELIST) 27 lib : $(LIBOLIST) 22 28 23 29 clean: … … 25 31 rm -f $(EXEOLIST) 26 32 rm -f $(EXELIST) 27 # rm -f $(AOBJ)asciitoiwtr.o $(AOBJ)fitstoirdr.o $(AOBJ)fitstoiwtr.o $(AOBJ)toi.o $(AOBJ)toimanager.o $(AOBJ)toiprocessor.o $(AOBJ)toisqfilter.o $(AOBJ)tsttoi.o28 33 29 34 LIBF = $(SLB)libsophya.so $(SLB)libextsophya.so 30 LIBS = -L$(SLB) -lextsophya -lsophya -lpthread -lm35 LIBS = -L$(SLB) -lextsophya -lsophya -lpthread -lm 31 36 ifeq ($(MACHEROS),OSF1) 32 37 LIBS := $(LIBS) -lfor … … 44 49 $(AOBJ)tsttoi2: $(AOBJ)tsttoi2.o $(LIBOLIST) 45 50 $(LINK.cc) -o $@ $^ $(LIBS) 51 $(AOBJ)fits2ascii: $(AOBJ)fits2ascii.o $(LIBOLIST) 52 $(LINK.cc) -o $@ $^ $(LIBS) 53 $(AOBJ)tstmap2toi: $(AOBJ)tstmap2toi.o $(LIBOLIST) 54 $(LINK.cc) -o $@ $^ $(LIBS) 55 $(AOBJ)tsttoi2map: $(AOBJ)tsttoi2map.o $(LIBOLIST) 56 $(LINK.cc) -o $@ $^ $(LIBS) 46 57 47 58 $(AOBJ)tstrztoi.o: tstrztoi.cc rztoi.h $(INCLIST) … … 50 61 $(AOBJ)tsttoi.o: tsttoi.cc $(INCLIST) 51 62 $(AOBJ)tsttoi2.o: tsttoi2.cc $(INCLIST) 63 $(AOBJ)fits2ascii.o: fits2ascii.cc $(INCLIST) 64 $(AOBJ)tstmap2toi.o: tstmap2toi.cc $(INCLIST) 65 $(AOBJ)tsttoi2toi.o: tsttoi2map.cc $(INCLIST) 52 66 53 54 67 $(AOBJ)asciitoiwtr.o: asciitoiwtr.cc asciitoiwtr.h toi.h config.h conf.h \ 55 toiprocessor.h toimanager.h68 toiprocessor.h toimanager.h 56 69 $(AOBJ)fitstoirdr.o: fitstoirdr.cc fitstoirdr.h toiprocessor.h config.h conf.h 57 70 $(AOBJ)fitstoiwtr.o: fitstoiwtr.cc fitstoiwtr.h toi.h config.h conf.h … … 59 72 $(AOBJ)toimanager.o: toimanager.cc toimanager.h 60 73 $(AOBJ)toiprocessor.o: toiprocessor.cc toiprocessor.h config.h conf.h toi.h \ 61 toimanager.h74 toimanager.h 62 75 $(AOBJ)toisqfilter.o: toisqfilter.cc toisqfilter.h toiprocessor.h config.h \ 63 conf.h toi.h toimanager.h76 conf.h toi.h toimanager.h 64 77 $(AOBJ)toiseqbuff.o: toiseqbuff.cc toiprocessor.h config.h conf.h toi.h \ 65 toiseqbuff.h78 toiseqbuff.h 66 79 $(AOBJ)simtoipr.o: simtoipr.cc toiprocessor.h config.h conf.h toi.h \ 67 simtoipr.h 80 simtoipr.h 81 $(AOBJ)map2toi.o: map2toi.cc map2toi.h 82 $(AOBJ)toi2map.o: toi2map.cc toi2map.h -
trunk/ArchTOIPipe/TestPipes/fits2asc.cc
r1437 r1462 1 #include "machdefs.h" 1 2 #include "toi.h" 2 3 #include "toiprocessor.h" … … 13 14 14 15 15 int n = r.getNOut();16 for (int i=0; i<n ; i++) {16 int ncol = r.getNOut(); 17 for (int i=0; i<ncol; i++) { 17 18 TOI* toi = new TOIRegularWindow("t1"); 18 19 string n = r.getOutName(i); -
trunk/ArchTOIPipe/TestPipes/simtst.cc
r1454 r1462 1 #include "machdefs.h" 2 #include "array.h" 1 3 #include <unistd.h> 2 4 #include <stdexcept> -
trunk/ArchTOIPipe/TestPipes/tstrztoi.cc
r1442 r1462 1 #include "machdefs.h" 2 #include "array.h" 1 3 #include <unistd.h> 2 4 #include <stdexcept>
Note:
See TracChangeset
for help on using the changeset viewer.