diff --git a/Appl/CEP/CS1/CS1_InputSection/include/CS1_InputSection/BeamletBuffer.h b/Appl/CEP/CS1/CS1_InputSection/include/CS1_InputSection/BeamletBuffer.h index dc9ccd69472f0e7db1cc230688957c200a3dbf8c..460d3472aec014f2401c59fc02264dd22a994257 100644 --- a/Appl/CEP/CS1/CS1_InputSection/include/CS1_InputSection/BeamletBuffer.h +++ b/Appl/CEP/CS1/CS1_InputSection/include/CS1_InputSection/BeamletBuffer.h @@ -33,6 +33,7 @@ #include <Common/lofar_complex.h> #include <Common/Timer.h> #include <CS1_InputSection/LockedRange.h> +#include <CS1_Interface/DH_RSP.h> #include <CS1_Interface/RSPTimeStamp.h> #include <CS1_Interface/SparseSet.h> @@ -45,8 +46,7 @@ namespace LOFAR // @{ class Beamlet { - i16complex Xpol; - i16complex Ypol; + DH_RSP::BufferType Xpol, Ypol; }; // A BeamletBuffer can hold the beamlets coming from the rspboards diff --git a/Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/CS1_Config.h b/Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/CS1_Config.h index b7b048ed19bbf5210a26f5b18deadea1637756f3..3b0e546c2cddf2fd5bd621e8a6b8219ed83c3bc2 100644 --- a/Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/CS1_Config.h +++ b/Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/CS1_Config.h @@ -57,4 +57,12 @@ #define I4COMPLEX_TYPE 1 #define I16COMPLEX_TYPE 2 +#if INPUT_TYPE == I4COMPLEX_TYPE +#define INPUT_SAMPLE_TYPE i4complex +#elif INPUT_TYPE == I16COMPLEX_TYPE +#define INPUT_SAMPLE_TYPE i16complex +#else +#error Bad INPUT_TYPE +#endif + #endif diff --git a/Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/DH_RSP.h b/Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/DH_RSP.h index f74176b67bb9837797781b07f18461b12f55c88e..12f60872a113bf1af60fb0c0e3f2b04c4acc1ae7 100644 --- a/Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/DH_RSP.h +++ b/Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/DH_RSP.h @@ -26,6 +26,7 @@ #include <APS/ParameterSet.h> #include <Transport/DataHolder.h> +#include <CS1_Interface/CS1_Config.h> #include <CS1_Interface/RSPTimeStamp.h> #include <CS1_Interface/RectMatrix.h> #include <CS1_Interface/SparseSet.h> @@ -38,7 +39,7 @@ namespace LOFAR class DH_RSP: public DataHolder { public: - typedef i16complex BufferType; + typedef INPUT_SAMPLE_TYPE BufferType; explicit DH_RSP (const string &name, const ACC::APS::ParameterSet &pset); diff --git a/Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/DH_Subband.h b/Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/DH_Subband.h index 200fddbdb5340b5c02658c165a7083896839da32..9083949203f43adf50e3dd91dd28c867cd4acdd2 100644 --- a/Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/DH_Subband.h +++ b/Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/DH_Subband.h @@ -44,13 +44,7 @@ class DH_Subband: public DataHolder public: // samples are ALWAYS stored in little endian format ! -#if INPUT_TYPE == I4COMPLEX_TYPE - typedef i4complex SampleType; -#elif INPUT_TYPE == I16COMPLEX_TYPE - typedef i16complex SampleType; -#else -#error INPUT_TYPE not supported -#endif + typedef INPUT_SAMPLE_TYPE SampleType; // Fine-grained delays typedef struct {