Changeset 1439 in Sophya for trunk/ArchTOIPipe/Kernel
- Timestamp:
- Mar 13, 2001, 7:23:14 PM (25 years ago)
- Location:
- trunk/ArchTOIPipe/Kernel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/Kernel/fitstoiwtr.cc
r1437 r1439 32 32 } 33 33 34 35 void FITSTOIWriter::run() { 36 cout << "fitstoiwriter running" << endl; 37 // init done here 38 delete[] inTOIs; 34 void FITSTOIWriter::afterinit() 35 { 36 if (inTOIs) delete[] inTOIs; 39 37 inTOIs = new (TOI*[fwinputs.size()]); 40 38 … … 42 40 inTOIs[i] = fwinputs[i]; 43 41 } 42 43 } 44 45 void FITSTOIWriter::run() { 46 cout << "fitstoiwriter running" << endl; 47 // init done here 48 afterinit(); 49 inited=true; 44 50 45 51 int ndata = inIx.size(); … … 54 60 colunits[0] = "integer"; 55 61 62 cout << " FITSTOIWriter::run() - Creating output FITS file: " 63 << name << endl; 64 65 vector<string> coln; 66 int ck=0; 56 67 for (map<string, int>::iterator ii = inIx.begin(); ii != inIx.end(); ii++) { 57 68 int j = (*ii).second; 58 string n = (*ii).first;69 coln.push_back((*ii).first); 59 70 if (outFlags) j += j; 60 colnames[j+1] = const_cast<char*>(n.c_str()); 71 colnames[j+1] = const_cast<char*>(coln[ck].c_str()); 72 cout << " Column[" << j+1 << "] Name=" << coln[ck] << endl; 73 ck++; 61 74 coltypes[j+1] = "1D"; 62 colunits[j+1] = " ?";75 colunits[j+1] = "double"; 63 76 if (outFlags) { 64 colnames[j+2] = const_cast<char*>((n+"_flg").c_str()); 77 coln.push_back("fg_" + coln[ck-1]); 78 colnames[j+2] = const_cast<char*>(coln[ck].c_str()); 79 cout << " Column[" << j+1 << "] -Flag- Name=" << coln[ck] << endl; 80 ck++; 65 81 coltypes[j+2] = "1D"; 66 colunits[j+2] = " ?";82 colunits[j+2] = "IntFlag"; 67 83 } 68 84 } -
trunk/ArchTOIPipe/Kernel/fitstoiwtr.h
r1370 r1439 16 16 ~FITSTOIWriter(); 17 17 18 virtual void afterinit(); 19 18 20 virtual void addInput(string name, TOI* toi); 19 21 -
trunk/ArchTOIPipe/Kernel/toiprocessor.cc
r1437 r1439 47 47 inTOIs = new (TOI*[inIx.size()]); 48 48 for(i=0; i<inIx.size(); i++) 49 inTOIs[i] = NULL; 49 inTOIs[i] = NULL; // Protection-Initialisation - Reza 11/3/2001 50 50 outTOIs = new (TOI*[outIx.size()]); 51 51 for(i=0; i<outIx.size(); i++) 52 outTOIs[i] = NULL; 52 outTOIs[i] = NULL; // Protection-Initialisation - Reza 11/3/2001 53 53 } 54 54 … … 80 80 for (int i=0; i<nIn; i++) { 81 81 TOI* toi = inTOIs[i]; 82 if (toi == NULL) continue; // Protection - Reza 13/3/2001 82 83 int x = toi->getMinSn(); 83 84 if (x > minIn) minIn = x; … … 91 92 for (int i=0; i<nIn; i++) { 92 93 TOI* toi = inTOIs[i]; 94 if (toi == NULL) continue; // Protection - Reza 13/3/2001 93 95 int x = toi->getMaxSn(); 94 96 if (x < maxIn) maxIn = x; … … 163 165 void TOIProcessor::PrintStatus(ostream & os) 164 166 { 167 chkinit(); 165 168 os << " TOIProcessor::PrintStatus() - Name= " << name 166 169 << " MinIn=" << getMinIn() << " MaxIn=" << getMaxIn() << endl; … … 191 194 if (i == inIx.end()) throw NotFoundExc("TOIProcessor::addInput "+ 192 195 name+" not declared"); 193 inTOIs[(*i).second] = toi; 196 inTOIs[(*i).second] = toi; 197 toi->addConsumer(this); // $CHECK$ Reza 13/3/2001 194 198 } 195 199
Note:
See TracChangeset
for help on using the changeset viewer.