// ArchTOIPipe (C) CEA/DAPNIA/SPP IN2P3/LAL // Eric Aubourg // Christophe Magneville // Reza Ansari // $Id: nooppr.cc,v 1.10 2002-05-13 13:11:32 ansari Exp $ #include #include "toimanager.h" #include "nooppr.h" // ---------------------------------------------------------------------- // Classe SimpleFourierFilter : Filtre simple ds le domaine de Fourier // ---------------------------------------------------------------------- NoOpProcessor::NoOpProcessor(int wsz) { if (wsz < 1) wsz = 1; wsize = wsz; totnscount = 0; } void NoOpProcessor::PrintStatus(::ostream & os) { os << "\n ------------------------------------------------------ \n" << " NoOpProcessor::PrintStatus() - WindowSize=" << WSize() << endl; os << " Total number of processed samples= " << ProcessedSampleCount() << endl; TOIProcessor::PrintStatus(os); os << " ------------------------------------------------------ " << endl; } void NoOpProcessor::init() { cout << "NoOpProcessor::init" << endl; declareInput("in"); declareInput("in2"); declareOutput("out"); declareOutput("out2"); name = "NoOpProcessor"; // upExtra = 1; } void NoOpProcessor::run() { // TOIManager* mgr = TOIManager::getManager(); int snb = getMinIn(); int sne = getMaxIn(); if (!checkInputTOIIndex(0) && !checkInputTOIIndex(1) && !checkOutputTOIIndex(0) && !checkOutputTOIIndex(1) ) { cerr << " NoOpProcessor::run() - No TOI connected! " << endl; throw ParmError("NoOpProcessor::run() No TOI connected!"); } if (!acceptnoinput && !checkInputTOIIndex(0)) { cerr << " NoOpProcessor::run() - Input TOI (in) not connected! " << endl; throw ParmError("NoOpProcessor::run() Input TOI (in) not connected!"); } bool fgin = checkInputTOIIndex(0); bool fgin2 = checkInputTOIIndex(1); bool fgout = checkOutputTOIIndex(0); bool fgout2 = checkOutputTOIIndex(1); if (fgout2 && (!fgin2 && !acceptnoinput) ) { cerr << " NoOpProcessor::run() - out2 connected without in2!" << endl; throw ParmError("NoOpProcessor::run() out2 connected without in2!"); } cout << " NoOpProcessor::run() SNRange=" << snb << " - " << sne << endl; double * vin = NULL; double * vin2 = NULL; uint_8 * vfg = NULL; uint_8 * vfg2 = NULL; try { // Le debut int k,i,klast; klast = snb-1; int totnbblock = 0; if (wsize > 1) { vin = new double[wsize]; vfg = new uint_8[wsize]; for(i=0; i