From 03a2ff3a502fe0aa4d935b75eaf8c079a91b8c5b Mon Sep 17 00:00:00 2001 From: Martin Gels <gels@astron.nl> Date: Thu, 20 Mar 2008 14:56:48 +0000 Subject: [PATCH] bug 1005: Step4, supported multiple beams. --- .gitignore | 3 - .../CS1_DelayCompensation.spec.in | 160 -------- .../CEP/CS1/CS1_DelayCompensation/Makefile.am | 14 - Appl/CEP/CS1/CS1_DelayCompensation/bootstrap | 3 - .../CS1/CS1_DelayCompensation/configure.in | 75 ---- .../ACCmain_DelayCompensation.h | 42 -- .../AH_DelayCompensation.h | 76 ---- .../include/CS1_DelayCompensation/Makefile.am | 3 - .../WH_DelayCompensation.h | 228 ----------- .../CS1_DelayCompensation/include/Makefile.am | 3 - .../CEP/CS1/CS1_DelayCompensation/package.dox | 2 - .../scripts/DelayAppl.sh | 119 ------ .../scripts/prepare_CS1_DelayCompensation.py | 114 ------ .../CS1_DelayCompensation/scripts/startAP.sh | 24 -- .../CS1_DelayCompensation/scripts/stopAP.sh | 10 - .../src/ACCmain_DelayCompensation.cc | 237 ----------- .../src/AH_DelayCompensation.cc | 116 ------ .../src/CS1_DelayCompensation.log_prop | 25 -- .../src/CS1_DelayCompensation_main.cc | 87 ---- .../CS1/CS1_DelayCompensation/src/Makefile.am | 20 - .../src/WH_DelayCompensation.cc | 382 ------------------ .../CS1_DelayCompensation/test/Makefile.am | 20 - .../test/tWH_DelayCompensation.cc | 73 ---- .../test/tWH_DelayCompensation.sh | 2 - .../test/tWH_DelayCompensation.stdout | 0 .../CS1_Tools/include/CS1_Tools/Makefile.am | 2 - 26 files changed, 1840 deletions(-) delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/CS1_DelayCompensation.spec.in delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/Makefile.am delete mode 100755 Appl/CEP/CS1/CS1_DelayCompensation/bootstrap delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/configure.in delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/include/CS1_DelayCompensation/ACCmain_DelayCompensation.h delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/include/CS1_DelayCompensation/AH_DelayCompensation.h delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/include/CS1_DelayCompensation/Makefile.am delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/include/CS1_DelayCompensation/WH_DelayCompensation.h delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/include/Makefile.am delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/package.dox delete mode 100755 Appl/CEP/CS1/CS1_DelayCompensation/scripts/DelayAppl.sh delete mode 100755 Appl/CEP/CS1/CS1_DelayCompensation/scripts/prepare_CS1_DelayCompensation.py delete mode 100755 Appl/CEP/CS1/CS1_DelayCompensation/scripts/startAP.sh delete mode 100755 Appl/CEP/CS1/CS1_DelayCompensation/scripts/stopAP.sh delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/src/ACCmain_DelayCompensation.cc delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/src/AH_DelayCompensation.cc delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/src/CS1_DelayCompensation.log_prop delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/src/CS1_DelayCompensation_main.cc delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/src/Makefile.am delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/src/WH_DelayCompensation.cc delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/test/Makefile.am delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/test/tWH_DelayCompensation.cc delete mode 100755 Appl/CEP/CS1/CS1_DelayCompensation/test/tWH_DelayCompensation.sh delete mode 100644 Appl/CEP/CS1/CS1_DelayCompensation/test/tWH_DelayCompensation.stdout diff --git a/.gitignore b/.gitignore index adcb7f431ac..2274c5a3971 100644 --- a/.gitignore +++ b/.gitignore @@ -16,9 +16,6 @@ Appl/CEP/CS1/CS1_DFTImager/lofarconf Appl/CEP/CS1/CS1_DataSquasher/Makefile.common Appl/CEP/CS1/CS1_DataSquasher/autoconf_share Appl/CEP/CS1/CS1_DataSquasher/lofarconf -Appl/CEP/CS1/CS1_DelayCompensation/Makefile.common -Appl/CEP/CS1/CS1_DelayCompensation/autoconf_share -Appl/CEP/CS1/CS1_DelayCompensation/lofarconf Appl/CEP/CS1/CS1_Flagger/Makefile.common Appl/CEP/CS1/CS1_Flagger/autoconf_share Appl/CEP/CS1/CS1_Flagger/lofarconf diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/CS1_DelayCompensation.spec.in b/Appl/CEP/CS1/CS1_DelayCompensation/CS1_DelayCompensation.spec.in deleted file mode 100644 index 29a3181dcce..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/CS1_DelayCompensation.spec.in +++ /dev/null @@ -1,160 +0,0 @@ -# -*- Mode:rpm-spec -*- -# CS1_DelayCompensation.spec.in -# - -############################################################################## -# -# Preamble -# -############################################################################## - -Summary: CS1_DelayCompensation is ... brief description ... - -%define release @RPM_RELEASE@ -%define version @VERSION@ -%define pkgname @PACKAGE@ -%define pkgdir %{pkgname}-%{version}-%{release} -%define prefix /opt/lofar -%define configure_args @RPM_CONFIGURE_ARGS@ -##define build_kernel_version @BUILD_KERNEL_VERSION@ - -Name: %{pkgname} -Version: %{version} -Release: %{release} -Copyright: LGPL -Group: Application/System -Source: %{pkgname}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{pkgdir}-root -URL: http://www.astron.nl -Prefix: %{prefix} -BuildArchitectures: i386 # Target platforms, i.e., i586 -##Requires: Common = 1.2 ## define dependent packages here -Packager: %{packager} -Distribution: The LOFAR project -Vendor: ASTRON - -AutoReqProv: no - -%description - -CS1_DelayCompensation ... more detailed description ... - -############################################################################## -# -# prep -# -############################################################################## -%prep -echo $prefix - -# create the build directory, untar the source -%setup - -############################################################################## -# -# build -# -############################################################################## -%build -./configure %{configure_args} --prefix=%{prefix} && make - -############################################################################## -# -# install -# -############################################################################## -%install -# To make things work with BUILDROOT -if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ] -then - echo - echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - echo @ @ - echo @ RPM_BUILD_ROOT is not what I expected. Please clean it yourself. @ - echo @ @ - echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - echo -else - echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT" - rm -rf "$RPM_BUILD_ROOT" -fi -mkdir -p $RPM_BUILD_ROOT%{prefix} -make DESTDIR="$RPM_BUILD_ROOT" install - -#uninstall - -############################################################################## -# -# verify -# -############################################################################## -#verify - -############################################################################## -# -# clean -# -############################################################################## -%clean -# Call me paranoid, but I do not want to be responsible for nuking -# someone's harddrive! -if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ] -then - echo - echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - echo @ @ - echo @ RPM_BUILD_ROOT is not what I expected. Please clean it yourself. @ - echo @ @ - echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - echo -else - echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT" - rm -rf "$RPM_BUILD_ROOT" -fi - -############################################################################## -# -# files -# -############################################################################## - -# empty 'files' means all distributed files -%files -%defattr(-, root, root) -%{prefix} - -# Your application file list goes here -# %{prefix}/lib/lib*.so* - -# Documentation -# doc COPYING ChangeLog README AUTHORS NEWS -# doc doc/* - -# link the module to the correct path -%post - -# before uninstall -%preun - -# after uninstall -%postun - -############################################################################## -# -# package devel -# -############################################################################## - -#package devel -#Summary: Development files for %{pkgname} -#Group: Applications/System -#description devel -#Development files for %{pkgname}. - -#files devel - -# Your development files go here -# Programmers documentation goes here -#doc doc - -# end of file diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/Makefile.am b/Appl/CEP/CS1/CS1_DelayCompensation/Makefile.am deleted file mode 100644 index 9d6b64a7dd0..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -SUBDIRS=src test include - -pkgextdir = $(prefix)/config/$(PACKAGE) -pkgext_DATA = pkgext pkgextcppflags pkgextcxxflags pkgextldflags - -DISTCHECK_CONFIGURE_FLAGS=\ - --with-common=$(prefix) - -EXTRA_DIST = \ - Makefile.common \ - CS1_DelayCompensation.spec \ - autoconf_share/compiletool - -include $(top_srcdir)/Makefile.common diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/bootstrap b/Appl/CEP/CS1/CS1_DelayCompensation/bootstrap deleted file mode 100755 index 7f674c41680..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/bootstrap +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -../../../../autoconf_share/bootstrap ../../../../autoconf_share diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/configure.in b/Appl/CEP/CS1/CS1_DelayCompensation/configure.in deleted file mode 100644 index bb1be078c3c..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/configure.in +++ /dev/null @@ -1,75 +0,0 @@ -dnl -dnl Process this file with autoconf to produce a configure script. -dnl -AC_INIT -dnl AC_CONFIG_AUX_DIR(config) -dnl AM_CONFIG_HEADER(config/config.h) -AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(CS1_DelayCompensation, 1.0, no-define) - -dnl Initialize for LOFAR (may set compilers) -lofar_INIT - -dnl Checks for programs. -AC_PROG_AWK -AC_PROG_YACC -AC_PROG_CC -AC_PROG_CXX -AM_PROG_LEX -AC_PROG_INSTALL -AC_PROG_LN_S -AC_DISABLE_SHARED -AC_PROG_LIBTOOL - -dnl Checks for libraries. - -dnl dnl Replace `main' with a function in -lfl: -dnl AC_CHECK_LIB(fl, main) -dnl dnl Replace `main' with a function in -lcosev_r: -dnl AC_CHECK_LIB(cosev_r, main) -dnl dnl Replace `main' with a function in -lcosnm_r: -dnl AC_CHECK_LIB(cosnm_r, main) -dnl dnl Replace `main' with a function in -lorb_r: -dnl AC_CHECK_LIB(orb_r, main) -dnl dnl Replace `main' with a function in -lpthread: -dnl AC_CHECK_LIB(pthread, main) -dnl dnl Replace `main' with a function in -lvport_r: -dnl AC_CHECK_LIB(vport_r, main) - -dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(unistd.h) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_SIZE_T - -dnl Checks for library functions. -AC_FUNC_VPRINTF - -dnl -dnl Check for LOFAR specific things -dnl -lofar_GENERAL -dnl lofar_BLITZ -dnl lofar_MPI -lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h) -lofar_INTERNAL(LCS/AMC/AMCBase,AMCBase,,1,AMCBase/Converter.h) -lofar_INTERNAL(LCS/AMC/AMCImpl,AMCImpl,,1,AMCImpl/ConverterImpl.h) -lofar_INTERNAL(CEP/tinyCEP,tinyCEP,,1,tinyCEP/WorkHolder.h) -lofar_INTERNAL(CEP/CEPFrame,CEPFrame,,1,CEPFrame/ApplicationHolder.h) -lofar_INTERNAL(Appl/CEP/CS1/CS1_Interface,CS1_Interface,,1,CS1_Interface/CS1_Config.h) - -lofar_EXTERNAL(boost,1,boost/thread.hpp,"boost_date_time") - -dnl -dnl Output Makefiles -dnl -AC_OUTPUT( -include/Makefile -include/CS1_DelayCompensation/Makefile -src/Makefile -test/Makefile -Makefile -CS1_DelayCompensation.spec -) diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/include/CS1_DelayCompensation/ACCmain_DelayCompensation.h b/Appl/CEP/CS1/CS1_DelayCompensation/include/CS1_DelayCompensation/ACCmain_DelayCompensation.h deleted file mode 100644 index a16fb894286..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/include/CS1_DelayCompensation/ACCmain_DelayCompensation.h +++ /dev/null @@ -1,42 +0,0 @@ -//# ACCmain_DelayCompensation.h: main loop that can be used by any ACC enabled program -//# -//# Copyright (C) 2006 -//# ASTRON (Netherlands Foundation for Research in Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -//# -//# This program is free software; you can redistribute it and/or modify -//# it under the terms of the GNU General Public License as published by -//# the Free Software Foundation; either version 2 of the License, or -//# (at your option) any later version. -//# -//# This program is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License -//# along with this program; if not, write to the Free Software -//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//# -//# $Id$ - -#ifndef LOFAR_CS1_DELAYCOMPENSATION_ACCMAIN_DELAYCOMPENSATION_H -#define LOFAR_CS1_DELAYCOMPENSATION_ACCMAIN_DELAYCOMPENSATION_H - -// \file -// main loop that can be used by any ACC enabled program - -//# Never #include <config.h> or #include <lofar_config.h> in a header file! - -//# Includes -#include <PLC/ProcessControl.h> - -namespace LOFAR -{ - namespace CS1 - { - int ACCmain_DelayCompensation (int argc, char* argv[], ACC::PLC::ProcessControl* theProcess); - } // namespace CS1 -} // namespace LOFAR - -#endif diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/include/CS1_DelayCompensation/AH_DelayCompensation.h b/Appl/CEP/CS1/CS1_DelayCompensation/include/CS1_DelayCompensation/AH_DelayCompensation.h deleted file mode 100644 index 8aa82ebf23c..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/include/CS1_DelayCompensation/AH_DelayCompensation.h +++ /dev/null @@ -1,76 +0,0 @@ -//# AH_DelayCompensation.h: Application holder for the CS1 delay compensation -//# -//# Copyright (C) 2006 -//# ASTRON (Netherlands Foundation for Research in Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -//# -//# This program is free software; you can redistribute it and/or modify -//# it under the terms of the GNU General Public License as published by -//# the Free Software Foundation; either version 2 of the License, or -//# (at your option) any later version. -//# -//# This program is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License -//# along with this program; if not, write to the Free Software -//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//# -//# $Id$ - -#ifndef LOFAR_CS1_DELAYCOMPENSATION_AH_DELAYCOMPENSATION_H -#define LOFAR_CS1_DELAYCOMPENSATION_AH_DELAYCOMPENSATION_H - -// \file -// Application holder for the CS1 delay compensation - -//# Never #include <config.h> or #include <lofar_config.h> in a header file! - -//# Includes -#include <CEPFrame/ApplicationHolder.h> -#include <CS1_Interface/CS1_Parset.h> - -namespace LOFAR -{ - namespace CS1 - { - //# Forward Declarations - class Stub_Delay; - - // \addtogroup CS1_DelayCompensation - // @{ - - // Description of class. - class AH_DelayCompensation : public ApplicationHolder - { - public: - AH_DelayCompensation(); - virtual ~AH_DelayCompensation(); - - virtual void define (const KeyValueMap&); - virtual void run (int nsteps); - - private: - // Copying is not allowed - AH_DelayCompensation (const AH_DelayCompensation& that); - AH_DelayCompensation& operator= (const AH_DelayCompensation& that); - - //# Datamembers - CS1_Parset *itsCS1PS; - // Stub for the DH_Delay data holder - Stub_Delay* itsStub; - - // Allocate a tracer context - ALLOC_TRACER_CONTEXT; - - }; - - // @} - - } // namespace CS1 - -} // namespace LOFAR - -#endif diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/include/CS1_DelayCompensation/Makefile.am b/Appl/CEP/CS1/CS1_DelayCompensation/include/CS1_DelayCompensation/Makefile.am deleted file mode 100644 index 854ba55334d..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/include/CS1_DelayCompensation/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -pkginclude_HEADERS = WH_DelayCompensation.h - -include $(top_srcdir)/Makefile.common diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/include/CS1_DelayCompensation/WH_DelayCompensation.h b/Appl/CEP/CS1/CS1_DelayCompensation/include/CS1_DelayCompensation/WH_DelayCompensation.h deleted file mode 100644 index 9d9e9d6e402..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/include/CS1_DelayCompensation/WH_DelayCompensation.h +++ /dev/null @@ -1,228 +0,0 @@ -//# WH_DelayCompensation.h: Calculate delay compensation for all stations. -//# -//# Copyright (C) 2006 -//# ASTRON (Netherlands Foundation for Research in Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -//# -//# This program is free software; you can redistribute it and/or modify -//# it under the terms of the GNU General Public License as published by -//# the Free Software Foundation; either version 2 of the License, or -//# (at your option) any later version. -//# -//# This program is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License -//# along with this program; if not, write to the Free Software -//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//# -//# $Id$ - -#ifndef LOFAR_CS1_DELAYCOMPENSATION_WH_DELAYCOMPENSATION_H -#define LOFAR_CS1_DELAYCOMPENSATION_WH_DELAYCOMPENSATION_H - -// \file -// Calculate delay compensation for all stations. - -//# Never #include <config.h> or #include <lofar_config.h> in a header file! - -//# Includes -#include <tinyCEP/WorkHolder.h> -#include <CS1_Interface/CS1_Parset.h> - -namespace LOFAR -{ - //# Forward declarations - namespace AMC - { - class Converter; - class Direction; - class Position; - class Epoch; - } - - namespace CS1 - { - // \addtogroup CS1_DelayCompensation - // @{ - - // Speed of light in vacuum, in m/s. - const double speedOfLight = 299792458; - - // Workholder for calculating the delay compensation that must be applied - // per beam per station. We start by calculating the path length - // difference for beam \f$\mathbf{b}_i\f$ between station \f$j\f$ at - // position \f$\mathbf{p}_j\f$ and the reference station 0 at position - // \f$\mathbf{p}_0\f$. - // \f[ - // d_{ij} - d_{i0} = \mathbf{b}_i \cdot \mathbf{p}_j - // - \mathbf{b}_i \cdot \mathbf{p}_0 - // = \mathbf{b}_i \cdot (\mathbf{p}_j - \mathbf{p}_0) - // \f] - // The choice of reference station is arbitrary, so we simply choose the - // first station from the parameter set. From the equation above it is - // clear that we can reduce the number of dot products if we precalculate - // the position difference vectors \f$\mathbf{p}_j - \mathbf{p}_0$\f, - // which we will store in \c itsPositionDiffs. - // - // The geometrical delay is easily obtained by dividing the path length - // difference by the speed of light in vacuum. We don't need to know the - // speed of light in the atmosphere, because the AZEL directions that - // we've calculated are valid for vacuum (only!). This is the delay that - // must be compensated for. - // - // The calculated delay compensation must be split into a coarse (whole - // sample) delay and a fine (subsample) delay. The coarse delay will be - // applied in the input section as a true time delay, by shifting the - // input samples. The fine delay will be applied in the correlator as a - // phase shift in each frequency channel. - class WH_DelayCompensation : public WorkHolder - { - public: - WH_DelayCompensation(const string& name, - CS1_Parset *ps); - - virtual ~WH_DelayCompensation(); - - virtual void preprocess(); - - virtual void process(); - - virtual void postprocess(); - - private: - // Copying is not allowed - WH_DelayCompensation (const WH_DelayCompensation& that); - WH_DelayCompensation& operator= (const WH_DelayCompensation& that); - - virtual WH_DelayCompensation* make(const string& name); - - // AMC converter type - enum ConverterTypes { - UNDEFINED, ///< Default type - IMPL, ///< Uses ConverterImpl - CLIENT ///< Uses ConverterClient - }; - - // Struct holding the relevant information for creating an AMC Converter. - struct ConverterConfig - { - ConverterConfig() : type(UNDEFINED), server(""), port(0) {} - ConverterTypes type; - string server; - uint16 port; - }; - - // Get the configuration data for the Converter from the parameter file - // and initialize \c itsConverterConfig. - void getConverterConfig(); - - // Get the source directions from the parameter file and initialize \c - // itsBeamDirections. Beam positions must be specified as - // <tt>(longitude, latitude, direction-type)</tt>. The direction angles - // are in radians; the direction type must be one of J2000, ITRF, or - // AZEL. - void getBeamDirections(); - - // Get the station phase centres from the parameter file and - // initialize \c itsStationPositions. Station phase centres must - // be specified as <tt>(longitude, latitude, height, - // position-type)</tt>. The position angles are in radians; - // height is in meters; the position type must be ITRF. - void getPhaseCentres(); - - // Get the observation epoch from the parameter file and initialize \c - // itsObservationEpoch. The epoch is a series of times, with an - // approximately one-second interval, starting at the observation start - // time, and ending at the observation end time. Start and end time must - // be specified as Modified Julian Date (MJD). - void getObservationEpoch(); - - // Set the station to reference station position differences for all - // stations. The choice of reference station is arbitrary (so we choose - // station 0). The position differences are stored in \c - // itsPositionDiffs. In other words: we store \f$\mathbf{p}_j - - // \mathbf{p}_0\f$, where \f$\mathbf{p}_0\f$ is the position of the - // reference station and \f$\mathbf{p}_j\f$ is the position of station - // \f$j\f$. - void setPositionDiffs(); - - // Create an instance of an AMC converter, using the data in \c - // itsConverterConfig. - AMC::Converter* createConverter(); - - // Perform the actual coordinate conversion for the epoch after the end - // of the current time interval and store the result in - // itsResultAfterEnd. - // \post itsResultAtBegin contains the data previously contained by - // itsResultAfterEnd. - void doConvert(); - - // Calculate the delays for all stations for the epoch after the end of - // the current time interval and store the results in itsDelaysAfterEnd. - // \post itsDelaysAtBegin contain the data previously contained by - // itsDelaysAtEnd. - void calculateDelays(); - - // The parameter set, containing all configurable variables. - // \note Unfortunately we must keep a copy here, because (!@#$%!) - // make() needs it. Hopefully, we can get rid of it, some day. - CS1_Parset *itsCS1PS; - - // Number of beams. - const uint itsNrBeams; - - // Number of stations. - const uint itsNrStations; - - // Number of delays that will be calculated per epoch. This number is a - // run-time constant, because it is equal to the number of beams per - // station times the number of stations. - const uint itsNrDelays; - - // The sample rate in a subband, in samples per second.. - const double itsSampleRate; - - // Counter used to count the number of times that process() was called. - uint itsLoopCount; - - // Configuration info required to create our AMC Converter - ConverterConfig itsConverterConfig; - - // Pointer to the Converter we're using. - AMC::Converter* itsConverter; - - // Beam directions. - vector<AMC::Direction> itsBeamDirections; - - // Station phase centres. - vector<AMC::Position> itsPhaseCentres; - - // Observation epoch. - vector<AMC::Epoch> itsObservationEpoch; - - // Station to reference station position difference vectors. - vector<AMC::Position> itsPhasePositionDiffs; - - // Delays for all stations for the epoch at the begin of the current - // time interval. - vector<double> itsDelaysAtBegin; - - // Delays for all stations for the epoch after the end of the current - // time interval. - vector<double> itsDelaysAfterEnd; - - // Allocate a tracer context - ALLOC_TRACER_CONTEXT; - - }; - - // @} - - } // namespace CS1 - -} // namespace LOFAR - -#endif diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/include/Makefile.am b/Appl/CEP/CS1/CS1_DelayCompensation/include/Makefile.am deleted file mode 100644 index fcb763f68cd..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/include/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS = CS1_DelayCompensation - -include $(top_srcdir)/Makefile.common diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/package.dox b/Appl/CEP/CS1/CS1_DelayCompensation/package.dox deleted file mode 100644 index 82573b2e86c..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/package.dox +++ /dev/null @@ -1,2 +0,0 @@ -// \ingroup CS1 -// \defgroup CS1_DelayCompensation CS1_DelayCompensation Description diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/scripts/DelayAppl.sh b/Appl/CEP/CS1/CS1_DelayCompensation/scripts/DelayAppl.sh deleted file mode 100755 index aab7e243e2f..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/scripts/DelayAppl.sh +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/bash -# -# /DelayAppl: a start/stop/status script for swlevel -# -# Copyright (C) 2007 -# ASTRON (Netherlands Foundation for Research in Astronomy) -# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# Syntax: DelayAppl start|stop|status -# -# $Id$ -# - -# -# SyntaxError msg -# -SyntaxError() -{ - Msg=$1 - - [ -z "${Msg}" ] || echo "ERROR: ${Msg}" - echo "" - echo "Syntax: $(basename $0) start | stop | status" - echo "" - exit 1 -} - -# -# Start the program when it exists -# -start_prog() -{ - # put here your code to start your program - echo 'start_prog()' -} - -# -# Stop the program when it is running -# -stop_prog() -{ - # put here your code to stop your program - ps -ef | grep -v grep | grep -v ACDaemon[^\ ] | grep ACDaemon 2>&1 >/dev/null - if [ $? -ne 0 ]; then - if [ -f ../etc/ACD.admin ]; then - rm ../etc/ACD.admin - fi - fi - cexec killall -9 CS1_DelayCompensation -} - -# -# show status of program -# -# arg1 = levelnr -# -status_prog() -{ - levelnr=$1 - - # put here code to figure out the status of your program and - # fill the variables prog and pid with the right information - - # e.g. - prog=DelayAppl - pid=DOWN - cexec 'ps -ef | grep -v grep '| grep CS1_DelayCompensation| grep -v bash 2>$1 1>/dev/null - if [ $? -eq 0 ]; then - cexec 'ps -ef | grep -v grep | grep CS1_DelayCompensation'| grep -v bash | awk -v levelnr=${levelnr} '{ - if (substr($1,1,3) == "---") { - machine = substr($2,1,7) - } - else { - if (substr($1,1,3) != "***") { - fullname="DelayAppl@"machine - printf "%s : %-25.25s %s\n", levelnr,fullname,$2 - } - } - }' - else - # this line should be left in, it shows the status in the right format - echo ${levelnr} ${prog} ${pid} | awk '{ printf "%s : %-25s %s\n", $1, $2, $3 }' - fi -} - -# -# MAIN -# - -# when no argument is given show syntax error. -if [ -z "$1" ]; then - SyntaxError -fi - -# first power down to this level -case $1 in - start) start_prog - ;; - stop) stop_prog - ;; - status) status_prog $2 - ;; - *) SyntaxError - ;; -esac diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/scripts/prepare_CS1_DelayCompensation.py b/Appl/CEP/CS1/CS1_DelayCompensation/scripts/prepare_CS1_DelayCompensation.py deleted file mode 100755 index 5b842c9f97d..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/scripts/prepare_CS1_DelayCompensation.py +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env python - -import math -import time -import datetime -import os -import sys -import copy - -class CS1_Parset(object): - - def __init__(self): - self.stationList = list() - self.parameters = dict() - - def readFromFile(self, fileName): - lastline = '' - for line in open(fileName, 'r').readlines(): - lastline = lastline + line.split('#')[0] - lastline = lastline.rstrip() - if len(lastline) > 0 and lastline[-1] == '\\': - lastline = lastline[:-1] - elif '=' in lastline: - key, value = lastline.split('=') - self.parameters[key.strip()] = value.strip() - lastline = '' - - def writeToFile(self, fileName): - outf = open(fileName, 'w') - for key, value in sorted(self.parameters.iteritems()): - outf.write(key + ' = ' + str(value) + '\n') - outf.close() - - def __contains__(self, key): - return key in self.parameters - - def __setitem__(self, key, value): - self.parameters[key] = value - - def __getitem__(self, key): - return self.parameters[key] - - def getInt32Vector(self, key): - ln = self.parameters[key] - ln_tmp = ln.split('[') - line = ln_tmp[1].split(']') - return [int(lp) for lp in line[0].split(',')] - - def getInt32(self, key): - return int(self.parameters[key]) - - def getStringVector(self, key): - line = self.parameters[key] - line.strip('[').strip(']') - return line.split(',') - - def getString(self, key): - return self.parameters[key] - - def getFloat(self, key): - return float(self.parameters[key]) - - -if __name__ == '__main__': - - # create the parset - parset = CS1_Parset() - stationList = list() - - if os.path.exists("../share/DelayCompensation.parset"): - - #read keys from parset file: Transpose.parset - parset.readFromFile('../share/DelayCompensation.parset') - - ''' - if parset.getString('OLAP.OLAP_Conn.station_Input_Transport') == 'NULL': - # Read from memory! - parset['Observation.startTime'] = datetime.datetime.fromtimestamp(1) - else: - start=int(time.time() + 90) - parset['Observation.startTime'] = datetime.datetime.fromtimestamp(start) - - duration = 300 - - parset['Observation.stopTime'] = datetime.datetime.fromtimestamp(start + duration) - ''' - - if parset.getString('OLAP.OLAP_Conn.input_DelayComp_Transport') == 'Null': - parset['OLAP.OLAP_Conn.input_DelayComp_Transport'] = 'NULL' - - if parset.getString('OLAP.OLAP_Conn.input_BGLProc_Transport') == 'Null': - parset['OLAP.OLAP_Conn.input_BGLProc_Transport'] = 'NULL' - - if parset.getString('OLAP.OLAP_Conn.station_Input_Transport') == 'Null': - parset['OLAP.OLAP_Conn.station_Input_Transport'] = 'NULL' - - if parset.getString('OLAP.OLAP_Conn.BGLProc_Storage_Transport') == 'Null': - parset['OLAP.OLAP_Conn.BGLProc_Storage_Transport'] = 'NULL' - - #get the stations - stationList = parset.getStringVector('OLAP.storageStationNames') - parset['OLAP.nrRSPboards'] = len(stationList) - - if parset.getInt32('Observation.sampleClock') == 160: - parset['OLAP.BGLProc.integrationSteps'] = 608 - elif parset.getInt32('Observation.sampleClock') == 200: - parset['OLAP.BGLProc.integrationSteps'] = 768 - - parset.writeToFile('../share/DelayCompensation.parset') - - else: - print '../share/DelayCompensation.parset does not exist!' - sys.exit(0) - diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/scripts/startAP.sh b/Appl/CEP/CS1/CS1_DelayCompensation/scripts/startAP.sh deleted file mode 100755 index 660c2173320..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/scripts/startAP.sh +++ /dev/null @@ -1,24 +0,0 @@ -# startAP.sh nodename procID executable paramfile -# -# $1 jobName identifier for this job -# $2 machinefile procID.machinefile -# $3 executable processname -# $4 parameterfile procID.ps -# $5 numberOfNodes -# -# start the given executable and creates a corresponding pid file for stopping the process. -# - -# now all ACC processes expect to be started with "ACC" as first parameter - -./prepare_$3.py - -# start process -# TODO: in future something like: rsh $1 start_script $2 $3 $4 -./$3 ACC $4 $1>>/opt/lofar/log/$3.log 2>&1 & - -# get its pid -pid=`echo $!` - -# construct pid file for stop shell -echo "$pid" > $2.pid diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/scripts/stopAP.sh b/Appl/CEP/CS1/CS1_DelayCompensation/scripts/stopAP.sh deleted file mode 100755 index 60b2cd7bfea..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/scripts/stopAP.sh +++ /dev/null @@ -1,10 +0,0 @@ -# stopAP.sh nodename procID -# -# nodename hostname[.domain] -# procID processname<nr> -# -# Stops the given process by killing the process whose pid is in the -# proces.pid file. - -kill -9 `cat $2.pid` -rm -f $2.pid $2.ps diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/src/ACCmain_DelayCompensation.cc b/Appl/CEP/CS1/CS1_DelayCompensation/src/ACCmain_DelayCompensation.cc deleted file mode 100644 index 1ab8ac76305..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/src/ACCmain_DelayCompensation.cc +++ /dev/null @@ -1,237 +0,0 @@ -//# ACCmain.cc: main loop that can be used by any ACC enabled program -//# -//# Copyright (C) 2006 -//# ASTRON (Netherlands Foundation for Research in Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -//# -//# This program is free software; you can redistribute it and/or modify -//# it under the terms of the GNU General Public License as published by -//# the Free Software Foundation; either version 2 of the License, or -//# (at your option) any later version. -//# -//# This program is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License -//# along with this program; if not, write to the Free Software -//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//# -//# $Id$ - -//# Always #include <lofar_config.h> first! -#include <lofar_config.h> - -//# Includes -#include <libgen.h> -#include <Common/LofarLogger.h> -#include <Common/LofarLocators.h> -#include <APS/ParameterSet.h> -#include <APS/Exceptions.h> -#include <PLC/ProcControlServer.h> -#include <CS1_DelayCompensation/ACCmain_DelayCompensation.h> -#ifdef HAVE_MPI -#include <Transport/TH_MPI.h> -#endif - -namespace LOFAR { -namespace CS1 { - -using ACC::APS::ParameterSet; - -// -// ACCmain(argc, argv, procCtrl*) -// -int ACCmain_DelayCompensation (int argc, char* orig_argv[], ACC::PLC::ProcessControl* theProcess) { - char** argv = orig_argv; - -#ifdef HAVE_MPI - TH_MPI::initMPI(argc, orig_argv); - - int myRank = TH_MPI::getCurrentRank(); - - // The MPI standard does not demand that the commandline - // arguments are distributed, so we do it ourselves. - - // Broadcast number of arguments - MPI_Bcast(&argc, 1, MPI_INT, 0, MPI_COMM_WORLD); - // Some MPI implementations block on the Bcast. Synchronize - // the nodes to avoid deadlock. - MPI_Barrier(MPI_COMM_WORLD); - - if (myRank != 0) { - argv = new char*[argc + 1]; - argv[argc] = 0; - } else { - char** argv = orig_argv; - } - - for (int arg = 0; arg < argc; arg++) { - int arglen = 0; - if (myRank == 0) { - arglen = strlen(argv[arg]) + 1; - } - - // Broadcast the length of this argument - MPI_Bcast(&arglen, 1, MPI_INT, 0, MPI_COMM_WORLD); - - if (myRank != 0) { - argv[arg] = new char[arglen]; - } - // Broadcast the argument; - MPI_Bcast(argv[arg], arglen, MPI_BYTE, 0, MPI_COMM_WORLD); - } -#endif - - // - string programName(basename(argv[0])); - bool ACCmode(true); - - try { - // Check invocation syntax: [ACC] parsetfile UniqProcesName - // When we are called by ACC the first argument is ACC. - // otherwise we do all states right after each other. - if ((argc < 2) || (strcmp("ACC", argv[1]) != 0)) { - // we were not called by ACC - LOG_DEBUG(programName + " not started by ACC"); - ACCmode = false; - } - else { - LOG_DEBUG(programName + " started by ACC"); - } - - // Read in the parameterset. - ConfigLocator CL; - string ParsetFile = CL.locate(argv[1 + (ACCmode ? 1 : 0)]); - ASSERTSTR(!ParsetFile.empty(), "Could not find parameterset " << argv[1]); - LOG_INFO_STR("Using parameterset " << ParsetFile); - ACC::APS::globalParameterSet()->adoptFile(ParsetFile); - - // When not under control of ACC execute all modes immediately - if (!ACCmode) { - LOG_DEBUG(programName + " starting define"); - if (!theProcess->define()) { - return (1); - } - - LOG_DEBUG(programName + " initializing"); - if (!theProcess->init()) { - return (1); - } - - LOG_DEBUG(programName + " running"); - int noRuns = atoi(argv[argc - 1]); - if (noRuns == 0) { - noRuns = 1; - } - for (int run = 0; run < noRuns; run++) { - if (!theProcess->run()) { - return (1); - } - } - - LOG_DEBUG(programName + " releasing"); - if (!theProcess->release()) { - return (1); - } - - LOG_DEBUG(programName + " quitting"); - if (!theProcess->quit()) { - return (1); - } - - LOG_DEBUG(programName + " deleting process"); - - } - else { - // we are under control of ACC - // Note args are: ACC parsetfile UniqProcesName - - string procID(argv[3]); - string prefix = ACC::APS::globalParameterSet()->getString("_parsetPrefix"); - - // connect to Application Controller - ACC::PLC::ProcControlServer pcServer(ACC::APS::globalParameterSet()->getString(prefix+"_ACnode"), - ACC::APS::globalParameterSet()->getUint16(prefix+"_ACport"), - theProcess); - - - // Tell AC who we are. - LOG_DEBUG_STR("Registering at ApplController as " << procID); - sleep(1); - pcServer.registerAtAC(procID); - - // Main processing loop - bool quiting(false); - while (!quiting) { - LOG_TRACE_STAT("Polling ApplController for message"); - if (pcServer.pollForMessage()) { - LOG_TRACE_COND("Message received from ApplController"); - - // get pointer to received data - ACC::PLC::DH_ProcControl* newMsg = pcServer.getDataHolder(); - - if (newMsg->getCommand() == ACC::PLC::PCCmdInit) { - pcServer.sendResult(newMsg->getCommand(), ACC::PLC::PcCmdMaskOk); - newMsg->setCommand(ACC::PLC::PCCmd(newMsg->getCommand() &~ ACC::PLC::PCCmdResult)); - } - - if (newMsg->getCommand() == ACC::PLC::PCCmdPause) { - quiting = true; - theProcess->clearRunState(); - pcServer.sendResult(newMsg->getCommand(), ACC::PLC::PcCmdMaskOk); - newMsg->setCommand(ACC::PLC::PCCmd(newMsg->getCommand() &~ ACC::PLC::PCCmdResult)); - } - - if (newMsg->getCommand() == ACC::PLC::PCCmdRelease) { - pcServer.sendResult(newMsg->getCommand(), ACC::PLC::PcCmdMaskOk); - newMsg->setCommand(ACC::PLC::PCCmd(newMsg->getCommand() &~ ACC::PLC::PCCmdResult)); - } - - if (newMsg->getCommand() == ACC::PLC::PCCmdQuit) { - quiting = true; - } - - if (!pcServer.handleMessage(newMsg)) { - LOG_ERROR("ProcControlServer::handleMessage() failed"); - } - - } else { - // no new command received. If we are in the runstate - // call the run-routine again. - if (theProcess->inRunState()) { - ACC::PLC::DH_ProcControl tmpMsg(ACC::PLC::PCCmdRun); - pcServer.handleMessage(&tmpMsg); - } - } - } - - LOG_INFO_STR("Shutting down: ApplicationController"); - pcServer.unregisterAtAC(""); // send to AC before quiting - } - } - catch (Exception& ex) { - LOG_FATAL_STR("Caught exception: " << ex << endl); - LOG_FATAL_STR(programName << " terminated by exception!"); - return (1); - } - catch (std::exception& ex) { - LOG_FATAL_STR("Caught std::exception: " << ex.what()); - return (1); - } - catch (...) { - LOG_FATAL_STR("Caught unknown exception, exitting"); - return (1); - } - -#ifdef HAVE_MPI - TH_MPI::finalize(); -#endif - - LOG_INFO_STR(programName << " terminated normally"); - return (0); -} - - } // namespace CS1 -} // namespace LOFAR diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/src/AH_DelayCompensation.cc b/Appl/CEP/CS1/CS1_DelayCompensation/src/AH_DelayCompensation.cc deleted file mode 100644 index b80432b9b62..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/src/AH_DelayCompensation.cc +++ /dev/null @@ -1,116 +0,0 @@ -//# AH_DelayCompensation.cc: one line description -//# -//# Copyright (C) 2006 -//# ASTRON (Netherlands Foundation for Research in Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -//# -//# This program is free software; you can redistribute it and/or modify -//# it under the terms of the GNU General Public License as published by -//# the Free Software Foundation; either version 2 of the License, or -//# (at your option) any later version. -//# -//# This program is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License -//# along with this program; if not, write to the Free Software -//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//# -//# $Id$ - -//# Always #include <lofar_config.h> first! -#include <lofar_config.h> - -//# Includes -#include <Common/LofarLogger.h> -#include <CS1_DelayCompensation/AH_DelayCompensation.h> -#include <CS1_DelayCompensation/WH_DelayCompensation.h> -#include <CS1_Interface/Stub_Delay.h> -#include <CS1_Interface/CS1_Config.h> -#include <CEPFrame/Composite.h> -#include <CEPFrame/Step.h> - -namespace LOFAR -{ - namespace CS1 - { - - INIT_TRACER_CONTEXT(AH_DelayCompensation, LOFARLOGGER_PACKAGE); - - AH_DelayCompensation::AH_DelayCompensation() : - itsCS1PS(0), - itsStub(0) - { - LOG_TRACE_FLOW(AUTO_FUNCTION_NAME); - } - - - AH_DelayCompensation::~AH_DelayCompensation() - { - LOG_TRACE_FLOW(AUTO_FUNCTION_NAME); - delete itsCS1PS; - } - - - void AH_DelayCompensation::define (const KeyValueMap&) - { - LOG_TRACE_FLOW(AUTO_FUNCTION_NAME); - - // Create the top-level composite - LOG_TRACE_STAT("Create the top-level composite"); - Composite comp(0, 0, "topComposite"); - setComposite(comp); - itsCS1PS = new CS1_Parset(&itsParamSet); - itsCS1PS->adoptFile("OLAP.parset"); - - // \note \c itsParamSet is a protected data member of - // tinyApplicationHolder - itsStub = new Stub_Delay(false, itsCS1PS); - - // Create a work holder for the delay compensation and place it in the - // top-level compositie. Since we have only one work holder, we will let - // it run on node 0. - LOG_TRACE_STAT("Creating WH_DelayCompensation; " - "adding it to top-level composite"); - - WH_DelayCompensation wh("WH_DelayCompensation", itsCS1PS); - Step step(wh); - comp.addBlock(step); - step.runOnNode(0); - - // Find out how many input section nodes we have; this number is equal - // to the number of RSP boards we have. - uint nrRSPBoards = itsCS1PS->getUint32("OLAP.nrRSPboards"); - LOG_TRACE_VAR_STR(nrRSPBoards << " RSP boards"); - - // Connect to the input section nodes. - LOG_TRACE_STAT("Creating stub connections to input section nodes"); - for (uint i = 0; i < nrRSPBoards; ++i) { - LOG_TRACE_LOOP_STR("Creating stub connection " << i); -#if 1 - itsStub->connect(i, step.getOutDataManager(i), i); -#endif - } - } - - - - void AH_DelayCompensation::run (int nsteps) - { - LOG_TRACE_LIFETIME_STR(TRACE_LEVEL_FLOW, "Number of process steps: " - << nsteps); - - // Starting processing loop - for (int i = 0; i < nsteps; ++i) { - LOG_TRACE_LOOP_STR("Processing run: " << i); - getComposite().process(); - } - - } - - - } // namespace CS1 - -} // namespace LOFAR diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/src/CS1_DelayCompensation.log_prop b/Appl/CEP/CS1/CS1_DelayCompensation/src/CS1_DelayCompensation.log_prop deleted file mode 100644 index f3544f42d99..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/src/CS1_DelayCompensation.log_prop +++ /dev/null @@ -1,25 +0,0 @@ - -# Configure the loggers -log4cplus.rootLogger=INFO, STDOUT, FILE -#log4cplus.logger.TRC=INFO -log4cplus.logger.TRC=INFO -log4cplus.logger.LCS.Common=FATAL, STDOUT, FILE - -# Define the appenders -log4cplus.appender.STDOUT=log4cplus::ConsoleAppender -log4cplus.appender.STDOUT.layout=log4cplus::PatternLayout -log4cplus.appender.STDOUT.layout.ConversionPattern=%D{%d-%m %H:%M:%S.%q} %-5p %c{9} - %m [%.25l]%n - -log4cplus.appender.STDERR=log4cplus::ConsoleAppender -log4cplus.appender.STDERR.layout=log4cplus::PatternLayout -log4cplus.appender.STDERR.layout.ConversionPattern=%D{%d-%m %H:%M:%S.%q} %-5p %c{3} - %m [%.25l]%n -log4cplus.appender.STDERR.logToStdErr=true - -log4cplus.appender.FILE=log4cplus::RollingFileAppender -log4cplus.appender.FILE.File=../log/%filename.log -log4cplus.appender.FILE.MaxFileSize=10MB -log4cplus.appender.FILE.MaxBackupIndex=2 -log4cplus.appender.FILE.layout=log4cplus::PatternLayout -log4cplus.appender.FILE.layout.ConversionPattern=%x %D{%d-%m %H:%M:%S.%q} %-5p %c{3} - %m [%.25l]%n - -log4cplus.appender.DUMP=log4cplus::NullAppender diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/src/CS1_DelayCompensation_main.cc b/Appl/CEP/CS1/CS1_DelayCompensation/src/CS1_DelayCompensation_main.cc deleted file mode 100644 index e27f7ed0d77..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/src/CS1_DelayCompensation_main.cc +++ /dev/null @@ -1,87 +0,0 @@ -//# CS1_DelayCompensation_main.cc: -//# -//# Copyright (C) 2002-2004 -//# ASTRON (Netherlands Foundation for Research in Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -//# -//# $Id$ - -//# Always #include <lofar_config.h> first! -#include <lofar_config.h> - -#include <Common/lofar_iostream.h> -#include <Common/LofarLogger.h> -#include <Common/LofarLocators.h> - -#include <tinyCEP/ApplicationHolderController.h> -#include <CS1_DelayCompensation/AH_DelayCompensation.h> - -using namespace LOFAR; -using namespace LOFAR::CS1; - -#if 1 -#include <CS1_DelayCompensation/ACCmain_DelayCompensation.h> - -int main(int argc, char* argv[]) { - - ConfigLocator aCL; - string progName = basename(argv[0]); - string logPropFile(progName + ".log_prop"); - INIT_LOGGER (aCL.locate(logPropFile).c_str()); - LOG_DEBUG_STR("Initialized logsystem with: " << aCL.locate(logPropFile)); - - AH_DelayCompensation myAH; - ApplicationHolderController myAHC(myAH, 1); // listen to ACC Controller once every 1 runs. - return ACCmain_DelayCompensation(argc, argv, &myAHC); -} - -#else - -int main (int argc, const char** argv) -{ - INIT_LOGGER("CS1_DelayCompensation"); - - // Check invocation syntax - try { - if ((argc>=3) && (toUpper(argv[1]) == "ACC")) { - LOG_TRACE_FLOW("Main program started by ACC"); - // we were called by ACC so execute the ACCmain - AH_DelayCompensation myAH; - ApplicationHolderController myAHController(myAH); - myAHController.main(argc, argv); - } else { - LOG_TRACE_FLOW("Main program not started by ACC"); - // there are no commandline arguments, so we were not called by ACC - - AH_DelayCompensation myAH; - - ACC::APS::ParameterSet ps("CS1.parset"); - myAH.setParameters(ps); - - myAH.setarg(argc, argv); - myAH.baseDefine(); - LOG_INFO("defined"); - Profiler::init(); - myAH.basePrerun(); - LOG_INFO("init done"); - Profiler::activate(); - int nrRuns = ps.getInt32("General.NRuns"); - LOG_INFO_STR("run " << nrRuns << " times"); - myAH.baseRun(nrRuns); - LOG_INFO("run complete"); - myAH.baseDump(); - myAH.baseQuit(); - Profiler::deActivate(); - } - } catch (Exception& ex) { - LOG_FATAL_STR("Caught exception: " << ex << endl); - LOG_FATAL_STR(argv[0] << " terminated by exception!"); - return 1; - } catch (...) { - LOG_FATAL_STR("Caught unknown exception, exiting"); - return 1; - } - LOG_INFO_STR(argv[0] << " terminated normally"); - return 0; -} -#endif diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/src/Makefile.am b/Appl/CEP/CS1/CS1_DelayCompensation/src/Makefile.am deleted file mode 100644 index 0ee0f2c0733..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/src/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -lib_LTLIBRARIES = libcs1_delaycompensation.la - -libcs1_delaycompensation_la_SOURCES = Package__Version.cc AH_DelayCompensation.cc \ - ACCmain_DelayCompensation.cc \ - WH_DelayCompensation.cc - -bin_PROGRAMS = versioncs1_delaycompensation CS1_DelayCompensation - -CS1_DelayCompensation_SOURCES = CS1_DelayCompensation_main.cc -CS1_DelayCompensation_LDADD = ../src/libcs1_delaycompensation.la -CS1_DelayCompensation_DEPENDENCIES = ../src/libcs1_delaycompensation.la \ - $(LOFAR_DEPEND) - -versioncs1_delaycompensation_SOURCES = versioncs1_delaycompensation.cc -versioncs1_delaycompensation_LDADD = libcs1_delaycompensation.la -versioncs1_delaycompensation_DEPENDENCIES = libcs1_delaycompensation.la $(LOFAR_DEPEND) - -include $(top_srcdir)/Makefile.common - -sysconf_DATA = CS1_DelayCompensation.log_prop diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/src/WH_DelayCompensation.cc b/Appl/CEP/CS1/CS1_DelayCompensation/src/WH_DelayCompensation.cc deleted file mode 100644 index f530cadc5ea..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/src/WH_DelayCompensation.cc +++ /dev/null @@ -1,382 +0,0 @@ -//# WH_DelayCompensation.cc: Workholder for the delay compensation. -//# -//# Copyright (C) 2006 -//# ASTRON (Netherlands Foundation for Research in Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -//# -//# This program is free software; you can redistribute it and/or modify -//# it under the terms of the GNU General Public License as published by -//# the Free Software Foundation; either version 2 of the License, or -//# (at your option) any later version. -//# -//# This program is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License -//# along with this program; if not, write to the Free Software -//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//# -//# $Id$ - -//# Always #include <lofar_config.h> first! -#include <lofar_config.h> - -//# Includes -#include <CS1_DelayCompensation/WH_DelayCompensation.h> -#include <CS1_Interface/DH_Delay.h> -#include <AMCBase/Direction.h> -#include <AMCBase/Position.h> -#include <AMCBase/Epoch.h> -#include <AMCBase/ConverterClient.h> -#include <AMCBase/RequestData.h> -#include <AMCBase/ResultData.h> -#include <AMCImpl/ConverterImpl.h> // Only for testing -#include <Common/LofarLogger.h> - -namespace LOFAR -{ - using namespace AMC; - using ACC::APS::ParameterSet; - - namespace CS1 - { - INIT_TRACER_CONTEXT(WH_DelayCompensation, LOFARLOGGER_PACKAGE); - - //##---------------- Public methods ----------------##// - - WH_DelayCompensation::WH_DelayCompensation(const string& name, - CS1_Parset *ps) : - WorkHolder (0, // inputs - ps->getUint32("OLAP.nrRSPboards"), // outputs - name, // name - "WH_DelayCompensation"), // type - itsCS1PS (ps), - itsNrBeams (ps->getUint32("Observation.nrBeams")), - itsNrStations(itsCS1PS->nrStations()), - itsNrDelays (itsNrBeams*itsNrStations), - itsSampleRate(itsCS1PS->sampleRate()), - itsLoopCount (0), - itsConverter (0) - { - LOG_TRACE_LIFETIME(TRACE_LEVEL_FLOW, ""); - - // Initialize our private data structures. - getConverterConfig(); - getBeamDirections(); - getPhaseCentres(); - getObservationEpoch(); - setPositionDiffs(); - - // Create outgoing dataholders for the delay information; - // one for each RSP board. - for (int i = 0; i < itsNoutputs; ++i) { - string str = "DH_Delay_out_" + formatString("%02d", i); - LOG_TRACE_LOOP_STR("Creating " << str); - getDataManager().addOutDataHolder(i, new DH_Delay(str, itsNrDelays)); - } - } - - - WH_DelayCompensation::~WH_DelayCompensation() - { - LOG_TRACE_FLOW(AUTO_FUNCTION_NAME); - } - - - void WH_DelayCompensation::preprocess() - { - LOG_TRACE_LIFETIME(TRACE_LEVEL_FLOW, ""); - itsLoopCount = 0; - - // Create the AMC converter. - ASSERT(!itsConverter); - itsConverter = createConverter(); - ASSERT(itsConverter); - - // Pre-allocate and initialize storage for the delay vectors. - itsDelaysAtBegin.resize(itsNrDelays); - itsDelaysAfterEnd.resize(itsNrDelays); - // Initialize \c itsDelaysAfterEnd with the conversion results for the - // epoch after the end of the first time interval. - calculateDelays(); - } - - - void WH_DelayCompensation::process() - { - // Calculate the delays for the epoch after the end of the current time - // interval. Put the results in itsDelaysAtBegin and itsDelaysAfterEnd. - if (itsLoopCount < itsObservationEpoch.size()) { - calculateDelays(); - - // Incrementing the loop count - LOG_TRACE_LIFETIME_STR(TRACE_LEVEL_FLOW, "count = " << itsLoopCount); - itsLoopCount++; - - // The delays -- split into a coarse (sample) delay and a fine - // (subsample) delay -- need to be put into a DelayInfo struct. - vector<DH_Delay::DelayInfo> delayInfo(itsNrDelays); - for (uint i = 0; i < itsNrDelays; ++i) { - - // Get delays "at begin" and "after end". - double db = itsDelaysAtBegin[i]; - double de = itsDelaysAfterEnd[i]; - - // The coarse delay will be determined for the center of the current - // time interval and will be expressed in \e samples. - delayInfo[i].coarseDelay = - (int32)floor(0.5 * (db + de) * itsSampleRate + 0.5); - - // The fine delay will be determined for the boundaries of the current - // time interval and will be expressed in seconds. - double d = delayInfo[i].coarseDelay / itsSampleRate; - delayInfo[i].fineDelayAtBegin = (float)(db - d); - delayInfo[i].fineDelayAfterEnd = (float)(de - d); - - LOG_TRACE_CALC_STR("Beamlet #" << i << ":"); - LOG_TRACE_CALC_STR(" coarseDelay = " << - delayInfo[i].coarseDelay); - LOG_TRACE_CALC_STR(" fineDelayAtBegin = " << - delayInfo[i].fineDelayAtBegin); - LOG_TRACE_CALC_STR(" fineDelayAfterEnd = " << - delayInfo[i].fineDelayAfterEnd); - } - - // We need to send the coarse and fine delay info to all RSP boards. - for (int rsp = 0; rsp < itsNoutputs; ++rsp) { - DH_Delay* dh; - ASSERT(dh = dynamic_cast<DH_Delay*>(getDataManager().getOutHolder(rsp))); - for (uint i = 0; i < itsNrDelays; ++i) { - (*dh)[i] = delayInfo[i]; - } - } - } - else{ - sleep(1); - } - } - - - void WH_DelayCompensation::postprocess() - { - LOG_TRACE_LIFETIME(TRACE_LEVEL_FLOW, ""); - // Delete the AMC converter - ASSERT(itsConverter); - delete itsConverter; - itsConverter = 0; - } - - - WH_DelayCompensation* WH_DelayCompensation::make(const string& name) - { - LOG_TRACE_FLOW(AUTO_FUNCTION_NAME); - return new WH_DelayCompensation(name, itsCS1PS); - } - - - //##---------------- Private methods ----------------##// - - void WH_DelayCompensation::getConverterConfig() - { - LOG_TRACE_FLOW(AUTO_FUNCTION_NAME); - string type = toUpper(itsCS1PS->getString("OLAP.DelayComp.converterType")); - if (type == "IMPL") itsConverterConfig.type = IMPL; - else if (type == "CLIENT") { - itsConverterConfig.type = CLIENT; - itsConverterConfig.server = itsCS1PS->getString("OLAP.OLAP_Conn.AMCServerHost"); - itsConverterConfig.port = itsCS1PS->getUint16("OLAP.OLAP_Conn.AMCServerPort"); - } - } - - - void WH_DelayCompensation::getBeamDirections() - { - LOG_TRACE_FLOW(AUTO_FUNCTION_NAME); - // First let's find out how many sources we have. - LOG_TRACE_VAR_STR(itsNrBeams << " beam direction(s):"); - - // What coordinate system is used for these source directions? - // Currently, we support J2000, ITRF, and AZEL. - Direction::Types dirType(Direction::INVALID); - string str = toUpper(itsCS1PS->getString("Observation.Beam.directionTypes")); - if (str == "J2000") dirType = Direction::J2000; - else if (str == "ITRF") dirType = Direction::ITRF; - else if (str == "AZEL") dirType = Direction::AZEL; - else ASSERTSTR(false, "Observation.BeamDirectionType must be one of " - "J2000, ITRF, or AZEL"); - - // Get the source directions from the parameter set. The source - // directions are stored as one large vector of doubles. A direction - // consists of two doubles. - vector<double> angle1, angle2; - - angle1 = itsCS1PS->getDoubleVector("Observation.Beam.angle1"); - angle2 = itsCS1PS->getDoubleVector("Observation.Beam.angle2"); - ASSERTSTR(angle1.size() == itsNrBeams, - angle1.size() << " == " << itsNrBeams); - ASSERTSTR(angle2.size() == itsNrBeams, - angle2.size() << " == " << itsNrBeams); - - // Reserve space in \a itsBeamDirections to avoid reallocations. - itsBeamDirections.reserve(itsNrBeams); - - // Split the \a dir vector into separate Direction objects. - for (uint i = 0; i < itsNrBeams; ++i) { - itsBeamDirections.push_back(Direction(angle1[i], angle2[i], dirType)); - LOG_TRACE_VAR_STR(" [" << i << "] = " << itsBeamDirections[i]); - } - } - - - void WH_DelayCompensation::getPhaseCentres() - { - LOG_TRACE_FLOW(AUTO_FUNCTION_NAME); - // First, let's find out how many stations we have. - LOG_TRACE_VAR_STR(itsNrStations << " station position(s):"); - - // Station positions must be given in ITRF; there is currently no - // support in the AMC package to convert between WGS84 and ITRF. - Position::Types posType(Position::INVALID); - string str = toUpper(itsCS1PS->getString("OLAP.DelayComp.positionType")); - if (str == "ITRF") posType = Position::ITRF; - else ASSERTSTR(false, "OLAP.DelayComp.positionType must be ITRF"); - - // Get the antenna positions from the parameter set. The antenna - // positions are stored as one large vector of doubles. - vector<double> pos; - pos = itsCS1PS->phaseCenters(); - ASSERTSTR(pos.size() == 3 * itsNrStations, - pos.size() << " == " << 3 * itsNrStations); - - // Reserve space in \a itsPhaseCentres to avoid reallocations. - itsPhaseCentres.reserve(itsNrStations); - - // Split the \a pos vector into separate Position objects. - for (uint i = 0; i < itsNrStations; ++i) { - itsPhaseCentres. - push_back(Position(pos[3*i], pos[3*i+1], pos[3*i+2], posType)); - LOG_TRACE_VAR_STR(" [" << i << "] = " << itsPhaseCentres[i]); - } - } - - - void WH_DelayCompensation::getObservationEpoch() - { - LOG_TRACE_FLOW(AUTO_FUNCTION_NAME); - // The observation epoch should be given by a start time and a stop - // time. Both times must be specified in Modified Julian Date (MJD). - Epoch startTime; - startTime.utc(itsCS1PS->startTime()); - Epoch stopTime; - stopTime.utc(itsCS1PS->stopTime()); - - // The time step is equal to one integration period, which, in turn, is - // defined as the number of samples used per integration period divided - // by the sample rate in seconds. Divide by 86400 to get it in days. - Epoch stepTime = itsCS1PS->BGLintegrationTime() / 86400; - - LOG_TRACE_VAR("Observation:"); - LOG_TRACE_VAR_STR(" startTime = " << startTime); - LOG_TRACE_VAR_STR(" stopTime = " << stopTime); - LOG_TRACE_VAR_STR(" stepTime = " << stepTime); - - ASSERTSTR(startTime <= stopTime, startTime << " <= " << stopTime); - - // Reserve space in \a itsObservationEpoch to avoid reallocations - uint sz = uint(1 + ceil((stopTime - startTime).mjd() / stepTime.mjd())); - - // Variable sz must be equal to noRuns. sz and noRuns must be a multiple - // of 16, plus 16. - sz = ((sz+15)&~15) + 16; - - LOG_TRACE_VAR_STR(sz << " epoch(s)"); - itsObservationEpoch.reserve(sz); - - // Fill a vector of Epoch, with a time interval \a stepTime, starting - // at \a startTime and ending at \a stopTime. - Epoch time = startTime; - for (uint i = 0; i < sz; i++, time += stepTime) { - itsObservationEpoch.push_back(Epoch(time)); - LOG_TRACE_LOOP_STR(" [" << i << "] = " << itsObservationEpoch[i]); - } - } - - - void WH_DelayCompensation::setPositionDiffs() - { - LOG_TRACE_FLOW(AUTO_FUNCTION_NAME); - // Reserve space in \a itsPhasePositionDiffs to avoid reallocations. - itsPhasePositionDiffs.reserve(itsPhaseCentres.size()); - - // Calculate the station to reference station position difference vector - // all stations. - LOG_TRACE_VAR("Position difference vectors:"); - const Position& p0 = itsPhaseCentres[0]; - for (uint i = 0; i < itsPhaseCentres.size(); ++i) { - itsPhasePositionDiffs.push_back(itsPhaseCentres[i] - p0); - LOG_TRACE_VAR_STR(" [" << i << "] = " << itsPhasePositionDiffs[i]); - } - } - - - Converter* WH_DelayCompensation::createConverter() - { - LOG_TRACE_FLOW(AUTO_FUNCTION_NAME); - if (itsConverterConfig.type == IMPL) return new ConverterImpl(); - if (itsConverterConfig.type == CLIENT) { - return new ConverterClient(itsConverterConfig.server, - itsConverterConfig.port); - } - return 0; - } - - - void WH_DelayCompensation::calculateDelays() - { - // Avoid invalid memory reads. - ASSERTSTR(itsLoopCount < itsObservationEpoch.size(), - itsLoopCount << " < " << itsObservationEpoch.size()); - - LOG_TRACE_LIFETIME_STR(TRACE_LEVEL_FLOW, - itsObservationEpoch[itsLoopCount]); - - // Convert the source coordinates to ITRF, for all beams and all - // stations for the epoch "after-end" of the current time interval. - RequestData request (itsBeamDirections, itsPhaseCentres, - itsObservationEpoch[itsLoopCount]); - ResultData result; - itsConverter->j2000ToItrf(result, request); - - // Since we've calculated the coordinates for only one epoch, the number - // of directions in the result vector must be equal to the number of - // delays per epoch. - ASSERTSTR(result.direction.size() == itsNrDelays, - result.direction.size() << " == " << itsNrDelays); - - LOG_TRACE_CALC("Beamlet directions:"); - for (uint i = 0; i < result.direction.size(); ++i) { - LOG_TRACE_CALC_STR(" [" << i << "] = " << result.direction[i]); - } - - // Copy the current contents of itsDelaysAfterEnd to itsDelaysAtBegin. - itsDelaysAtBegin = itsDelaysAfterEnd; - - // From the source coordinates in ITRF, calculate the geometrical - // delays. Please remember that the vector result.direction stores the - // directions per epoch, per position, per direction. I.e. the first - // itsBeamDirections.size() elements contain the converted directions - // for itsPhaseCentres[0], the second for itsPhaseCentres[1], - // etc. - LOG_TRACE_CALC("Beamlet geometrical delays:"); - for (uint i = 0; i < itsNrDelays; ++i) { - uint j = i / itsBeamDirections.size(); - itsDelaysAfterEnd[i] = - (result.direction[i] * itsPhasePositionDiffs[j]) / speedOfLight; - LOG_TRACE_CALC_STR(" [" << i << "]: " << itsDelaysAfterEnd[i]); - } - } - } // namespace CS1 - -} // namespace LOFAR diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/test/Makefile.am b/Appl/CEP/CS1/CS1_DelayCompensation/test/Makefile.am deleted file mode 100644 index 218ac810b67..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/test/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -check_PROGRAMS = tWH_DelayCompensation - -# programs to run through supplied checktools -CHECKTOOLPROGS = tWH_DelayCompensation -#ENDCHECKTOOLPROGS - -# scripts and possible programs to run tests -TESTS = tWH_DelayCompensation.sh - -XFAIL_TESTS = - -tWH_DelayCompensation_SOURCES = tWH_DelayCompensation.cc -tWH_DelayCompensation_LDADD = ../src/libcs1_delaycompensation.la -tWH_DelayCompensation_DEPENDENCIES = ../src/libcs1_delaycompensation.la $(LOFAR_DEPEND) - -# all files (.run, .stdout, .in, .log_prop, etc.) needed to run tests -EXTRA_DIST = $(TESTS) - - -include $(top_srcdir)/Makefile.common diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/test/tWH_DelayCompensation.cc b/Appl/CEP/CS1/CS1_DelayCompensation/test/tWH_DelayCompensation.cc deleted file mode 100644 index 682a778ccbd..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/test/tWH_DelayCompensation.cc +++ /dev/null @@ -1,73 +0,0 @@ -//# tWH_DelayCompensation.cc: test program for WH_DelayCompensation class -//# -//# Copyright (C) 2006 -//# ASTRON (Netherlands Foundation for Research in Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -//# -//# This program is free software; you can redistribute it and/or modify -//# it under the terms of the GNU General Public License as published by -//# the Free Software Foundation; either version 2 of the License, or -//# (at your option) any later version. -//# -//# This program is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License -//# along with this program; if not, write to the Free Software -//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//# -//# $Id$ - -//# Always #include <lofar_config.h> first! -#include <lofar_config.h> - -//# Includes -#include <Common/LofarLogger.h> -#include <CS1_DelayCompensation/WH_DelayCompensation.h> -#include <APS/ParameterSet.h> - -using namespace LOFAR::ACC::APS; -using namespace LOFAR::CS1; - -int main (int argc, char* argv[]) { - - INIT_LOGGER (argv[0]); - - // Check invocation syntax - if (argc < 1) { - LOG_FATAL_STR ("Usage: " << argv[0]); - return 1; - } - - // Tell operator we are trying to start up. - LOG_INFO_STR("Starting up: " << argv[0]); - - try { - // ... do work ... - ParameterSet pset("CS1.parset"); - WH_DelayCompensation wh("WH_DelayCompensation", pset); - wh.basePreprocess(); - for (uint i = 0; i < 1000; ++i) { - wh.baseProcess(); - } - wh.basePostprocess(); - wh.dump(); - LOG_INFO_STR("Shutting down: " << argv[0]); - } - catch (LOFAR::Exception& e) { - LOG_FATAL_STR(e); - LOG_FATAL_STR(argv[0] << " terminated by exception!"); - return 1; - } - catch (std::exception& e) { - LOG_FATAL(e.what()); - LOG_FATAL_STR(argv[0] << " terminated by exception!"); - return 1; - } - - LOG_INFO_STR(argv[0] << " terminated normally"); - return (0); - -} diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/test/tWH_DelayCompensation.sh b/Appl/CEP/CS1/CS1_DelayCompensation/test/tWH_DelayCompensation.sh deleted file mode 100755 index 1d8a714c684..00000000000 --- a/Appl/CEP/CS1/CS1_DelayCompensation/test/tWH_DelayCompensation.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -$lofar_sharedir/runtest.sh tWH_DelayCompensation 2>&1 > tWH_DelayCompensation.log diff --git a/Appl/CEP/CS1/CS1_DelayCompensation/test/tWH_DelayCompensation.stdout b/Appl/CEP/CS1/CS1_DelayCompensation/test/tWH_DelayCompensation.stdout deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/Appl/CEP/CS1/CS1_Tools/include/CS1_Tools/Makefile.am b/Appl/CEP/CS1/CS1_Tools/include/CS1_Tools/Makefile.am index 42324a9f0ea..db5d3ab761c 100644 --- a/Appl/CEP/CS1/CS1_Tools/include/CS1_Tools/Makefile.am +++ b/Appl/CEP/CS1/CS1_Tools/include/CS1_Tools/Makefile.am @@ -1,3 +1 @@ -pkginclude_HEADERS = Package__Version.h - include $(top_srcdir)/Makefile.common -- GitLab