diff --git a/CEP/DP3/DPPP/include/DPPP/AORFlagger.h b/CEP/DP3/DPPP/include/DPPP/AORFlagger.h index 1d9a71928fafb144afabf975c62e98179a41c149..93a29d66ee89c8b482580331b5c6c3e174dbf48a 100644 --- a/CEP/DP3/DPPP/include/DPPP/AORFlagger.h +++ b/CEP/DP3/DPPP/include/DPPP/AORFlagger.h @@ -38,9 +38,9 @@ namespace LOFAR { - namespace DPPP { - class ParSet; + class ParameterSet; + namespace DPPP { // @ingroup NDPPP // This class is a DPStep class flagging data points based on the @@ -70,7 +70,7 @@ namespace LOFAR { public: // Construct the object. // Parameters are obtained from the parset using the given prefix. - AORFlagger (DPInput*, const ParSet&, const string& prefix); + AORFlagger (DPInput*, const ParameterSet&, const string& prefix); virtual ~AORFlagger(); diff --git a/CEP/DP3/DPPP/include/DPPP/Averager.h b/CEP/DP3/DPPP/include/DPPP/Averager.h index 06b11b4c5b17c77682cec057ce96d36ea8fc76f5..f137ef49baebfe023b63d3ae0a0a511b57dceb2f 100644 --- a/CEP/DP3/DPPP/include/DPPP/Averager.h +++ b/CEP/DP3/DPPP/include/DPPP/Averager.h @@ -33,9 +33,9 @@ namespace LOFAR { - namespace DPPP { - class ParSet; + class ParameterSet; + namespace DPPP { // @ingroup NDPPP // This class is a DPStep class calculating the weighted average of @@ -55,7 +55,7 @@ namespace LOFAR { public: // Construct the object. // Parameters are obtained from the parset using the given prefix. - Averager (DPInput*, const ParSet&, const string& prefix); + Averager (DPInput*, const ParameterSet&, const string& prefix); // Construct the object using the given parameters. Averager (DPInput*, const string& stepname, diff --git a/CEP/DP3/DPPP/include/DPPP/BaselineSelection.h b/CEP/DP3/DPPP/include/DPPP/BaselineSelection.h index 7f83ace2753098399f3f912ccfaf8c97aa3d1b0a..7fa3c694f3477d1b045d2ade325b4fdf7d2dc1c4 100644 --- a/CEP/DP3/DPPP/include/DPPP/BaselineSelection.h +++ b/CEP/DP3/DPPP/include/DPPP/BaselineSelection.h @@ -27,13 +27,14 @@ // @file // @brief Class to handle the baseline selection -#include <DPPP/ParSet.h> #include <DPPP/DPInfo.h> -#include <Common/ParameterValue.h> #include <casa/Arrays/Vector.h> #include <casa/Arrays/Matrix.h> namespace LOFAR { + class ParameterSet; + class ParameterValue; + namespace DPPP { // Class containing a few static functions to parse a baseline selection @@ -53,7 +54,7 @@ namespace LOFAR { // <li> minbl: minimum baseline length (in m); only if minmax=true // <li> maxbl: maximum baseline length (in m); only if minmax=true // </ul> - BaselineSelection (const ParSet&, const string& prefix, + BaselineSelection (const ParameterSet&, const string& prefix, bool minmax=false, const string& defaultCorrType=string()); diff --git a/CEP/DP3/DPPP/include/DPPP/CMakeLists.txt b/CEP/DP3/DPPP/include/DPPP/CMakeLists.txt index 5ecc418523b596b7bec6eba3bb425d377163c75a..82df68d72afc7088885970b97b954e1494100068 100644 --- a/CEP/DP3/DPPP/include/DPPP/CMakeLists.txt +++ b/CEP/DP3/DPPP/include/DPPP/CMakeLists.txt @@ -3,7 +3,7 @@ # List of header files that will be installed. set(inst_HEADERS DPRun.h DPStep.h DPInput.h DPBuffer.h DPInfo.h - ParSet.h DPLogger.h ProgressMeter.h FlagCounter.h + DPLogger.h ProgressMeter.h FlagCounter.h UVWCalculator.h BaselineSelection.h MSReader.h MSWriter.h MSUpdater.h Counter.h Averager.h MedFlagger.h PreFlagger.h UVWFlagger.h AORFlagger.h diff --git a/CEP/DP3/DPPP/include/DPPP/Counter.h b/CEP/DP3/DPPP/include/DPPP/Counter.h index 0d8cbbca992faa983e07fa6147bc1203a11b46cb..8215f2383e12162f511a6bd992366e01ada4f2a6 100644 --- a/CEP/DP3/DPPP/include/DPPP/Counter.h +++ b/CEP/DP3/DPPP/include/DPPP/Counter.h @@ -33,9 +33,9 @@ namespace LOFAR { - namespace DPPP { - class ParSet; + class ParameterSet; + namespace DPPP { // @ingroup NDPPP // This class is a DPStep class counting the number of flags per @@ -48,7 +48,7 @@ namespace LOFAR { public: // Construct the object. // Parameters are obtained from the parset using the given prefix. - Counter (DPInput*, const ParSet&, const string& prefix); + Counter (DPInput*, const ParameterSet&, const string& prefix); virtual ~Counter(); diff --git a/CEP/DP3/DPPP/include/DPPP/DPRun.h b/CEP/DP3/DPPP/include/DPPP/DPRun.h index 3ba728f3d46e3ae23aab96c0d883dfaf7d1abd06..d00f0a8771f54493534187e7a42355a4a9aeec85 100644 --- a/CEP/DP3/DPPP/include/DPPP/DPRun.h +++ b/CEP/DP3/DPPP/include/DPPP/DPRun.h @@ -29,7 +29,7 @@ #include <lofar_config.h> #include <DPPP/DPStep.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> namespace LOFAR { namespace DPPP { @@ -49,7 +49,7 @@ namespace LOFAR { private: // Create the step objects. // It fills DPInfo object and the name of the MS being written. - static DPStep::ShPtr makeSteps (const ParSet& parset, + static DPStep::ShPtr makeSteps (const ParameterSet& parset, std::string& msName); }; diff --git a/CEP/DP3/DPPP/include/DPPP/Demixer.h b/CEP/DP3/DPPP/include/DPPP/Demixer.h index 25b8258a8d695b16cbd46553d4fd2de653c07650..ffe995a871730abd92f78adb376acabc7e578668 100644 --- a/CEP/DP3/DPPP/include/DPPP/Demixer.h +++ b/CEP/DP3/DPPP/include/DPPP/Demixer.h @@ -46,9 +46,9 @@ namespace LOFAR { - namespace DPPP { - class ParSet; + class ParameterSet; + namespace DPPP { // @ingroup NDPPP typedef vector<Patch::ConstPtr> PatchList; @@ -68,7 +68,7 @@ namespace LOFAR { public: // Construct the object. // Parameters are obtained from the parset using the given prefix. - Demixer (DPInput*, const ParSet&, const string& prefix); + Demixer (DPInput*, const ParameterSet&, const string& prefix); // Process the data. // It keeps the data. diff --git a/CEP/DP3/DPPP/include/DPPP/Filter.h b/CEP/DP3/DPPP/include/DPPP/Filter.h index ee63f38274933208b913bcfcabb5ad47766a4634..2ebe3e237017226bd1254d9b2670139eed01daf2 100644 --- a/CEP/DP3/DPPP/include/DPPP/Filter.h +++ b/CEP/DP3/DPPP/include/DPPP/Filter.h @@ -33,9 +33,9 @@ namespace LOFAR { - namespace DPPP { - class ParSet; + class ParameterSet; + namespace DPPP { // @ingroup NDPPP // This class is a DPInput step reading the data from a MeasurementSet. @@ -128,7 +128,7 @@ namespace LOFAR { // Construct the object for the given MS. // Parameters are obtained from the parset using the given prefix. - Filter (DPInput* input, const ParSet&, const string& prefix); + Filter (DPInput* input, const ParameterSet&, const string& prefix); // Construct the object for the given MS and baseline selection. Filter (DPInput* input, const BaselineSelection&); diff --git a/CEP/DP3/DPPP/include/DPPP/FlagCounter.h b/CEP/DP3/DPPP/include/DPPP/FlagCounter.h index 7a8fee17554082d031caae536d2d21083d24e2f8..92d7a596d2a0c185cf7b6f0660268097ab77ebb8 100644 --- a/CEP/DP3/DPPP/include/DPPP/FlagCounter.h +++ b/CEP/DP3/DPPP/include/DPPP/FlagCounter.h @@ -33,11 +33,11 @@ #include <casa/Arrays/Vector.h> namespace LOFAR { - namespace DPPP { + class ParameterSet; + namespace DPPP { //# Forward Declarations. class DPInfo; - class ParSet; // @ingroup NDPPP @@ -57,7 +57,8 @@ namespace LOFAR { // This constructor creates an empty object. // It reads info from the parset to see if percentages have to be saved. - FlagCounter (const string& msName, const ParSet&, const string& prefix); + FlagCounter (const string& msName, const ParameterSet&, + const string& prefix); // Size all counters and initialize them to zero using the sizes // from the DPInfo object. diff --git a/CEP/DP3/DPPP/include/DPPP/MSReader.h b/CEP/DP3/DPPP/include/DPPP/MSReader.h index 62ba12d5494b726e9871a30e6f068ed07aa6bc81..5d86df4ca81355e3650402d16df6d071611698be 100644 --- a/CEP/DP3/DPPP/include/DPPP/MSReader.h +++ b/CEP/DP3/DPPP/include/DPPP/MSReader.h @@ -38,9 +38,9 @@ namespace LOFAR { - namespace DPPP { - class ParSet; + class ParameterSet; + namespace DPPP { // @ingroup NDPPP // This class is a DPInput step reading the data from a MeasurementSet. @@ -135,7 +135,7 @@ namespace LOFAR { // Parameters are obtained from the parset using the given prefix. // The missingData argument is for MultiMSReader. MSReader (const std::string& msName, - const ParSet&, const string& prefix, + const ParameterSet&, const string& prefix, bool missingData = false); virtual ~MSReader(); @@ -172,8 +172,8 @@ namespace LOFAR { virtual casa::Cube<bool> getFullResFlags (const casa::RefRows& rowNrs); // Read the given data column at the given row numbers. - virtual casa::Cube<casa::Complex> getData (const casa::String& columnName, - const casa::RefRows& rowNrs); + /// virtual casa::Cube<casa::Complex> getData (const casa::String& columnName, + /// const casa::RefRows& rowNrs); // Write the flags at the given row numbers. // It is used by MSUpdater. diff --git a/CEP/DP3/DPPP/include/DPPP/MSUpdater.h b/CEP/DP3/DPPP/include/DPPP/MSUpdater.h index 49f84e208aebb277a1bae8e0535d579ab9420c5e..acb87da13ef10645b0d76b9cf8fb575968f87e9d 100644 --- a/CEP/DP3/DPPP/include/DPPP/MSUpdater.h +++ b/CEP/DP3/DPPP/include/DPPP/MSUpdater.h @@ -32,9 +32,9 @@ namespace LOFAR { - namespace DPPP { - class ParSet; + class ParameterSet; + namespace DPPP { //# Forward Declarations. class MSReader; @@ -50,7 +50,7 @@ namespace LOFAR { class MSUpdater: public DPStep { public: - MSUpdater (MSReader*, const ParSet& parset, + MSUpdater (MSReader*, const ParameterSet& parset, const std::string& prefix); virtual ~MSUpdater(); diff --git a/CEP/DP3/DPPP/include/DPPP/MSWriter.h b/CEP/DP3/DPPP/include/DPPP/MSWriter.h index 7d32aa282d0471c735b5dd5d26f8ba8b75f6473f..fad5c9432cdebac548b5a15d83e87276174fbdea 100644 --- a/CEP/DP3/DPPP/include/DPPP/MSWriter.h +++ b/CEP/DP3/DPPP/include/DPPP/MSWriter.h @@ -39,8 +39,6 @@ namespace LOFAR { class ParameterSet; namespace DPPP { - class ParSet; - // @ingroup NDPPP // This class is a DPStep creating a new MeasurementSet and writing @@ -64,7 +62,7 @@ namespace LOFAR { public: explicit MSWriter (MSReader* reader, const std::string& outName, const DPInfo&, - const ParSet&, const string& prefix); + const ParameterSet&, const string& prefix); virtual ~MSWriter(); diff --git a/CEP/DP3/DPPP/include/DPPP/MedFlagger.h b/CEP/DP3/DPPP/include/DPPP/MedFlagger.h index 4e3e17434c7b373d9daad5ca64802c571feccb5a..3410d28bab401f92f322098fab2efcde1891dc9c 100644 --- a/CEP/DP3/DPPP/include/DPPP/MedFlagger.h +++ b/CEP/DP3/DPPP/include/DPPP/MedFlagger.h @@ -33,10 +33,9 @@ #include <Common/lofar_vector.h> namespace LOFAR { + class ParameterSet; namespace DPPP { - class ParSet; - // @ingroup NDPPP // This class is a DPStep class flagging data points based on the median @@ -78,7 +77,7 @@ namespace LOFAR { public: // Construct the object. // Parameters are obtained from the parset using the given prefix. - MedFlagger (DPInput*, const ParSet&, const string& prefix); + MedFlagger (DPInput*, const ParameterSet&, const string& prefix); virtual ~MedFlagger(); diff --git a/CEP/DP3/DPPP/include/DPPP/MultiMSReader.h b/CEP/DP3/DPPP/include/DPPP/MultiMSReader.h index 35623820d6486b0a3c4a912853753a41acd8471b..6a9c2255fee485420725afca95a178414b254dc5 100644 --- a/CEP/DP3/DPPP/include/DPPP/MultiMSReader.h +++ b/CEP/DP3/DPPP/include/DPPP/MultiMSReader.h @@ -38,9 +38,9 @@ namespace LOFAR { - namespace DPPP { - class ParSet; + class ParameterSet; + namespace DPPP { // @ingroup NDPPP // This class is a DPInput step reading the data from a MeasurementSet. @@ -131,7 +131,7 @@ namespace LOFAR { // Construct the object for the given MS. // Parameters are obtained from the parset using the given prefix. MultiMSReader (const vector<string>& msNames, - const ParSet&, const string& prefix); + const ParameterSet&, const string& prefix); virtual ~MultiMSReader(); @@ -167,8 +167,8 @@ namespace LOFAR { virtual casa::Cube<bool> getFullResFlags (const casa::RefRows& rowNrs); // Read the given data column at the given row numbers. - virtual casa::Cube<casa::Complex> getData (const casa::String& columnName, - const casa::RefRows& rowNrs); + /// virtual casa::Cube<casa::Complex> getData (const casa::String& columnName, + /// const casa::RefRows& rowNrs); // Tell if the visibility data are to be read. virtual void setReadVisData (bool readVisData); diff --git a/CEP/DP3/DPPP/include/DPPP/ParSet.h b/CEP/DP3/DPPP/include/DPPP/ParSet.h deleted file mode 100644 index 69f5baa1ecb6f2c8d671962c1962acf7a61f1fed..0000000000000000000000000000000000000000 --- a/CEP/DP3/DPPP/include/DPPP/ParSet.h +++ /dev/null @@ -1,112 +0,0 @@ -//# ParSet.h: Wrapper around ParaMeterSet to keep track of parameters asked for -//# Copyright (C) 2010 -//# ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite 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 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite 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 the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ -//# -//# @author Ger van Diepen - -#ifndef DPPP_PARSET_H -#define DPPP_PARSET_H - -// @file -// @brief Wrapper around ParaMeterSet to keep track of parameters asked for - -#include <Common/ParameterSet.h> -#include <Common/lofar_string.h> -#include <Common/lofar_vector.h> -#include <Common/lofar_set.h> - -namespace LOFAR { - - namespace DPPP { - - // @ingroup NDPPP - - // This class keeps track of the parameters asked for. - // In this way it is possible to give a warning or error that the - // ParameterSet has more parameters than asked for. It is an aid in - // detecting misspelled parameters names. - - class ParSet - { - public: - ParSet (const ParameterSet&); - - // Ask a parameter with a possible default value. - // @{ - bool getBool (const string& aKey) const; - bool getBool (const string& aKey, bool aValue) const; - int getInt (const string& aKey) const; - int getInt (const string& aKey, int aValue) const; - uint getUint (const string& aKey) const; - uint getUint (const string& aKey, uint aValue) const; - float getFloat (const string& aKey) const; - float getFloat (const string& aKey, float aValue) const; - double getDouble(const string& aKey) const; - double getDouble(const string& aKey, double aValue) const; - string getString(const string& aKey) const; - string getString(const string& aKey, const string& aValue) const; - vector<bool> getBoolVector (const string& aKey, - bool expandable = false) const; - vector<bool> getBoolVector (const string& aKey, - const vector<bool>& aValue, - bool expandable = false) const; - vector<int> getIntVector (const string& aKey, - bool expandable = false) const; - vector<int> getIntVector (const string& aKey, - const vector<int>& aValue, - bool expandable = false) const; - vector<uint> getUintVector (const string& aKey, - bool expandable = false) const; - vector<uint> getUintVector (const string& aKey, - const vector<uint>& aValue, - bool expandable = false) const; - vector<float> getFloatVector (const string& aKey, - bool expandable = false) const; - vector<float> getFloatVector (const string& aKey, - const vector<float>& aValue, - bool expandable = false) const; - vector<double> getDoubleVector(const string& aKey, - bool expandable = false) const; - vector<double> getDoubleVector(const string& aKey, - const vector<double>& aValue, - bool expandable = false) const; - vector<string> getStringVector(const string& aKey, - bool expandable = false) const; - vector<string> getStringVector(const string& aKey, - const vector<string>& aValue, - bool expandable = false) const; - ParameterRecord getRecord (const string& aKey) const; - - // Get all unused parameters. - vector<string> unusedKeys() const; - - // Get the underlying ParameterSet. - const ParameterSet& parameterSet() const - { return itsParSet; } - - private: - ParameterSet itsParSet; - mutable set<string> itsAskedParms; - }; - - } //# end namespace -} - -#endif diff --git a/CEP/DP3/DPPP/include/DPPP/PhaseShift.h b/CEP/DP3/DPPP/include/DPPP/PhaseShift.h index 13421919feba2ef8bbb92bccafd38440d4d5dda5..4018a9b06b5e5671e933495b2c5564697661f5a5 100644 --- a/CEP/DP3/DPPP/include/DPPP/PhaseShift.h +++ b/CEP/DP3/DPPP/include/DPPP/PhaseShift.h @@ -33,9 +33,9 @@ namespace LOFAR { - namespace DPPP { - class ParSet; + class ParameterSet; + namespace DPPP { // @ingroup NDPPP // This class is a DPStep class to shift the data and UVW coordinates @@ -50,13 +50,13 @@ namespace LOFAR { // Construct the object. // Parameters are obtained from the parset using the given prefix. // This is the standard constructor where the phasecenter must be given. - PhaseShift (DPInput*, const ParSet&, const string& prefix); + PhaseShift (DPInput*, const ParameterSet&, const string& prefix); // Construct the object. // Parameters are obtained from the parset using the given prefix. // This is a constructor for Demixer where the phasecenter has the // given default value. - PhaseShift (DPInput*, const ParSet&, const string& prefix, + PhaseShift (DPInput*, const ParameterSet&, const string& prefix, const vector<string>& defVal); virtual ~PhaseShift(); @@ -87,6 +87,10 @@ namespace LOFAR { const casa::Matrix<casa::DComplex>& getPhasors() const { return itsPhasors; } + // Get the phase center. + const vector<string>& getPhaseCenter() const + { return itsCenter; } + private: // Interpret the phase center specification. // Currently only J2000 RA and DEC can be given. diff --git a/CEP/DP3/DPPP/include/DPPP/PreFlagger.h b/CEP/DP3/DPPP/include/DPPP/PreFlagger.h index baa8c937b6acfb204930eff4a48cfcf1b5c17788..b335bc8c0714a354f5fa8f16d2c0e004dc21f7ee 100644 --- a/CEP/DP3/DPPP/include/DPPP/PreFlagger.h +++ b/CEP/DP3/DPPP/include/DPPP/PreFlagger.h @@ -34,11 +34,10 @@ #include <measures/Measures/MDirection.h> namespace LOFAR { + class ParameterSet; class ParameterValue; namespace DPPP { - class ParSet; - // @ingroup NDPPP // This class is a DPStep class flagging data points based on data @@ -75,7 +74,7 @@ namespace LOFAR { // Construct the object. // Parameters are obtained from the parset using the given prefix. - PreFlagger (DPInput*, const ParSet&, const string& prefix); + PreFlagger (DPInput*, const ParameterSet&, const string& prefix); virtual ~PreFlagger(); @@ -125,7 +124,7 @@ namespace LOFAR { {} // Construct from the parset parameters. - PSet (DPInput*, const ParSet& parset, const string& prefix); + PSet (DPInput*, const ParameterSet& parset, const string& prefix); // Set and return the flags. casa::Cube<bool>* process (DPBuffer&, uint timeSlot, diff --git a/CEP/DP3/DPPP/include/DPPP/StationAdder.h b/CEP/DP3/DPPP/include/DPPP/StationAdder.h index 755962612147f65330480876c0bf6d996084ad7d..3cd95859eae663f27a826436276abb2a855a58b0 100644 --- a/CEP/DP3/DPPP/include/DPPP/StationAdder.h +++ b/CEP/DP3/DPPP/include/DPPP/StationAdder.h @@ -34,10 +34,9 @@ #include <measures/Measures/MPosition.h> namespace LOFAR { + class ParameterSet; namespace DPPP { - class ParSet; - // @ingroup NDPPP // This class is a DPStep class summing stations to a superstation. @@ -63,7 +62,7 @@ namespace LOFAR { public: // Construct the object. // Parameters are obtained from the parset using the given prefix. - StationAdder (DPInput*, const ParSet&, const string& prefix); + StationAdder (DPInput*, const ParameterSet&, const string& prefix); virtual ~StationAdder(); diff --git a/CEP/DP3/DPPP/include/DPPP/UVWFlagger.h b/CEP/DP3/DPPP/include/DPPP/UVWFlagger.h index f3a6b32adcfc5ccc38439cfa2d41fca814c231ed..3642f190ea3c8535812656baff027ee5cd241220 100644 --- a/CEP/DP3/DPPP/include/DPPP/UVWFlagger.h +++ b/CEP/DP3/DPPP/include/DPPP/UVWFlagger.h @@ -33,11 +33,10 @@ #include <Common/lofar_vector.h> namespace LOFAR { + class ParameterSet; class ParameterValue; namespace DPPP { - class ParSet; - // @ingroup NDPPP // This class is a DPStep class flagging data points based on data @@ -59,7 +58,7 @@ namespace LOFAR { // The antenna names are used to find antenna numbers. // The channel frequencies as they are in the input step must be given // starting at the start-channel. - UVWFlagger (DPInput*, const ParSet&, const string& prefix); + UVWFlagger (DPInput*, const ParameterSet&, const string& prefix); virtual ~UVWFlagger(); @@ -97,7 +96,7 @@ namespace LOFAR { // (min and max are also turned into a range). // Optionally the values are squared to avoid having to take a sqrt // of the data's UVW coordinates. - vector<double> fillUVW (const ParSet& parset, + vector<double> fillUVW (const ParameterSet& parset, const string& prefix, const string& name, bool square); diff --git a/CEP/DP3/DPPP/src/AORFlagger.cc b/CEP/DP3/DPPP/src/AORFlagger.cc index 81eda1d4a83f92dc36c9dab33487ba162e241817..d74578eb729c90d670764e53429279c4e0c00eb7 100644 --- a/CEP/DP3/DPPP/src/AORFlagger.cc +++ b/CEP/DP3/DPPP/src/AORFlagger.cc @@ -25,7 +25,7 @@ #include <DPPP/AORFlagger.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/LofarLogger.h> #include <casa/OS/HostInfo.h> @@ -68,7 +68,8 @@ namespace LOFAR { namespace DPPP { AORFlagger::AORFlagger (DPInput* input, - const ParSet& parset, const string& prefix) + const ParameterSet& parset, + const string& prefix) : itsInput (input), itsName (prefix), itsBufIndex (0), diff --git a/CEP/DP3/DPPP/src/Averager.cc b/CEP/DP3/DPPP/src/Averager.cc index 24bf4720fdf494913ad9fd99267049891304ff28..028148c1a8d645c3f85f346de77bb241c14a6180 100644 --- a/CEP/DP3/DPPP/src/Averager.cc +++ b/CEP/DP3/DPPP/src/Averager.cc @@ -25,7 +25,7 @@ #include <DPPP/Averager.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/LofarLogger.h> #include <casa/Arrays/ArrayMath.h> #include <iostream> @@ -37,7 +37,8 @@ namespace LOFAR { namespace DPPP { Averager::Averager (DPInput* input, - const ParSet& parset, const string& prefix) + const ParameterSet& parset, + const string& prefix) : itsInput (input), itsName (prefix), itsNChanAvg (parset.getUint (prefix+"freqstep", 1)), diff --git a/CEP/DP3/DPPP/src/BaselineSelection.cc b/CEP/DP3/DPPP/src/BaselineSelection.cc index d5d3f45f5c15a820b04775f493d6f066c8cff951..b01f42050979337999def471bb6bf87d69c3ceaf 100644 --- a/CEP/DP3/DPPP/src/BaselineSelection.cc +++ b/CEP/DP3/DPPP/src/BaselineSelection.cc @@ -25,6 +25,8 @@ #include <DPPP/BaselineSelection.h> #include <DPPP/DPLogger.h> #include <MS/BaselineSelect.h> +#include <Common/ParameterSet.h> +#include <Common/ParameterValue.h> #include <Common/LofarLogger.h> #include <Common/StreamUtil.h> @@ -37,7 +39,7 @@ namespace LOFAR { BaselineSelection::BaselineSelection() {} - BaselineSelection::BaselineSelection (const ParSet& parset, + BaselineSelection::BaselineSelection (const ParameterSet& parset, const string& prefix, bool minmax, const string& defaultCorrType) diff --git a/CEP/DP3/DPPP/src/CMakeLists.txt b/CEP/DP3/DPPP/src/CMakeLists.txt index 9c3b4f87d6d703f136684d223fa25ebc4e234bd2..708486fdc2d2f54c9b9f8808bf3a83f68c938fc9 100644 --- a/CEP/DP3/DPPP/src/CMakeLists.txt +++ b/CEP/DP3/DPPP/src/CMakeLists.txt @@ -6,7 +6,7 @@ include(PythonInstall) lofar_add_library(dppp Package__Version.cc DPRun.cc DPStep.cc DPInput.cc DPBuffer.cc DPInfo.cc - ParSet.cc DPLogger.cc ProgressMeter.cc FlagCounter.cc + DPLogger.cc ProgressMeter.cc FlagCounter.cc UVWCalculator.cc BaselineSelection.cc MSReader.cc MultiMSReader.cc MSWriter.cc MSUpdater.cc Counter.cc Averager.cc MedFlagger.cc AORFlagger.cc PreFlagger.cc UVWFlagger.cc diff --git a/CEP/DP3/DPPP/src/Counter.cc b/CEP/DP3/DPPP/src/Counter.cc index 832f074d5028f8e1cb453b1109a525f2d24d7500..771580217e1a948f350e8a2138a89160c8f2dcfe 100644 --- a/CEP/DP3/DPPP/src/Counter.cc +++ b/CEP/DP3/DPPP/src/Counter.cc @@ -24,7 +24,7 @@ #include <lofar_config.h> #include <DPPP/Counter.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <iostream> using namespace casa; @@ -33,7 +33,8 @@ namespace LOFAR { namespace DPPP { Counter::Counter (DPInput* input, - const ParSet& parset, const string& prefix) + const ParameterSet& parset, + const string& prefix) : itsName (prefix), itsCount (0), itsFlagCounter (input->msName(), parset, prefix) diff --git a/CEP/DP3/DPPP/src/DPRun.cc b/CEP/DP3/DPPP/src/DPRun.cc index 3e3ec6b7925b5889d9d0d18dfb4d7d3ad8c86889..9bab26e89100cd29fece130ec5fcacc055583144 100644 --- a/CEP/DP3/DPPP/src/DPRun.cc +++ b/CEP/DP3/DPPP/src/DPRun.cc @@ -39,7 +39,7 @@ #include <DPPP/StationAdder.h> #include <DPPP/Filter.h> #include <DPPP/Counter.h> -#include <DPPP/ParSet.h> +#include <DPPP/ApplyCal.h> #include <DPPP/ProgressMeter.h> #include <DPPP/DPLogger.h> #include <Common/Timer.h> @@ -57,9 +57,9 @@ namespace LOFAR { casa::Timer timer; NSTimer nstimer; nstimer.start(); - ParSet parset ((ParameterSet(parsetName))); + ParameterSet parset (parsetName); DPLogger::useLogger = parset.getBool ("uselogger", false); - bool checkparset = parset.getBool ("checkparset", false); + int checkparset = parset.getInt ("checkparset", 0); bool showProgress = parset.getBool ("showprogress", true); bool showTimings = parset.getBool ("showtimings", true); string msName; @@ -73,17 +73,19 @@ namespace LOFAR { DPLOG_INFO (os.str(), true); step = step->getNextStep(); } - // Show unused parameters (might be misspelled). - vector<string> unused = parset.unusedKeys(); - if (! unused.empty()) { - DPLOG_WARN_STR - (endl - << "*** WARNING: the following parset keywords were not used ***" - << endl - << " maybe they are misspelled" - << endl - << " " << unused << endl); - ASSERTSTR (!checkparset, "Unused parset keywords found"); + if (checkparset >= 0) { + // Show unused parameters (might be misspelled). + vector<string> unused = parset.unusedKeys(); + if (! unused.empty()) { + DPLOG_WARN_STR + (endl + << "*** WARNING: the following parset keywords were not used ***" + << endl + << " maybe they are misspelled" + << endl + << " " << unused << endl); + ASSERTSTR (checkparset==0, "Unused parset keywords found"); + } } // Process until the end. uint ntodo = firstStep->getInfo().ntime(); @@ -157,7 +159,7 @@ namespace LOFAR { // The destructors are called automatically at this point. } - DPStep::ShPtr DPRun::makeSteps (const ParSet& parset, string& msName) + DPStep::ShPtr DPRun::makeSteps (const ParameterSet& parset, string& msName) { DPStep::ShPtr firstStep; DPStep::ShPtr lastStep; @@ -252,6 +254,8 @@ namespace LOFAR { step = DPStep::ShPtr(new StationAdder (reader, parset, prefix)); } else if (type == "filter") { step = DPStep::ShPtr(new Filter (reader, parset, prefix)); + /// } else if (type == "applycal" || type == "correct") { + /// step = DPStep::ShPtr(new ApplyCal (reader, parset, prefix)); } else { THROW (LOFAR::Exception, "DPPP step type " << type << " is unknown"); } diff --git a/CEP/DP3/DPPP/src/Demixer.cc b/CEP/DP3/DPPP/src/Demixer.cc index 34a33b0e0c22d9d79085a8fe58115ca898ac8487..a74d159cf27710d586fe5cb6d218c86bb2bec029 100644 --- a/CEP/DP3/DPPP/src/Demixer.cc +++ b/CEP/DP3/DPPP/src/Demixer.cc @@ -30,7 +30,6 @@ #include <DPPP/DPInfo.h> #include <DPPP/EstimateMixed.h> #include <DPPP/PhaseShift.h> -#include <DPPP/ParSet.h> #include <DPPP/Simulate.h> #include <DPPP/SourceDBUtil.h> #include <DPPP/SubtractMixed.h> @@ -42,6 +41,7 @@ #include <ParmDB/ParmCache.h> #include <ParmDB/Parm.h> +#include <Common/ParameterSet.h> #include <Common/LofarLogger.h> #include <Common/OpenMP.h> #include <Common/StreamUtil.h> @@ -70,7 +70,8 @@ namespace LOFAR { } //# end unnamed namespace Demixer::Demixer (DPInput* input, - const ParSet& parset, const string& prefix) + const ParameterSet& parset, + const string& prefix) : itsInput (input), itsName (prefix), itsSkyName (parset.getString(prefix+"skymodel", "sky")), @@ -360,8 +361,21 @@ namespace LOFAR { } os << " targetsource: " << itsTargetSource << std::endl; os << " subtractsources: " << itsSubtrSources << std::endl; + uint inx=0; + for (uint i=0; i<itsSubtrSources.size(); ++i ) { + os << " " + << itsPhaseShifts[inx++]->getPhaseCenter() << std::endl; + } os << " modelsources: " << itsModelSources << std::endl; + for (uint i=0; i<itsModelSources.size(); ++i ) { + os << " " + << itsPhaseShifts[inx++]->getPhaseCenter() << std::endl; + } os << " extrasources: " << itsExtraSources << std::endl; + for (uint i=0; i<itsExtraSources.size(); ++i ) { + os << " " + << itsPhaseShifts[inx++]->getPhaseCenter() << std::endl; + } // os << " elevationcutoffs: " << itsCutOffs << std::endl; // os << " jointsolve: " << itsJointSolve << std::endl; os << " propagatesolutions: " << std::boolalpha << itsPropagateSolutions diff --git a/CEP/DP3/DPPP/src/Filter.cc b/CEP/DP3/DPPP/src/Filter.cc index 9b4bb455897a5cd11f483f02ef27d8ac38481ae4..e6f77493247038839e59c1927047d760ef4a2da0 100644 --- a/CEP/DP3/DPPP/src/Filter.cc +++ b/CEP/DP3/DPPP/src/Filter.cc @@ -25,8 +25,8 @@ #include <DPPP/Filter.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> #include <DPPP/DPLogger.h> +#include <Common/ParameterSet.h> #include <tables/Tables/ExprNode.h> #include <tables/Tables/RecordGram.h> @@ -38,7 +38,8 @@ namespace LOFAR { namespace DPPP { Filter::Filter (DPInput* input, - const ParSet& parset, const string& prefix) + const ParameterSet& parset, + const string& prefix) : itsInput (input), itsName (prefix), itsStartChanStr (parset.getString(prefix+"startchan", "0")), diff --git a/CEP/DP3/DPPP/src/FlagCounter.cc b/CEP/DP3/DPPP/src/FlagCounter.cc index aa2ad7b48e888584689259441cf81484a745471b..edd1e3661870b965025b5e31290a1acc231fcaa7 100644 --- a/CEP/DP3/DPPP/src/FlagCounter.cc +++ b/CEP/DP3/DPPP/src/FlagCounter.cc @@ -24,7 +24,7 @@ #include <lofar_config.h> #include <DPPP/FlagCounter.h> #include <DPPP/DPInput.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/StreamUtil.h> #include <Common/LofarLogger.h> #include <tables/Tables/Table.h> @@ -50,7 +50,8 @@ namespace LOFAR { {} FlagCounter::FlagCounter (const string& msName, - const ParSet& parset, const string& prefix) + const ParameterSet& parset, + const string& prefix) { itsWarnPerc = parset.getDouble (prefix+"warnperc", 0); itsShowFF = parset.getBool (prefix+"showfullyflagged", false); diff --git a/CEP/DP3/DPPP/src/MSReader.cc b/CEP/DP3/DPPP/src/MSReader.cc index 883e389a0fdfd381772fcce227ad656762871bf4..61326aef40eb534546eec3e6f4c5e7a4f021bcf8 100644 --- a/CEP/DP3/DPPP/src/MSReader.cc +++ b/CEP/DP3/DPPP/src/MSReader.cc @@ -26,7 +26,7 @@ #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> #include <DPPP/DPLogger.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/LofarLogger.h> #include <tables/Tables/TableRecord.h> @@ -58,7 +58,8 @@ namespace LOFAR { {} MSReader::MSReader (const string& msName, - const ParSet& parset, const string& prefix, + const ParameterSet& parset, + const string& prefix, bool missingData) : itsReadVisData (False), itsMissingData (missingData), @@ -744,6 +745,7 @@ namespace LOFAR { return flags; } + /* Cube<Complex> MSReader::getData (const String& columnName, const RefRows& rowNrs) { @@ -756,6 +758,7 @@ namespace LOFAR { Cube<Complex> data = dataCol.getColumnCells (rowNrs); return (itsUseAllChan ? data : data(itsArrSlicer)); } + */ void MSReader::putFlags (const RefRows& rowNrs, const Cube<bool>& flags) diff --git a/CEP/DP3/DPPP/src/MSUpdater.cc b/CEP/DP3/DPPP/src/MSUpdater.cc index 2825aed88f70e5a15fce7879d7d80946e4277855..89baabe4db45b1c91683eb6db74fdeeec57dd2ad 100644 --- a/CEP/DP3/DPPP/src/MSUpdater.cc +++ b/CEP/DP3/DPPP/src/MSUpdater.cc @@ -26,7 +26,7 @@ #include <DPPP/MSReader.h> #include <DPPP/MSWriter.h> #include <DPPP/DPBuffer.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <iostream> using namespace casa; @@ -34,7 +34,7 @@ using namespace casa; namespace LOFAR { namespace DPPP { - MSUpdater::MSUpdater (MSReader* reader, const ParSet& parset, + MSUpdater::MSUpdater (MSReader* reader, const ParameterSet& parset, const string&) : itsReader (reader), itsNrCorr (reader->getInfo().ncorr()), @@ -43,7 +43,7 @@ namespace LOFAR { itsNrTimes (0) { NSTimer::StartStop sstime(itsTimer); - MSWriter::writeHistory (reader->table(), parset.parameterSet()); + MSWriter::writeHistory (reader->table(), parset); } MSUpdater::~MSUpdater() diff --git a/CEP/DP3/DPPP/src/MSWriter.cc b/CEP/DP3/DPPP/src/MSWriter.cc index 5a3f6b5cf9f382d80d02cfec564a4acbb1fd3284..a075a61cac358b13c7ce5b014738d16551be77c2 100644 --- a/CEP/DP3/DPPP/src/MSWriter.cc +++ b/CEP/DP3/DPPP/src/MSWriter.cc @@ -27,9 +27,9 @@ #include <DPPP/MSUpdater.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> #include <DPPP/DPLogger.h> #include <MS/VdsMaker.h> +#include <Common/ParameterSet.h> #include <tables/Tables/TableCopy.h> #include <tables/Tables/DataManInfo.h> #include <tables/Tables/SetupNewTab.h> @@ -50,7 +50,7 @@ namespace LOFAR { MSWriter::MSWriter (MSReader* reader, const std::string& outName, const DPInfo& info, - const ParSet& parset, const string& prefix) + const ParameterSet& parset, const string& prefix) : itsReader (reader), itsInterval (info.timeInterval()), itsNrCorr (info.ncorr()), @@ -80,7 +80,7 @@ namespace LOFAR { } createMS (outName, info, tileSize, tileNChan); // Write the parset info into the history. - writeHistory (itsMS, parset.parameterSet()); + writeHistory (itsMS, parset); itsMS.flush (true, true); DPLOG_INFO ("Finished preparing output MS", false); } diff --git a/CEP/DP3/DPPP/src/MedFlagger.cc b/CEP/DP3/DPPP/src/MedFlagger.cc index a42a67ab49b1fb9bee81021b71b9d7ef3c0d429b..32ec6e6b8ab8590f9e4e9114ecba6b3ab51deaf5 100644 --- a/CEP/DP3/DPPP/src/MedFlagger.cc +++ b/CEP/DP3/DPPP/src/MedFlagger.cc @@ -25,7 +25,7 @@ #include <DPPP/MedFlagger.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/StreamUtil.h> #include <Common/LofarLogger.h> #include <casa/Arrays/ArrayMath.h> @@ -42,7 +42,8 @@ namespace LOFAR { namespace DPPP { MedFlagger::MedFlagger (DPInput* input, - const ParSet& parset, const string& prefix) + const ParameterSet& parset, + const string& prefix) : itsInput (input), itsName (prefix), itsThresholdStr (parset.getString (prefix+"threshold", "1")), diff --git a/CEP/DP3/DPPP/src/MultiMSReader.cc b/CEP/DP3/DPPP/src/MultiMSReader.cc index 73d070ce5caa9226dd5abacf02d713580cc7e37c..d127fd3e2eaf9a84ebf2ca7a8e77a8e4144f9b22 100644 --- a/CEP/DP3/DPPP/src/MultiMSReader.cc +++ b/CEP/DP3/DPPP/src/MultiMSReader.cc @@ -25,7 +25,7 @@ #include <DPPP/MultiMSReader.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/StreamUtil.h> #include <Common/LofarLogger.h> #include <tables/Tables/TableRecord.h> @@ -48,7 +48,8 @@ namespace LOFAR { namespace DPPP { MultiMSReader::MultiMSReader (const vector<string>& msNames, - const ParSet& parset, const string& prefix) + const ParameterSet& parset, + const string& prefix) : itsFirst (-1), itsNMissing (0), itsMSNames (msNames) @@ -403,6 +404,7 @@ namespace LOFAR { return flags; } + /* Cube<Complex> MultiMSReader::getData (const String& columnName, const RefRows& rowNrs) { @@ -422,6 +424,7 @@ namespace LOFAR { } return data; } + */ void MultiMSReader::combineFullResFlags (const vector<Cube<bool> >& vec, Cube<bool>& flags) const diff --git a/CEP/DP3/DPPP/src/ParSet.cc b/CEP/DP3/DPPP/src/ParSet.cc deleted file mode 100644 index 61e1430f2f2d1a35813f4f26a080f7c4033174f3..0000000000000000000000000000000000000000 --- a/CEP/DP3/DPPP/src/ParSet.cc +++ /dev/null @@ -1,217 +0,0 @@ -//# ParSet.cc: Wrapper around ParaMeterSet to keep track of parameters asked for -//# Copyright (C) 2010 -//# ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite 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 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite 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 the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ -//# -//# @author Ger van Diepen - -#include <DPPP/ParSet.h> -#include <Common/ParameterRecord.h> -#include <set> - -namespace LOFAR { - namespace DPPP { - - ParSet::ParSet (const ParameterSet& parset ) - : itsParSet (parset) - {} - - bool ParSet::getBool (const string& aKey) const - { - itsAskedParms.insert (aKey); - return itsParSet.getBool (aKey); - } - - bool ParSet::getBool (const string& aKey, bool aValue) const - { - itsAskedParms.insert (aKey); - return itsParSet.getBool (aKey, aValue); - } - - int ParSet::getInt (const string& aKey) const - { - itsAskedParms.insert (aKey); - return itsParSet.getInt (aKey); - } - - int ParSet::getInt (const string& aKey, int aValue) const - { - itsAskedParms.insert (aKey); - return itsParSet.getInt (aKey, aValue); - } - - uint ParSet::getUint (const string& aKey) const - { - itsAskedParms.insert (aKey); - return itsParSet.getUint (aKey); - } - - uint ParSet::getUint (const string& aKey, uint aValue) const - { - itsAskedParms.insert (aKey); - return itsParSet.getUint (aKey, aValue); - } - - float ParSet::getFloat (const string& aKey) const - { - itsAskedParms.insert (aKey); - return itsParSet.getFloat (aKey); - } - - float ParSet::getFloat (const string& aKey, float aValue) const - { - itsAskedParms.insert (aKey); - return itsParSet.getFloat (aKey, aValue); - } - - double ParSet::getDouble(const string& aKey) const - { - itsAskedParms.insert (aKey); - return itsParSet.getDouble (aKey); - } - - double ParSet::getDouble(const string& aKey, double aValue) const - { - itsAskedParms.insert (aKey); - return itsParSet.getDouble (aKey, aValue); - } - - string ParSet::getString(const string& aKey) const - { - itsAskedParms.insert (aKey); - return itsParSet.getString (aKey); - } - - string ParSet::getString(const string& aKey, const string& aValue) const - { - itsAskedParms.insert (aKey); - return itsParSet.getString (aKey, aValue); - } - - vector<bool> ParSet::getBoolVector (const string& aKey, - bool expandable) const - { - itsAskedParms.insert (aKey); - return itsParSet.getBoolVector (aKey, expandable); - } - - vector<bool> ParSet::getBoolVector (const string& aKey, - const vector<bool>& aValue, - bool expandable) const - { - itsAskedParms.insert (aKey); - return itsParSet.getBoolVector (aKey, aValue, expandable); - } - - vector<int> ParSet::getIntVector (const string& aKey, - bool expandable) const - { - itsAskedParms.insert (aKey); - return itsParSet.getIntVector (aKey, expandable); - } - - vector<int> ParSet::getIntVector (const string& aKey, - const vector<int>& aValue, - bool expandable) const - { - itsAskedParms.insert (aKey); - return itsParSet.getIntVector (aKey, aValue, expandable); - } - - vector<uint> ParSet::getUintVector (const string& aKey, - bool expandable) const - { - itsAskedParms.insert (aKey); - return itsParSet.getUintVector (aKey, expandable); - } - - vector<uint> ParSet::getUintVector (const string& aKey, - const vector<uint>& aValue, - bool expandable) const - { - itsAskedParms.insert (aKey); - return itsParSet.getUintVector (aKey, aValue, expandable); - } - - vector<float> ParSet::getFloatVector (const string& aKey, - bool expandable) const - { - itsAskedParms.insert (aKey); - return itsParSet.getFloatVector (aKey, expandable); - } - - vector<float> ParSet::getFloatVector (const string& aKey, - const vector<float>& aValue, - bool expandable) const - { - itsAskedParms.insert (aKey); - return itsParSet.getFloatVector (aKey, aValue, expandable); - } - - vector<double> ParSet::getDoubleVector(const string& aKey, - bool expandable) const - { - itsAskedParms.insert (aKey); - return itsParSet.getDoubleVector (aKey, expandable); - } - - vector<double> ParSet::getDoubleVector(const string& aKey, - const vector<double>& aValue, - bool expandable) const - { - itsAskedParms.insert (aKey); - return itsParSet.getDoubleVector (aKey, aValue, expandable); - } - - vector<string> ParSet::getStringVector(const string& aKey, - bool expandable) const - { - itsAskedParms.insert (aKey); - return itsParSet.getStringVector (aKey, expandable); - } - - vector<string> ParSet::getStringVector(const string& aKey, - const vector<string>& aValue, - bool expandable) const - { - itsAskedParms.insert (aKey); - return itsParSet.getStringVector (aKey, aValue, expandable); - } - - ParameterRecord ParSet::getRecord(const string& aKey) const - { - itsAskedParms.insert (aKey); - return itsParSet.getRecord (aKey); - } - - vector<string> ParSet::unusedKeys() const - { - vector<string> vec; - for (ParameterSet::const_iterator iter = itsParSet.begin(); - iter != itsParSet.end(); ++iter) { - if (itsAskedParms.find (iter->first) == itsAskedParms.end()) { - vec.push_back (iter->first); - } - } - return vec; - } - - - } //# end namespace -} diff --git a/CEP/DP3/DPPP/src/PhaseShift.cc b/CEP/DP3/DPPP/src/PhaseShift.cc index c24752220567c8641b180230feb544fb755f1942..4501069dcd8190ae3b017486a06be79e94b218a9 100644 --- a/CEP/DP3/DPPP/src/PhaseShift.cc +++ b/CEP/DP3/DPPP/src/PhaseShift.cc @@ -25,7 +25,7 @@ #include <DPPP/PhaseShift.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/LofarLogger.h> #include <Common/StreamUtil.h> #include <casa/Arrays/ArrayMath.h> @@ -43,14 +43,16 @@ namespace LOFAR { namespace DPPP { PhaseShift::PhaseShift (DPInput* input, - const ParSet& parset, const string& prefix) + const ParameterSet& parset, + const string& prefix) : itsInput (input), itsName (prefix), itsCenter (parset.getStringVector(prefix+"phasecenter")) {} PhaseShift::PhaseShift (DPInput* input, - const ParSet& parset, const string& prefix, + const ParameterSet& parset, + const string& prefix, const vector<string>& defVal) : itsInput (input), itsName (prefix), diff --git a/CEP/DP3/DPPP/src/PreFlagger.cc b/CEP/DP3/DPPP/src/PreFlagger.cc index 2e24393113dba9a21f85ac3c83ec3e153969b5f5..f9c6715efc9adb7bfebc7c24491ceaa4df5de5b2 100644 --- a/CEP/DP3/DPPP/src/PreFlagger.cc +++ b/CEP/DP3/DPPP/src/PreFlagger.cc @@ -25,8 +25,8 @@ #include <DPPP/PreFlagger.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> #include <DPPP/DPLogger.h> +#include <Common/ParameterSet.h> #include <Common/StreamUtil.h> #include <Common/LofarLogger.h> @@ -51,7 +51,8 @@ namespace LOFAR { namespace DPPP { PreFlagger::PreFlagger (DPInput* input, - const ParSet& parset, const string& prefix) + const ParameterSet& parset, + const string& prefix) : itsName (prefix), itsInput (input), itsMode (SetFlag), @@ -225,7 +226,8 @@ namespace LOFAR { PreFlagger::PSet::PSet (DPInput* input, - const ParSet& parset, const string& prefix) + const ParameterSet& parset, + const string& prefix) : itsInput (input), itsName (prefix), itsFlagOnUV (false), diff --git a/CEP/DP3/DPPP/src/StationAdder.cc b/CEP/DP3/DPPP/src/StationAdder.cc index 76356ad5669a275280464be413c126310cc1da23..1f6768bd5ac613488315620e3d7865763887c473 100644 --- a/CEP/DP3/DPPP/src/StationAdder.cc +++ b/CEP/DP3/DPPP/src/StationAdder.cc @@ -25,8 +25,8 @@ #include <DPPP/StationAdder.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> #include <DPPP/DPLogger.h> +#include <Common/ParameterSet.h> #include <Common/ParameterRecord.h> #include <measures/Measures/MPosition.h> @@ -48,7 +48,8 @@ namespace LOFAR { namespace DPPP { StationAdder::StationAdder (DPInput* input, - const ParSet& parset, const string& prefix) + const ParameterSet& parset, + const string& prefix) : itsInput (input), itsName (prefix), itsStatRec (parset.getRecord(prefix+"stations")), diff --git a/CEP/DP3/DPPP/src/UVWFlagger.cc b/CEP/DP3/DPPP/src/UVWFlagger.cc index dd70fc6ad2dd0d2db5c416654312e456fd21c15d..c5a0a5fea741c030d12320dc53b16dcaf26a56dd 100644 --- a/CEP/DP3/DPPP/src/UVWFlagger.cc +++ b/CEP/DP3/DPPP/src/UVWFlagger.cc @@ -25,7 +25,7 @@ #include <DPPP/UVWFlagger.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/StreamUtil.h> #include <Common/LofarLogger.h> #include <casa/Arrays/ArrayMath.h> @@ -42,7 +42,8 @@ namespace LOFAR { namespace DPPP { UVWFlagger::UVWFlagger (DPInput* input, - const ParSet& parset, const string& prefix) + const ParameterSet& parset, + const string& prefix) : itsInput (input), itsName (prefix), itsNTimes (0), @@ -242,7 +243,7 @@ namespace LOFAR { } } - vector<double> UVWFlagger::fillUVW (const ParSet& parset, + vector<double> UVWFlagger::fillUVW (const ParameterSet& parset, const string& prefix, const string& name, bool square) diff --git a/CEP/DP3/DPPP/test/CMakeLists.txt b/CEP/DP3/DPPP/test/CMakeLists.txt index b6bf34bbbfd74dbeeacefe887becddd05e649862..64f5d62d6a46acb026dc1fd8937272a8adb69fa9 100644 --- a/CEP/DP3/DPPP/test/CMakeLists.txt +++ b/CEP/DP3/DPPP/test/CMakeLists.txt @@ -16,7 +16,6 @@ lofar_add_test(tFilter tFilter.cc) #lofar_add_test(tDemixer tDemixer.cc) lofar_add_test(tNDPPP tNDPPP.cc) lofar_add_test(tparse tparse.cc) -lofar_add_test(tParSet tParSet.cc) lofar_add_test(tBaselineSelection tBaselineSelection.cc) # lofar_add_test(tExpr tExpr.cc) # lofar_add_test(tmeqarray tmeqarray.cc) diff --git a/CEP/DP3/DPPP/test/tAORFlagger.cc b/CEP/DP3/DPPP/test/tAORFlagger.cc index ae2c060ad83c42eb052dc9751169cc6f409a9620..386a7f482f0c44462123565a24fadc936afd18cf 100644 --- a/CEP/DP3/DPPP/test/tAORFlagger.cc +++ b/CEP/DP3/DPPP/test/tAORFlagger.cc @@ -26,7 +26,7 @@ #include <DPPP/DPInput.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/StringUtil.h> #include <casa/Arrays/ArrayMath.h> #include <casa/Arrays/ArrayLogical.h> diff --git a/CEP/DP3/DPPP/test/tAverager.cc b/CEP/DP3/DPPP/test/tAverager.cc index d6c4b9b4af5e25a7af10dfd00a0a2e161a11fc9c..80f7b2cee5d2fdd8d1a7d0eb9162ec4e6cb9d5cd 100644 --- a/CEP/DP3/DPPP/test/tAverager.cc +++ b/CEP/DP3/DPPP/test/tAverager.cc @@ -25,7 +25,7 @@ #include <DPPP/Averager.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/StringUtil.h> #include <casa/Arrays/ArrayMath.h> #include <casa/Arrays/ArrayLogical.h> diff --git a/CEP/DP3/DPPP/test/tBaselineSelection.cc b/CEP/DP3/DPPP/test/tBaselineSelection.cc index fc125a99b6046db3d4073fcc517cb04341cf012f..af1ba2f32b9668fed4852fc9f95fe8f10d07f69f 100644 --- a/CEP/DP3/DPPP/test/tBaselineSelection.cc +++ b/CEP/DP3/DPPP/test/tBaselineSelection.cc @@ -24,7 +24,7 @@ #include <lofar_config.h> #include <DPPP/BaselineSelection.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/LofarLogger.h> #include <Common/StreamUtil.h> #include <casa/Arrays/ArrayLogical.h> diff --git a/CEP/DP3/DPPP/test/tDemixer.cc b/CEP/DP3/DPPP/test/tDemixer.cc index fec79fc9913705b1cefd410b2206718fc87f5d60..97540f1524cb3aa9a15cbd2b45e2e34aec5e487d 100644 --- a/CEP/DP3/DPPP/test/tDemixer.cc +++ b/CEP/DP3/DPPP/test/tDemixer.cc @@ -25,7 +25,7 @@ #include <DPPP/Demixer.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/StringUtil.h> #include <casa/Arrays/ArrayMath.h> #include <casa/Arrays/ArrayLogical.h> diff --git a/CEP/DP3/DPPP/test/tFilter.cc b/CEP/DP3/DPPP/test/tFilter.cc index 758eb6633fb84583d32ef0231ce536503587ca88..9559d6b355fc9ba9c73098cc37dc0bb1c83d8116 100644 --- a/CEP/DP3/DPPP/test/tFilter.cc +++ b/CEP/DP3/DPPP/test/tFilter.cc @@ -25,7 +25,7 @@ #include <DPPP/Filter.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/StringUtil.h> #include <casa/Arrays/ArrayMath.h> #include <casa/Arrays/ArrayLogical.h> diff --git a/CEP/DP3/DPPP/test/tMedFlagger.cc b/CEP/DP3/DPPP/test/tMedFlagger.cc index 767c478e564767cbe8b213c3efd694e6e1dae4e7..fc3f883ad7fb458f4a249669d9ea5442d87c105d 100644 --- a/CEP/DP3/DPPP/test/tMedFlagger.cc +++ b/CEP/DP3/DPPP/test/tMedFlagger.cc @@ -26,7 +26,7 @@ #include <DPPP/DPInput.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/StringUtil.h> #include <casa/Arrays/ArrayMath.h> #include <casa/Arrays/ArrayLogical.h> diff --git a/CEP/DP3/DPPP/test/tPSet.cc b/CEP/DP3/DPPP/test/tPSet.cc index f1b6a8204b4e8ccd85c3fcff12dcd5098caae539..6ac6264d9db38b9c006d944e5ed7c292ddcbeff4 100644 --- a/CEP/DP3/DPPP/test/tPSet.cc +++ b/CEP/DP3/DPPP/test/tPSet.cc @@ -24,7 +24,7 @@ #include <lofar_config.h> #include <DPPP/PreFlagger.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/LofarLogger.h> #include <casa/Arrays/ArrayIO.h> #include <casa/Quanta/MVTime.h> diff --git a/CEP/DP3/DPPP/test/tParSet.cc b/CEP/DP3/DPPP/test/tParSet.cc deleted file mode 100644 index 37ea477cfc72fec6013461f64293596cc86af38d..0000000000000000000000000000000000000000 --- a/CEP/DP3/DPPP/test/tParSet.cc +++ /dev/null @@ -1,57 +0,0 @@ -//# tParSet.cc: Test for class ParSet -//# Copyright (C) 2010 -//# ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite 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 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite 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 the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ -//# -//# @author Ger van Diepen - -#include <lofar_config.h> -#include <DPPP/ParSet.h> -#include <Common/LofarLogger.h> - -using namespace LOFAR; -using namespace LOFAR::DPPP; - -void doTest() -{ - ParameterSet parset; - parset.add ("key1", "abc"); - parset.add ("key2", "def"); - parset.add ("key3", "g"); - ParSet pset(parset); - ASSERT (pset.unusedKeys().size() == 3); - ASSERT (pset.getString("key1") == "abc"); - ASSERT (pset.getString("key1", "") == "abc"); - ASSERT (pset.getString("key1a", "12") == "12"); - ASSERT (pset.getString("key3") == "g"); - vector<string> unused = pset.unusedKeys(); - ASSERT (unused.size() == 1); - ASSERT (unused[0] == "key2"); -} - -int main() -{ - try { - doTest(); - } catch (std::exception& x) { - cout << "Unexpected exception: " << x.what() << endl; - return 1; - } - return 0; -} diff --git a/CEP/DP3/DPPP/test/tPhaseShift.cc b/CEP/DP3/DPPP/test/tPhaseShift.cc index 8ce174dc4d7b38283a7437b93a148028a5dcb435..24a6d6440a5ebd70a75ab1c852414af8fc06a274 100644 --- a/CEP/DP3/DPPP/test/tPhaseShift.cc +++ b/CEP/DP3/DPPP/test/tPhaseShift.cc @@ -25,7 +25,7 @@ #include <DPPP/PhaseShift.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/StringUtil.h> #include <casa/Arrays/ArrayMath.h> #include <casa/Arrays/ArrayLogical.h> diff --git a/CEP/DP3/DPPP/test/tPreFlagger.cc b/CEP/DP3/DPPP/test/tPreFlagger.cc index af24d6dd9c0fc2e44351d925acf2581472c139aa..e3ebcddf3e91dc6b73d61aada1ca573a5cfea0c5 100644 --- a/CEP/DP3/DPPP/test/tPreFlagger.cc +++ b/CEP/DP3/DPPP/test/tPreFlagger.cc @@ -27,7 +27,7 @@ #include <DPPP/DPInput.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/StringUtil.h> #include <casa/Arrays/ArrayMath.h> #include <casa/Arrays/ArrayLogical.h> diff --git a/CEP/DP3/DPPP/test/tStationAdder.cc b/CEP/DP3/DPPP/test/tStationAdder.cc index a666a8d6fd0977a7846e94ec45a8ff9ab7d5f060..5b21004c8541b6ef0d3fb5b999cb2971d8481bc2 100644 --- a/CEP/DP3/DPPP/test/tStationAdder.cc +++ b/CEP/DP3/DPPP/test/tStationAdder.cc @@ -26,7 +26,7 @@ #include <DPPP/DPInput.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/StringUtil.h> #include <Common/StreamUtil.h> #include <casa/Arrays/ArrayMath.h> diff --git a/CEP/DP3/DPPP/test/tUVWFlagger.cc b/CEP/DP3/DPPP/test/tUVWFlagger.cc index a91b59753368a57971173158cbb6cd9b4427cce2..76dd46ba7ef073e68bf28efa5a227e76b659b58a 100644 --- a/CEP/DP3/DPPP/test/tUVWFlagger.cc +++ b/CEP/DP3/DPPP/test/tUVWFlagger.cc @@ -26,7 +26,7 @@ #include <DPPP/DPInput.h> #include <DPPP/DPBuffer.h> #include <DPPP/DPInfo.h> -#include <DPPP/ParSet.h> +#include <Common/ParameterSet.h> #include <Common/StringUtil.h> #include <casa/Arrays/ArrayMath.h> #include <casa/Arrays/ArrayLogical.h> diff --git a/CEP/Pipeline/framework/lofarpipe/support/utilities.py b/CEP/Pipeline/framework/lofarpipe/support/utilities.py index 32a827d0baa3bb2a9a6f0eed0419a7755ba3fd93..931cb014932f5d69c0a0fdb7958adeb2ef68cb79 100644 --- a/CEP/Pipeline/framework/lofarpipe/support/utilities.py +++ b/CEP/Pipeline/framework/lofarpipe/support/utilities.py @@ -9,7 +9,6 @@ from __future__ import with_statement -from subprocess import Popen, CalledProcessError, PIPE from itertools import islice, repeat, chain, izip from contextlib import closing, contextmanager from time import sleep @@ -19,7 +18,14 @@ import warnings import os import errno import shutil -import subprocess +import sys + +try: + import subprocess27 as subprocess + print >> sys.stderr, __file__, ": Using Python 2.7 subprocess module!" +except ImportError: + import subprocess + print >> sys.stderr, __file__, ": Using default subprocess module!" from lofarpipe.support.pipelinelogging import log_process_output @@ -86,7 +92,7 @@ def disk_usage(*paths): Return the disk usage in bytes by the file(s) in ``paths``. """ cmd = ['du', '-s', '-b'] - proc = Popen(cmd + list(paths), stdout = PIPE) + proc = subprocess.Popen(cmd + list(paths), stdout = subprocess.PIPE) sout = proc.communicate()[0] if sout: return sum([int(s.split('\t')[0]) for s in sout.strip().split('\n')]) @@ -224,8 +230,8 @@ def spawn_process(cmd, logger, cwd = None, env = None, max_tries = 2, max_timeou logger.debug( "Spawning subprocess: cmd=%s, cwd=%s, env=%s" % (cmd, cwd, env)) try: - process = Popen( - cmd, cwd = cwd, env = env, stdin = PIPE, stdout = PIPE, stderr = PIPE + process = subprocess.Popen( + cmd, cwd = cwd, env = env, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE ) except OSError, e: logger.warn( @@ -267,10 +273,10 @@ def catch_segfaults(cmd, cwd, env, logger, max = 1, cleanup = lambda: None): tries += 1 continue else: - raise CalledProcessError( + raise subprocess.CalledProcessError( process.returncode, cmd[0] ) if tries > max: logger.error("Too many segfaults from %s; aborted" % (cmd[0])) - raise CalledProcessError(process.returncode, cmd[0]) + raise subprocess.CalledProcessError(process.returncode, cmd[0]) return process diff --git a/CEP/Pipeline/recipes/sip/master/vdsmaker.py b/CEP/Pipeline/recipes/sip/master/vdsmaker.py index 077cd0d1436b24d423b36225cc64ae4d6c504bf7..95af2e33541150cf34edfca5565f7997fab76fd5 100644 --- a/CEP/Pipeline/recipes/sip/master/vdsmaker.py +++ b/CEP/Pipeline/recipes/sip/master/vdsmaker.py @@ -107,6 +107,9 @@ class vdsmaker(BaseRecipe, RemoteCommandRecipeMixIn): vds for vds, job in zip(vdsnames, jobs) if job.results['returncode'] == 0 ] + if not vdsnames: + self.logger.error("All makevds processes failed. Bailing out!") + return 1 # ********************************************************************* # 3. Combine VDS files to produce GDS diff --git a/LCS/ACC/ALC/src/ApplControlClient.cc b/LCS/ACC/ALC/src/ApplControlClient.cc index 3c1304ca7c8ac5dbdd7e27436122abdea071b66f..7e5ba75a1f6aed8e882d1d9050d0240159cb308c 100644 --- a/LCS/ACC/ALC/src/ApplControlClient.cc +++ b/LCS/ACC/ALC/src/ApplControlClient.cc @@ -80,8 +80,8 @@ ApplControlClient::ApplControlClient(const string& aUniqUserName, LOG_DEBUG(formatString("Private ACserver is at %s:%d, trying to connect", host.c_str(), port)); - LOG_DEBUG("Waiting 3 second before starting up the ApplController"); - sleep (3); + LOG_DEBUG("Waiting 5 second before starting up the ApplController"); + sleep (5); itsCommChan = new ApplControlComm(host, toString(port), syncClient); ASSERTSTR(itsCommChan, "Unable to allocate a communication channel"); diff --git a/MAC/APL/APLCommon/src/ChildControl.cc b/MAC/APL/APLCommon/src/ChildControl.cc index 2f24adf0f0ca3940f057557e3f363db790848c2d..9a0ef06279cf9b271df429b5dde57598d7c86c2c 100644 --- a/MAC/APL/APLCommon/src/ChildControl.cc +++ b/MAC/APL/APLCommon/src/ChildControl.cc @@ -65,7 +65,7 @@ ChildControl::ChildControl() : itsTimerPort (*this, "childControlTimer"), itsStartDaemonMap (), itsStartupRetryInterval (10), - itsMaxStartupRetries (5), + itsMaxStartupRetries (2), itsCntlrList (0), itsActionList (), itsActionTimer (0), @@ -1053,9 +1053,8 @@ void ChildControl::_doGarbageCollection() LOG_DEBUG_STR ("Controller " << iter->cntlrName << " is still unreachable, informing main task"); _setEstablishedState(iter->cntlrName, CTState::QUITED, time(0), CT_RESULT_LOST_CONNECTION); iter->port = (GCFPortInterface*) -1; - restartTimer = true; } - + restartTimer = true; iter++; } else if (iter->port == (GCFPortInterface*)-1) { LOG_DEBUG_STR ("Removing controller " << iter->cntlrName << " from the controller list"); diff --git a/MAC/APL/APLCommon/src/swlevel b/MAC/APL/APLCommon/src/swlevel index 8168875889a4b4a9ba8d4bc8313d607ccedd4b78..c0b6cf8fab8a4db80941b8b8558f66360f3d480b 100644 --- a/MAC/APL/APLCommon/src/swlevel +++ b/MAC/APL/APLCommon/src/swlevel @@ -124,6 +124,7 @@ start_prog() # Check if program is already running /sbin/pidof ${prog} 1>/dev/null 2>&1 if [ $? -ne 0 ]; then + curdate=`date +%Y%m%dT%H%M%S` # PVSS needs special treatment if [ "$prog" = "PVSS00pmon" ]; then echo Starting $prog @@ -136,7 +137,7 @@ start_prog() if [ "$user" = "lofarsys" ]; then echo Starting $prog rm -f $LOGDIR/$prog.log*.? 1>/dev/null 2>&1 - $BINDIR/$prog 1>>$LOGDIR//$prog.stdout 2>&1 & + $BINDIR/$prog 1>>$LOGDIR//$prog.stdout.${curdate} 2>&1 & else echo "Local use, not starting $prog" fi @@ -146,14 +147,14 @@ start_prog() sudo rm -f $LOGDIR/$prog.log.? 1>/dev/null 2>&1 if [ "$prog" = "RSPDriver" ]; then selectImage - sudo -b $BINDIR/$prog 1>>$LOGDIR/$prog.stdout 2>&1 + sudo -b $BINDIR/$prog 1>>$LOGDIR/$prog.stdout.${curdate} 2>&1 else - sudo -b $BINDIR/$prog 1>>$LOGDIR/$prog.stdout 2>&1 + sudo -b $BINDIR/$prog 1>>$LOGDIR/$prog.stdout.${curdate} 2>&1 fi else echo Starting $prog rm -f $LOGDIR/$prog.log*.? 1>/dev/null 2>&1 - $BINDIR/$prog 1>>$LOGDIR/$prog.stdout 2>&1 & + $BINDIR/$prog 1>>$LOGDIR/$prog.stdout.${curdate} 2>&1 & fi fi usleep 250000 diff --git a/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.cc b/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.cc index 6eaaed5618060f2f38d7b8d84b3e4794321de319..d729e40b1b1cae3a8594ce6ff05e025596df8753 100644 --- a/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.cc +++ b/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.cc @@ -775,8 +775,8 @@ void OnlineControl::_doBoot() remoteCopy(paramFileName,accHost,LOFAR_SHARE_LOCATION); // Finally start ApplController on the right host - LOG_INFO_STR("Starting controller for " << applName << " in 3 seconds "); - sleep(3); // sometimes we are too quick, wait a second. + LOG_INFO_STR("Starting controller for " << applName << " in 5 seconds "); + sleep(5); // sometimes we are too quick, wait a second. int32 expectedRuntime = time_duration(itsStopTime - itsStartTime).total_seconds(); uint32 obsID = globalParameterSet()->getUint32("Observation.ObsID"); CEPApplMgrPtr accClient (new CEPApplMgr(*this, formatString("%s%d", applName.c_str(), obsID), diff --git a/MAC/APL/CEPCU/src/PythonControl/PythonControl.cc b/MAC/APL/CEPCU/src/PythonControl/PythonControl.cc index 60cdd0b0f9490d54a624a18df6ca438c0e1e1e7e..cbe2e55687c0717847ec6ff8274a995aac8077ff 100644 --- a/MAC/APL/CEPCU/src/PythonControl/PythonControl.cc +++ b/MAC/APL/CEPCU/src/PythonControl/PythonControl.cc @@ -312,28 +312,29 @@ GCFEvent::TResult PythonControl::initial_state(GCFEvent& event, GCFPortInterface string pythonHost (thePS->getString(myPrefix+"pythonHost", "@pythonHost@")); itsChildCanCommunicate = thePS->getBool (myPrefix+"canCommunicate", true); // START PYTHON - bool startOK = _startPython(pythonProg, getObservationNr(getName()), realHostname(pythonHost), itsListener->makeServiceName()); - if (!startOK) { - LOG_ERROR("Failed to start the Python environment."); - CONTROLConnectedEvent answer; - answer.cntlrName = msg.cntlrName; - answer.result = CONTROL_LOST_CONN_ERR; - port.send(answer); - TRAN(PythonControl::finishing_state); - } - else { - if (itsChildCanCommunicate) { - LOG_DEBUG ("Started Python environment, going to waitForConnection state"); - TRAN(PythonControl::waitForConnection_state); - } - else { - LOG_WARN ("Started Python environment, CHILD CANNOT COMMUNICATE, FAKING RESPONSES!!!"); + // QUICK FIX #3633: if-else nesting was different + if (itsChildCanCommunicate) { + bool startOK = _startPython(pythonProg, getObservationNr(getName()), realHostname(pythonHost), + itsListener->makeServiceName()); + if (!startOK) { + LOG_ERROR("Failed to start the Python environment."); CONTROLConnectedEvent answer; - answer.cntlrName = itsMyName; - answer.result = CT_RESULT_NO_ERROR; - itsParentPort->send(answer); - TRAN(PythonControl::operational_state); + answer.cntlrName = msg.cntlrName; + answer.result = CONTROL_LOST_CONN_ERR; + port.send(answer); + TRAN(PythonControl::finishing_state); + break; } + LOG_DEBUG ("Started Python environment, going to waitForConnection state"); + TRAN(PythonControl::waitForConnection_state); + } + else { + LOG_WARN ("Python environment CANNOT COMMUNICATE, FAKING RESPONSES!!!"); + CONTROLConnectedEvent answer; + answer.cntlrName = itsMyName; + answer.result = CT_RESULT_NO_ERROR; + itsParentPort->send(answer); + TRAN(PythonControl::operational_state); } } break; @@ -570,7 +571,25 @@ GCFEvent::TResult PythonControl::operational_state(GCFEvent& event, GCFPortInter itsPythonPort->send(msg); } else { - LOG_WARN("Sending FAKE Resume response"); + // QUICK FIX #3633 + LOG_INFO("Trying to start the Python environment"); + ParameterSet* thePS = globalParameterSet(); // shortcut to global PS. + string myPrefix (thePS->locateModule("PythonControl")+"PythonControl."); + string pythonProg (thePS->getString(myPrefix+"pythonProgram", "@pythonProgram@")); + string pythonHost (thePS->getString(myPrefix+"pythonHost", "@pythonHost@")); + bool startOK = _startPython(pythonProg, getObservationNr(getName()), realHostname(pythonHost), + itsListener->makeServiceName()); + if (!startOK) { + LOG_ERROR("Failed to start the Python environment, ABORTING."); + CONTROLConnectedEvent answer; + answer.cntlrName = msg.cntlrName; + answer.result = CONTROL_LOST_CONN_ERR; + port.send(answer); + TRAN(PythonControl::finishing_state); + break; + } + // QUICK FIX #3633 END + LOG_WARN("Start of Python environment looks OK, sending FAKE Resume response"); sendControlResult(*itsParentPort, event.signal, itsMyName, CT_RESULT_NO_ERROR); } break; diff --git a/MAC/APL/CEPCU/src/PythonControl/PythonControlMain.cc b/MAC/APL/CEPCU/src/PythonControl/PythonControlMain.cc index 3ee05cbb8fdf0fc1c96ddf69190c729761d091c5..a9ff9f09e88a9be79c372158d32099135c2e48e7 100644 --- a/MAC/APL/CEPCU/src/PythonControl/PythonControlMain.cc +++ b/MAC/APL/CEPCU/src/PythonControl/PythonControlMain.cc @@ -43,7 +43,7 @@ int main(int argc, char* argv[]) } try { - GCFScheduler::instance()->init(argc, argv, "PythonControl"); + GCFScheduler::instance()->init(argc, argv, argv[1]); ParentControl* pc = ParentControl::instance(); pc->start(); // make initial transition diff --git a/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc b/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc index 9cede9a2715854810a00ad25a68bc07a6624eaec..2437fee36e343aec57b82aeb7eb3b3d0ac219931 100644 --- a/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc +++ b/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc @@ -758,7 +758,7 @@ void ObservationControl::doHeartBeatTask() uint32 nrStations = itsChildControl->countChilds(0, CNTLRTYPE_STATIONCTRL); time_t now = to_time_t(second_clock::universal_time()); time_t stop = to_time_t(itsStopTime); - if (now < stop && itsProcessType == "Observation" && !nrStations) { + if (!nrChilds || (now < stop && itsProcessType == "Observation" && !nrStations)) { LOG_FATAL("Too less stations left, FORCING QUIT OF OBSERVATION"); if (itsState < CTState::RESUME) { itsQuitReason = CT_RESULT_LOST_CONNECTION; diff --git a/MAC/Deployment/data/OTDB/DPPP.comp b/MAC/Deployment/data/OTDB/DPPP.comp index c0d7fe4e234503c533f7d5491f1014af8910cc95..f11d13c47ff97da970cc377b7a15bb51c8d52dc1 100644 --- a/MAC/Deployment/data/OTDB/DPPP.comp +++ b/MAC/Deployment/data/OTDB/DPPP.comp @@ -193,7 +193,7 @@ node DPPP 4.0.0 development 'node constraint' "DPPP" par steps I vtext - 10 0 ["aoflagger","averager"] - "Names of the steps to perform." par showprogress I bool - 10 0 F - "Show a progress bar?" par showtimings I bool - 10 0 F - "At the end the percentage of elapsed time each step took can be shown" -par checkparset I bool - 10 0 F - "Check if all parameters in parset are used?" +par checkparset I int - 10 0 0 - "Check if all parameters in parset are used? -1=no, 0=warn, 1=fatal" par uselogger I bool - 100 0 T - "Use logging framework for messages?" uses msin 4.0.0 development 1 "Input MeasurementSet" uses msout 4.0.0 development 1 "Output MeasurementSet" diff --git a/RTCP/IONProc/src/Job.cc b/RTCP/IONProc/src/Job.cc index 8d111bc2cbc03192f1ccc3a9bc99eb605694d55a..53b6d736996811ffa4a48b76b37d223544da87b0 100644 --- a/RTCP/IONProc/src/Job.cc +++ b/RTCP/IONProc/src/Job.cc @@ -326,7 +326,7 @@ void Job::StorageProcess::controlThread() void Job::forwardFinalMetaData() { - struct timespec deadline = { time(0) + 60, 0 }; + struct timespec deadline = { time(0) + 240, 0 }; Thread thread(this, &Job::finalMetaDataThread, itsLogPrefix + "[FinalMetaDataThread] ", 65536); diff --git a/RTCP/Run/src/locations.sh.in b/RTCP/Run/src/locations.sh.in index 5d7d8c9ec54b1bb3b3178e282f131f6813f03f79..12f8bf44944e8c9275e3c6b619200dd617d68bab 100644 --- a/RTCP/Run/src/locations.sh.in +++ b/RTCP/Run/src/locations.sh.in @@ -61,7 +61,7 @@ OLAP.Storage.HBADeltasDir = $STORAGE_HOME/production/lofar/etc/StaticMetaData OLAP.FinalMetaDataGatherer.host = lhn001 OLAP.FinalMetaDataGatherer.userName = lofarsys OLAP.FinalMetaDataGatherer.sshIdentityFile = /root/.ssh/id_rsa.lofarsys -OLAP.FinalMetaDataGatherer.executable = $FINALMETADATAGATHERER +OLAP.FinalMetaDataGatherer.executable = LD_LIBRARY_PATH= $FINALMETADATAGATHERER OLAP.FinalMetaDataGatherer.database.host = $OTDB_HOST diff --git a/RTCP/Run/src/multitail-olap.conf b/RTCP/Run/src/multitail-olap.conf index 6681df3d1945efdacca3021626515750a2f5e7be..d1d59a78339a1ff361d1b51bf31b688b7444c19a 100644 --- a/RTCP/Run/src/multitail-olap.conf +++ b/RTCP/Run/src/multitail-olap.conf @@ -12,6 +12,9 @@ mcsre:red:.* Signal:.*$ mcsre:red:ERROR|FATAL|EXCEPTION|(Un)?[Cc]aught.*|Assertion.*failed.$ mcsre:yellow:WARN +# startBGL python error messages +mcsre:red:^[A-Za-z.]+Error: + # ----- messages by 'tail' (used by multitail) # examples: # tail: `/globalhome/lofarsystem/log/latest/run.CNProc.log' has appeared; following end of new file @@ -42,7 +45,7 @@ mcsre_s:green:(\[obs [^[]+\]) # ----- define filters and rewrite rules to show only errors filterscheme:errors:Only show severe errors -rule:em:ERROR|FATAL.*[Cc]aught|EXCEPTION|BE_MPI|FATAL \w+Error:|^mpirun noticed.*exited on signal|Assertion.*failed.$| Signal: |^MPI_.*|^Abort\(1\).*|^\[bgfen.* mca_oob_tcp_msg_recv:.*|Assertion `.*' failed. +rule:em:ERROR|FATAL.*[Cc]aught|EXCEPTION|BE_MPI|FATAL \w+Error:|^mpirun noticed.*exited on signal|Assertion.*failed.$| Signal: |^MPI_.*|^Abort\(1\).*|^\[bgfen.* mca_oob_tcp_msg_recv:.*|Assertion `.*' failed.|^[A-Za-z.]+Error: filterscheme:flags:Only show >0% flagging rule:em:flags.*\([0-9.]{2,5}%\) diff --git a/RTCP/Run/src/watchlogs.sh b/RTCP/Run/src/watchlogs.sh index 37705ac27425500b551fa0cc5fbe64cdd4f66e56..458ffb305bf8ef32455de890b855f3f966158e29 100755 --- a/RTCP/Run/src/watchlogs.sh +++ b/RTCP/Run/src/watchlogs.sh @@ -21,7 +21,6 @@ then done fi - multitail --no-mark-change --follow-all --retry-all -m 10240 --basename -F $ETCDIR/multitail-olap.conf \ $FLAGS -t "-- FLAGS --" -fr flags -ks flags -i $IONPROC_LOG \ $FLAGS -t "-- ERRORS --" -fr errors -i $IONPROC_LOG \ diff --git a/RTCP/Storage/src/MSWriterCorrelated.cc b/RTCP/Storage/src/MSWriterCorrelated.cc index ac774e676cdfe0ef631ecd5c7019ba9a0391f983..f1809278a0bc914862421e09632b9169aec5aac5 100644 --- a/RTCP/Storage/src/MSWriterCorrelated.cc +++ b/RTCP/Storage/src/MSWriterCorrelated.cc @@ -129,11 +129,18 @@ void MSWriterCorrelated::write(StreamableData *data) // Write sequence number if (itsSequenceNumbersFile != 0) { + // quick fix: always write to maintain integrity + unsigned seqnr = data->sequenceNumber(true); + + itsSequenceNumbersFile->write(&seqnr, sizeof seqnr); + +#if 0 // write the sequencenumber in correlator endianness, no byteswapping itsSequenceNumbers.push_back(data->sequenceNumber(true)); - + if (itsSequenceNumbers.size() > 64) flushSequenceNumbers(); +#endif } itsNrBlocksWritten++; diff --git a/RTCP/Storage/src/Storage_main.cc b/RTCP/Storage/src/Storage_main.cc index f282b0db84567f72d5e003b01de293c0e9cbe468..99427e44f68e470b4a78113a185bdbcb4c1ad220 100644 --- a/RTCP/Storage/src/Storage_main.cc +++ b/RTCP/Storage/src/Storage_main.cc @@ -23,7 +23,6 @@ #include <Stream/PortBroker.h> #include <Storage/SubbandWriter.h> #include <Storage/IOPriority.h> -#include <Storage/ExitOnClosedStdin.h> #include <Storage/Package__Version.h> #if defined HAVE_MPI @@ -78,7 +77,6 @@ int main(int argc, char *argv[]) if (argc != 4) throw StorageException(str(boost::format("usage: %s obsid rank is_bigendian") % argv[0]), THROW_ARGS); - ExitOnClosedStdin stdinWatcher; setvbuf(stdout, stdoutbuf, _IOLBF, sizeof stdoutbuf); setvbuf(stderr, stderrbuf, _IOLBF, sizeof stderrbuf); diff --git a/SAS/OTB/OTB/dist-src/startClientOTB b/SAS/OTB/OTB/dist-src/startClientOTB index f4a6392c972e5913b271d19d6a139108437879e5..6ac8b87441cb53c0ae17e2ba8e06dd3a70b69b60 100755 --- a/SAS/OTB/OTB/dist-src/startClientOTB +++ b/SAS/OTB/OTB/dist-src/startClientOTB @@ -1,13 +1,22 @@ #!/bin/sh +# Check if portnumber is added to commandline; if yes, use it. +if [ -z $1 ]; then + port1=12500 +else + port1=$1 +fi +echo "Using port $port1 for this client" + export OTB_DIR=/opt/sas/otb/client export JAVA_HOME=/usr/java/jdk1.7.0_02 echo echo --- Starting OTB Client --- +otbfile=`ls $OTB_DIR/OTB*.jar | grep -v javadoc | grep -v sources` export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTB_DIR -export OTB_APP=$OTB_DIR/`basename $OTB_DIR/OTB*.jar` +export OTB_APP=$OTB_DIR/`basename $otbfile` export CLASSPATH=$OTB_APP for JAR_DEPENDENCY in $OTB_DIR/lib/*.jar @@ -17,4 +26,9 @@ do done echo Starting up ... -$JAVA_HOME/bin/java -cp $CLASSPATH nl.astron.lofar.sas.otb.Main -s sas001 -p 12500 -d LOFAR_4 -u busyman +curdate=`date +%Y%m%dT%H%M%S` +logfile="/localhome/log/OTBClient_${port1}_${curdate}.log" +echo "Logging client logs to file $logfile" +$JAVA_HOME/bin/java -cp $CLASSPATH nl.astron.lofar.sas.otb.Main -s sas001 -p $port1 -d LOFAR_4 -u busyman 2>&1 1>$logfile & +clientpid=$! +echo Started OTB client with PID: $clientpid diff --git a/SAS/OTB/jOTDB3/dist-src/startServerOTB b/SAS/OTB/jOTDB3/dist-src/startServerOTB index 2a9ffb964ac4d96ec432b502d3818a1276a4ef89..318ea8b5b9a7616dbc9608dca0777a99b2500cd9 100755 --- a/SAS/OTB/jOTDB3/dist-src/startServerOTB +++ b/SAS/OTB/jOTDB3/dist-src/startServerOTB @@ -1,13 +1,24 @@ #!/bin/sh +# Check if portnumber is added to commandline; if yes, use it. +if [ -z $1 ]; then + port1=12500 + port2=12501 +else + port1=$1 + let port2=port1+1 +fi +echo "Using port $port1 and $port2 for this server" + export OTB_DIR=/opt/sas/otb/server export JAVA_HOME=/usr/java/jdk1.7.0_02 echo echo --- Starting OTB Server --- +jotdb3file=`ls $OTB_DIR/jOTDB3*.jar | grep -v javadoc | grep -v sources` export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTB_DIR -export OTB_APP=$OTB_DIR/`basename $OTB_DIR/jOTDB3*.jar` +export OTB_APP=$OTB_DIR/`basename $jotdb3file` export CLASSPATH=$OTB_APP for JAR_DEPENDENCY in $OTB_DIR/lib/*.jar @@ -18,11 +29,15 @@ done echo Starting up ... +curdate=`date +%Y%m%dT%H%M%S` +logfile="/localhome/log/OTBServer_${port1}_${curdate}.log" +echo "Logging serverlogs to file $logfile" serverpid=0 -ps -ef | grep -v grep | grep java | grep 12500 2>&1 1>/dev/null +ps -ef | grep -v grep | grep java | grep $port1 2>&1 1>/dev/null if [ $? -ne 0 ]; then - $JAVA_HOME/bin/java -cp $CLASSPATH nl.astron.lofar.sas.otb.jotdb3.jOTDBserver -s sas001 -d sas001 -p 12500 -o 12501 & + $JAVA_HOME/bin/java -cp $CLASSPATH nl.astron.lofar.sas.otb.jotdb3.jOTDBserver -s sas001 -d sas001 -p $port1 -o $port2 2>&1 1>&$logfile & serverpid=$! + echo Started server with PID: $serverpid +else + echo "Server for port $port1 already running!" fi - -echo OTB Server stopped. diff --git a/SAS/OTB/jOTDB3/src/nl/astron/lofar/sas/otb/jotdb3/jOTDBserver.java b/SAS/OTB/jOTDB3/src/nl/astron/lofar/sas/otb/jotdb3/jOTDBserver.java index f02325806b09ee5bfa215a8f8e9838b432cf91c9..4832d9facd8b53a38cb997abcdb7bb554c6e5ce5 100644 --- a/SAS/OTB/jOTDB3/src/nl/astron/lofar/sas/otb/jotdb3/jOTDBserver.java +++ b/SAS/OTB/jOTDB3/src/nl/astron/lofar/sas/otb/jotdb3/jOTDBserver.java @@ -23,6 +23,7 @@ package nl.astron.lofar.sas.otb.jotdb3; import com.darwinsys.lang.GetOpt; import com.darwinsys.lang.GetOptDesc; +import java.io.File; import java.rmi.RemoteException; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; @@ -67,17 +68,30 @@ public class jOTDBserver { public static void main(String[] argv) { + String logConfig = "jOTDB3.log_prop"; + try { - String logConfig = "jOTDB3.log_prop"; + File f = new File(logConfig); + if (f.exists()) { + PropertyConfigurator.configure(logConfig); + } else { + logConfig = File.separator+"opt"+File.separator+"sas"+File.separator+"otb"+File.separator+"etc"+File.separator+logConfig; + f = new File(logConfig); + if (f.exists()) { + PropertyConfigurator.configure(logConfig); + } else { + logger.error("jOTDB3.log_prop not found."); + } + } + logger.info("jOTDBServer started. LogPropFile: "+ logConfig); + logger.info("java.library.path:"+ System.getProperty("java.library.path")); + - PropertyConfigurator.configure(logConfig); try { jInitCPPLogger aCPPLogger= new jInitCPPLogger(logConfig); } catch (Exception ex) { System.out.println("Error: "+ ex); } - logger.info("jOTDBServer started. LogPropFile: "+ logConfig); - logger.info("java.library.path:"+ System.getProperty("java.library.path")); /* if (System.getSecurityManager () == null) { diff --git a/SAS/OTDB/sql/addKVT_func.sql b/SAS/OTDB/sql/addKVT_func.sql index 986ca0378e7b9c47bc73335b6b1e4f115de1abe5..bd6c5ac6727ba222ba2c961663b252124fc7fbac 100644 --- a/SAS/OTDB/sql/addKVT_func.sql +++ b/SAS/OTDB/sql/addKVT_func.sql @@ -43,6 +43,7 @@ CREATE OR REPLACE FUNCTION addKVT (INT, VARCHAR(150), VARCHAR(150), VARCHAR(20)) DECLARE vParRefID PICparamref.paramID%TYPE; vTime timestamp := NULL; + vLastValue TEXT; BEGIN -- convert timestamp @@ -63,6 +64,19 @@ CREATE OR REPLACE FUNCTION addKVT (INT, VARCHAR(150), VARCHAR(150), VARCHAR(20)) IF FOUND THEN -- its a PIC parameter + IF $3::integer <= 10 THEN + -- plain ON/OFF only register if last one was a serious problem + vLastValue := 100; + SELECT value + INTO vLastValue + FROM PICkvt + WHERE paramID = vParRefID + ORDER BY time DESC + LIMIT 1; + IF vLastValue::integer <= 10 THEN + RETURN FALSE; + END IF; + END IF; INSERT INTO PICkvt(paramID, value, time) VALUES (vParRefID, $3, vTime); RETURN TRUE; diff --git a/SAS/OTDB/sql/create_PIC_tables.sql b/SAS/OTDB/sql/create_PIC_tables.sql index d64c733a8f51be82aa150beb8c858ab3b582b5e5..d7bcb2ebe5239c84c3cb4132bf35ef217e52d97a 100644 --- a/SAS/OTDB/sql/create_PIC_tables.sql +++ b/SAS/OTDB/sql/create_PIC_tables.sql @@ -66,8 +66,7 @@ CREATE TABLE PICparamref ( pruning INT2 DEFAULT 10, description TEXT, - CONSTRAINT param_PK PRIMARY KEY (paramID), - CONSTRAINT paramID_uniq UNIQUE(paramID), + CONSTRAINT paramID_uniq PRIMARY KEY(paramID), CONSTRAINT paramname_uniq UNIQUE(PVSSname) ) WITHOUT OIDS; @@ -90,12 +89,11 @@ CREATE TABLE PIChierarchy ( index INT2 NOT NULL DEFAULT -1, leaf BOOLEAN DEFAULT TRUE, - CONSTRAINT param_uniq_in_tree UNIQUE(treeID, nodeID) + CONSTRAINT param_uniq_in_tree PRIMARY KEY(treeID, nodeID) ) WITHOUT OIDS; -- Index: pichierarchy_treeid_nodeid_indx - -CREATE UNIQUE INDEX PIChierarchy_treeid_nodeid_indx ON PIChierarchy(treeid, nodeid); +--CREATE UNIQUE INDEX PIChierarchy_treeid_nodeid_indx ON PIChierarchy(treeid, nodeid); -- -- PIC Key Values Time sets. @@ -110,12 +108,9 @@ CREATE TABLE PICkvt ( value TEXT NOT NULL, time TIMESTAMP DEFAULT now(), - CONSTRAINT pickvt_uniq UNIQUE(paramID, time) + CONSTRAINT pickvt_uniq PRIMARY KEY(paramID, time) ) WITHOUT OIDS; CREATE INDEX PIC_kvt_id ON PICkvt(paramID); CREATE INDEX PIC_kvt_time ON PICkvt(time); -CREATE UNIQUE INDEX PIC_kvt_id_time_indx ON pickvt(paramid, "time"); - - - +--CREATE UNIQUE INDEX PIC_kvt_id_time_indx ON pickvt(paramid, "time"); diff --git a/SAS/OTDB/sql/create_rules.sql b/SAS/OTDB/sql/create_rules.sql index be51b38a6ad2ea43129bab690479b4b01f2c8444..75d6f474c7aff6926d854d5961ab743c00c1c1da 100644 --- a/SAS/OTDB/sql/create_rules.sql +++ b/SAS/OTDB/sql/create_rules.sql @@ -26,8 +26,8 @@ -- Creates a rule for updating the modificationDate of the OTDBtree table. -- -DROP RULE ruleUpdateVIC; -DROP RULE ruleUpdateTemplate; +DROP RULE ruleUpdateVIC on vichierarchy; +DROP RULE ruleUpdateTemplate on victemplate; CREATE RULE ruleUpdateVIC AS ON UPDATE TO vichierarchy WHERE NEW.value <> OLD.value