Changeset 2353 in Sophya for trunk/ArchTOIPipe
- Timestamp:
- Mar 26, 2003, 10:18:44 AM (23 years ago)
- Location:
- trunk/ArchTOIPipe/Kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/Kernel/fitsringrdr.cc
r2351 r2353 2 2 // Christophe Magneville 3 3 // Reza Ansari 4 // $Id: fitsringrdr.cc,v 1. 1 2003-03-24 10:59:45cecile Exp $4 // $Id: fitsringrdr.cc,v 1.2 2003-03-26 09:18:44 cecile Exp $ 5 5 6 6 #include "fitsringrdr.h" … … 15 15 allfn.push_back(fn); 16 16 cout<<"FITSRingReader::FITSRingReader"<<endl; 17 cout<<"FITSTOIReader::inited "<<inited<<" bsz="<<Buff_Sz<<endl; 17 18 name = "rdr"; 18 19 fptr = NULL; 20 totnscount = 0; 19 21 } 20 22 … … 23 25 24 26 27 void FITSRingReader::setBufferSize(int buffsz) 28 { 29 Buff_Sz = (buffsz>0) ? buffsz: 1024; 30 return; 31 } 32 25 33 void FITSRingReader::openFile(string fn) { 34 cout << "(((((((((((((((((((((((((((((((((((((((((((" << endl; 35 26 36 fits_lock(); 27 37 if (fptr) { … … 65 75 66 76 } 77 78 int FITSRingReader::calcMinOut() { 79 chkinit(); 80 TOIManager* mgr = TOIManager::getManager(); 81 int firstReq = mgr->getRequestedBegin(); 82 return snBegin > firstReq ? snBegin : firstReq; 83 } 84 85 int FITSRingReader::calcMaxOut() { 86 chkinit(); 87 TOIManager* mgr = TOIManager::getManager(); 88 int lastReq = mgr->getRequestedEnd(); 89 return snEnd < lastReq ? snEnd : lastReq; 90 } 91 92 93 // ajout vf 31/07/2002 94 bool FITSRingReader::checkSampleLimits(long& min, long& max, int pass) 95 { 96 bool sample_ok=true; 97 chkinit(); 98 return TOIProcessor::checkSampleLimits(min, max, pass); 99 } 100 101 void FITSRingReader::calcSampleLimits(long& min, long& max) 102 { 103 chkinit(); 104 cout << "calc " << name << " in " << min << " - " << max << " ; " << snBegin << " - " << snEnd << endl; 105 106 min=min<snMin?snMin:min; 107 max=max>snMax?snMax:max; 108 snBegin=snMin; 109 snEnd=snMax; 110 cout << "calc " << name << " out " << min << " - " << max << " ; " << snBegin << " - " << snEnd << endl; 111 //cout << "fitstoirdr : limites temporaires calculees : " << snBegin << " , " << snEnd << endl; 112 113 } 114 // fin ajout vf 115 116 117 67 118 void FITSRingReader::run() { 68 119 … … 108 159 fits_unlock(); 109 160 } 161 162 163 // affichage des limites 164 void FITSRingReader::printLimits() 165 { 166 cout << "fitsringrdr " << name <<" : limites calculees : " << snBegin << " , " << snEnd << endl; 167 } 168 -
trunk/ArchTOIPipe/Kernel/fitsringrdr.h
r2351 r2353 6 6 // Christophe Magneville 7 7 // Reza Ansari 8 // $Id: fitsringrdr.h,v 1. 1 2003-03-24 10:59:45cecile Exp $8 // $Id: fitsringrdr.h,v 1.2 2003-03-26 09:18:44 cecile Exp $ 9 9 10 10 #ifndef FITSRINGRDR_H 11 11 #define FITSRINGRDR_H 12 12 13 #include " toi.h"13 #include "config.h" 14 14 #include "toiprocessor.h" 15 #include <string> 16 #include <vector> 17 #include <map> 15 18 #include "fitsio.h" 19 #include "flagtoidef.h" 16 20 17 21 class FITSRingReader : public TOIProcessor { … … 26 30 void init(); 27 31 void run(); 32 33 inline int_8 ProcessedSampleCount() const { return totnscount; } 34 virtual void printLimits(); 35 36 protected: 37 virtual int calcMinOut(); 38 virtual int calcMaxOut(); 28 39 29 protected: 40 // ajout vf 31/07/2002 41 virtual bool checkSampleLimits(long& min, long& max, int pass); 42 virtual void calcSampleLimits(long& min, long& max); 43 virtual bool checkSampleLimits(int pass) {return TOIProcessor::checkSampleLimits(pass);} 44 30 45 virtual void openFile(string fn); 46 47 private: 31 48 int nSamples; 32 49 long nRings; … … 37 54 int Buff_Sz; // buffer size = nSamples 38 55 vector<string> allfn; 56 int_8 totnscount; // Nombre total d'echantillon processe 39 57 }; 40 58
Note:
See TracChangeset
for help on using the changeset viewer.