From b0166aa8bb17d4d2d3b11fe40ab3ac18f32ce777 Mon Sep 17 00:00:00 2001 From: John Romein <romein@astron.nl> Date: Fri, 19 May 2006 09:18:36 +0000 Subject: [PATCH] BugID: 225 added i4complex support --- .../include/CS1_InputSection/BeamletBuffer.h | 4 ++-- .../CS1/CS1_Interface/include/CS1_Interface/CS1_Config.h | 8 ++++++++ Appl/CEP/CS1/CS1_Interface/include/CS1_Interface/DH_RSP.h | 3 ++- .../CS1/CS1_Interface/include/CS1_Interface/DH_Subband.h | 8 +------- 4 files changed, 13 insertions(+), 10 deletions(-) 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 dc9ccd69472..460d3472aec 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 b7b048ed19b..3b0e546c2cd 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 f74176b67bb..12f60872a11 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 200fddbdb53..9083949203f 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 { -- GitLab