#include "rztoi.h" #include "toimanager.h" #include "pexceptions.h" #include "fftpserver.h" #include "timing.h" RzTOIProc::RzTOIProc(int w1, int w2, int nmax) { cout << "RzTOIProc::RzTOIProc() Width= " << w1 << "," << w2 << " NMax=" << nmax; _width1 = w1; _width2 = w2; _nmax = nmax; } void RzTOIProc::init() { cout << "RzTOIProc::init" << endl; declareInput("signal"); declareOutput("sfout"); name = "rzproc"; upExtra = 1; } void RzTOIProc::run() { // TOIManager* mgr = TOIManager::getManager(); int snb = getMinIn(); int sne = getMaxIn(); int istart, iend; int ilast; ilast = istart = snb; iend = sne; int ii, jj; try { FFTPackServer ffts; bool fgppf = false; int nkv = 0; int nkvmx = 8; Vector vkin[nkvmx]; Vector vkout[nkvmx]; TVector< complex > vkfft[nkvmx]; if (outppf.length() > 0) fgppf = true; Vector vin, vout; TVector< complex > vfft; for (int k=0; k<_nmax; k++) { istart = snb + k*_width1; // if (k>0) istart -= _width2; iend = istart +_width1; cout << " RzTOIProc::run() - Processing bloc k= " << k << " istart= " << istart << " iend= " << iend << endl; if (iend > sne) { cout << " RzTOIProc::run() - iend > getMaxIn() -> break " << endl; break; } // Vector vin = getData(0, istart, iend); vin.ReSize(_width1); jj = 0; for(ii=istart; iiPutObject(vin, nom); nom = "out" + (string)MuTyV(k); ppo->PutObject(vout, nom); nom = "fft" + (string)MuTyV(k); ppo->PutObject(vfft, nom); } */ if (fgppf && (nkv < nkvmx) ) { vkin[nkv] = vin; vkout[nkv] = vout; vkfft[nkv] = vfft; nkv++; } PrtTim("End of bloc"); } if (fgppf) { cout << " Writing to Out PPF ... " << endl; POutPersist ppo(outppf); for(int kkk=0; kkk