Changeset 1488 in Sophya for trunk/ArchTOIPipe/Processors/nooppr.cc
- Timestamp:
- May 6, 2001, 5:52:35 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ArchTOIPipe/Processors/nooppr.cc
r1487 r1488 18 18 << " NoOpProcessor::PrintStatus() - WindowSize=" 19 19 << WSize() << endl; 20 os << " Total number of processed samples= " << ProcessedSampleCount() 21 << endl; 20 22 TOIProcessor::PrintStatus(os); 21 23 os << " ------------------------------------------------------ " << endl; … … 25 27 cout << "NoOpProcessor::init" << endl; 26 28 declareInput("in"); 29 declareInput("in2"); 27 30 declareOutput("out"); 28 declareOutput(" incopie");31 declareOutput("out2"); 29 32 name = "NoOpProcessor"; 30 33 // upExtra = 1; … … 37 40 int sne = getMaxIn(); 38 41 39 bool fgout = checkOutputTOIIndex(0);40 bool fgincopie = checkOutputTOIIndex(1);41 42 42 43 if (!checkInputTOIIndex(0)) { … … 45 46 throw ParmError("NoOpProcessor::run() Input TOI (in) not connected!"); 46 47 } 48 bool fgin2 = checkInputTOIIndex(1); 47 49 50 bool fgout = checkOutputTOIIndex(0); 51 bool fgout2 = checkOutputTOIIndex(1); 48 52 53 if (fgout2 && !fgin2) { 54 cerr << " NoOpProcessor::run() - out2 connected without in2!" 55 << endl; 56 throw ParmError("NoOpProcessor::run() out2 connected without in2!"); 57 } 49 58 cout << " NoOpProcessor::run() SNRange=" << snb << " - " << sne << endl; 50 59 51 60 double * vin = NULL; 52 double * v out= NULL;61 double * vin2 = NULL; 53 62 int_8 * vfg = NULL; 63 int_8 * vfg2 = NULL; 54 64 try { 55 65 // Le debut 56 66 int k,i,klast; 57 int nks = 0;58 67 klast = snb-1; 59 68 int totnbblock = 0; … … 61 70 if (wsize > 1) { 62 71 vin = new double[wsize]; 63 vout = new double[wsize];64 72 vfg = new int_8[wsize]; 73 if (fgin2) { 74 vin2 = new double[wsize]; 75 vfg2 = new int_8[wsize]; 76 } 65 77 66 78 // Boucle sur les sampleNum 67 79 // 1er partie, on traite par paquets de wsize 68 80 for(k=snb;k<=sne-wsize+1;k+=wsize) { 69 for(i=0; i<wsize; i++) 81 for(i=0; i<wsize; i++) { 70 82 getData(0, k+i, vin[i], vfg[i]); 83 if (fgin2) 84 getData(1, k+i, vin2[i], vfg2[i]); 85 } 71 86 totnbblock++; 72 87 for(i=0; i<wsize; i++) { 73 88 if (fgout) 74 putData(0,k+i,v out[i],vfg[i]);75 if (fg incopie)76 putData(1, k+i, vin [i], vfg[i]);89 putData(0,k+i,vin[i],vfg[i]); 90 if (fgout2) 91 putData(1, k+i, vin2[i], vfg2[i]); 77 92 } 93 klast+=wsize; 78 94 } 79 klast+=wsize;80 95 totnscount+=wsize; 81 96 } … … 88 103 getData(0, k, inval, inflg); 89 104 if (fgout) putData(0, k, inval, inflg); 90 if (fgincopie) 91 putData(1, k, inval, inflg); 105 if (fgin2) { 106 getData(1, k, inval, inflg); 107 if (fgout2) 108 putData(1, k, inval, inflg); 109 } 92 110 totnscount++; 93 111 } … … 105 123 106 124 if (vin) delete[] vin; 107 if (vout) delete[] vout;108 125 if (vfg) delete[] vfg; 126 if (vin2) delete[] vin2; 127 if (vfg2) delete[] vfg2; 109 128 110 129 }
Note:
See TracChangeset
for help on using the changeset viewer.