Changeset 1367 in Sophya
- Timestamp:
- Jan 3, 2001, 4:11:55 PM (25 years ago)
- Location:
- trunk/ArchTOIPipe
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/Kernel/fitstoirdr.cc
r1365 r1367 72 72 73 73 int FITSTOIReader::calcMinOut() { 74 return firstSn; 74 TOIManager* mgr = TOIManager::getManager(); 75 int firstReq = mgr->getRequestedBegin(); 76 return firstSn > firstReq ? firstSn : firstReq; 75 77 } 76 78 77 79 int FITSTOIReader::calcMaxOut() { 78 return firstSn + nrows - 1; 80 TOIManager* mgr = TOIManager::getManager(); 81 int lastReq = mgr->getRequestedEnd(); 82 int lastSn = firstSn + nrows - 1; 83 return lastSn < lastReq ? lastSn : lastReq; 79 84 } 80 85 -
trunk/ArchTOIPipe/Kernel/toiprocessor.cc
r1365 r1367 110 110 111 111 int TOIProcessor::getInputTOIIndex(string toi) { 112 chkinit(); 112 113 map<string, int>::iterator i = inIx.find(toi); 113 114 if (i == inIx.end()) return -1; … … 116 117 117 118 int TOIProcessor::getOutputTOIIndex(string toi) { 119 chkinit(); 118 120 map<string, int>::iterator i = outIx.find(toi); 119 121 if (i == outIx.end()) return -1; … … 136 138 toi->setProducer(this); 137 139 outTOIs[(*i).second] = toi; 140 } 141 142 string TOIProcessor::getOutName(int i) { 143 if (i > outIx.size()) throw RangeCheckError("TOIProcessor::getOutName " 144 " out of bound"); 145 map<string, int>::iterator j = outIx.begin(); 146 while (i) {i--; j++;}; 147 return (*j).first; 148 } 149 150 string TOIProcessor::getInName(int i) { 151 if (i > inIx.size()) throw RangeCheckError("TOIProcessor::getInName " 152 " out of bound"); 153 map<string, int>::iterator j = inIx.begin(); 154 while (i) {i--; j++;}; 155 return (*j).first; 138 156 } 139 157 -
trunk/ArchTOIPipe/Kernel/toiprocessor.h
r1365 r1367 91 91 virtual void addOutput(string name, TOI* toi); 92 92 93 94 int getNIn() {chkinit(); return inIx.size();} 95 int getNOut() {chkinit(); return outIx.size();} 96 string getOutName(int i); 97 string getInName(int i); 98 93 99 virtual void start(); 94 100 -
trunk/ArchTOIPipe/TestPipes/tsttoi2.cc
r1365 r1367 14 14 15 15 16 TOI* toi = new TOIRegular Deque("t1");16 TOI* toi = new TOIRegularWindow("t1"); 17 17 // toi->dbg=true; 18 18 r.addOutput("boloMuV_11", toi); 19 19 w.addInput("bolo_filtered", toi); 20 20 21 cout << "starting" << endl;22 23 21 r.start(); 24 22 w.start(); 25 23 26 cout << "joining" << endl;27 24 mgr->joinAll(); 28 25 }
Note:
See TracChangeset
for help on using the changeset viewer.