00001 00036 #ifndef H_SPECFOLD 00037 #define H_SPECFOLD 00038 00039 #ifndef NO_DEPENDENCY_INCLUDES 00040 // GIPS includes 00041 #include "Physics.h" 00042 #include "Instrument.h" 00043 #include "ProtocolRole.h" 00044 #include "Operator.h" 00045 00046 #endif 00047 00048 namespace SpecFold 00049 { 00051 00052 struct Config_t { 00053 size_t npts; 00054 int foldPoint; 00055 Config_t( size_t n, int f ): npts( n ), foldPoint( f ) { }; 00056 }; 00057 00058 typedef Connector::InputPort< Instrument::BlitzCplxDoubleVector > &JackIn; 00059 typedef Connector::OutputPort< Instrument::BlitzCplxDoubleVector > &JackOut; 00060 typedef Connector::InputPort< Config_t > &JackConfig; 00061 00063 struct Ports { 00064 JackIn prefoldedSpectrum; 00065 JackOut foldedSpectrum; 00066 JackConfig config; 00067 00068 Ports( JackIn i, JackOut o, JackConfig c): 00069 prefoldedSpectrum(i), foldedSpectrum(o), config(c) 00070 {}; 00071 ~Ports() {}; 00072 }; 00073 00082 class SpecFoldOperator: Operator::AbstractOperator 00083 { 00084 private: 00085 Ports &ports; 00086 public: 00087 explicit SpecFoldOperator( Ports &p ): ports(p) { }; 00088 virtual ~SpecFoldOperator() { }; 00089 virtual Operator::Result operator() ( ); 00090 }; // class Operator 00091 00092 00093 } // namespace 00094 #endif