From dcf40d3a7d56df67ff48bbb2efd30a8df1d7e926 Mon Sep 17 00:00:00 2001 From: Ruud Overeem <overeem@astron.nl> Date: Wed, 6 Jul 2005 08:15:18 +0000 Subject: [PATCH] %[ER:285]% Upgrade ACC 1.0 to 1.1 ParameterSet is now in ACC/APS. ProceControl is now in ACC/PLC. ParameterSet getInt changed to getInt32. --- CEP/Demo/OnLineProto/configure.in | 2 +- CEP/Demo/OnLineProto/src/DH_CorrCube.cc | 8 +- CEP/Demo/OnLineProto/src/DH_CorrCube.h | 14 +-- CEP/Demo/OnLineProto/src/DH_Vis.cc | 4 +- CEP/Demo/OnLineProto/src/DH_Vis.h | 8 +- CEP/Demo/OnLineProto/src/OnLineProto.cc | 52 ++++----- CEP/Demo/OnLineProto/src/WH_Correlate.cc | 8 +- CEP/Demo/OnLineProto/src/WH_Correlate.h | 8 +- CEP/Demo/OnLineProto/src/WH_Dump.cc | 6 +- CEP/Demo/OnLineProto/src/WH_Dump.h | 8 +- CEP/Demo/OnLineProto/src/WH_FringeControl.cc | 6 +- CEP/Demo/OnLineProto/src/WH_FringeControl.h | 8 +- CEP/Demo/OnLineProto/src/WH_PreProcess.cc | 22 ++-- CEP/Demo/OnLineProto/src/WH_PreProcess.h | 8 +- CEP/Demo/OnLineProto/src/WH_SimStation.cc | 30 ++--- CEP/Demo/OnLineProto/src/WH_SimStation.h | 8 +- CEP/Demo/OnLineProto/src/WH_Sync.cc | 18 +-- CEP/Demo/OnLineProto/src/WH_Sync.h | 8 +- CEP/Demo/OnLineProto/src/WH_Transpose.cc | 12 +- CEP/Demo/OnLineProto/src/WH_Transpose.h | 8 +- CEP/Demo/StationCorrelator/configure.in | 3 +- .../src/StationCorrelatorController.cc | 8 +- .../src/StationCorrelatorController.h | 8 +- .../src/StationCorrelatorMain.cc | 9 +- .../TFlopCorrelator/TFC_BGLProc/configure.in | 2 +- .../TFC_BGLProc/src/AH_BGLProcessing.cc | 10 +- .../TFC_BGLProc/src/WH_Correlator.cc | 11 +- .../TFlopCorrelator/TFC_BGLProc/src/WH_FFT.cc | 13 +-- .../TFlopCorrelator/TFC_BGLProc/src/WH_FIR.cc | 17 ++- .../TFC_BGLProc/test/tPPFilter.cc | 2 +- .../TFC_BGLProc/test/tWH_Correlator.cc | 2 +- .../TFC_BGLProc/test/tWH_FFT.cc | 2 +- .../TFC_BGLProc/test/tWH_FIR.cc | 2 +- .../TFC_DelayCompensation/configure.in | 2 +- .../src/AH_DelayCompensation.cc | 4 +- .../TFC_InputSection/configure.in | 2 +- .../TFC_InputSection/src/AH_InputSection.cc | 2 +- .../TFC_InputSection/src/WH_RSPInput.cc | 16 +-- .../TFC_InputSection/src/WH_RSPInput.h | 8 +- .../TFC_InputSection/src/WH_Transpose.cc | 4 +- .../TFC_InputSection/test/tWH_Transpose.cc | 4 +- .../TFC_Interface/configure.in | 2 +- .../TFC_Interface/src/DH_CorrCube.cc | 10 +- .../TFC_Interface/src/DH_FIR.cc | 11 +- .../TFC_Interface/src/DH_PPF.cc | 13 +-- .../TFC_Interface/src/DH_RSP.cc | 10 +- .../TFC_Interface/src/DH_RSP.h | 6 +- .../TFC_Interface/src/DH_Vis.cc | 7 +- .../TFC_Interface/src/Stub_Corr.cc | 10 +- .../TFC_Interface/src/Stub_Corr.h | 4 +- .../TFC_Interface/src/Stub_Delay.cc | 10 +- .../TFC_Interface/src/Stub_Delay.h | 4 +- .../TFC_Interface/src/Stub_FIR.cc | 8 +- .../TFC_Interface/src/Stub_FIR.h | 4 +- .../TFC_Interface/src/Stub_RSP.cc | 4 +- .../TFC_Interface/src/Stub_RSP.h | 4 +- .../TFlopCorrelator/TFC_Storage/configure.in | 2 +- .../TFC_Storage/src/AH_Storage.cc | 4 +- .../TFC_Storage/src/WH_Storage.cc | 8 +- .../TFC_Storage/src/WH_Storage.h | 6 +- CEP/Tools/AccepTest1/configure.in | 1 + CEP/Tools/AccepTest1/src/BackEndStub.cc | 6 +- CEP/Tools/AccepTest1/src/FrontEndStub.cc | 6 +- CEP/tinyCEP/configure.in | 3 +- .../src/ApplicationHolderController.cc | 11 +- CEP/tinyCEP/src/ApplicationHolderController.h | 6 +- CEP/tinyCEP/src/TinyApplicationHolder.cc | 2 +- CEP/tinyCEP/src/TinyApplicationHolder.h | 6 +- Demo/CEP/StationCorrelator/configure.in | 3 +- .../src/StationCorrelatorController.cc | 8 +- .../src/StationCorrelatorController.h | 8 +- .../src/StationCorrelatorMain.cc | 9 +- .../TFlopCorrelator/TFC_BGLProc/configure.in | 2 +- .../TFC_BGLProc/src/AH_BGLProcessing.cc | 10 +- .../TFC_BGLProc/src/Attic/AH_BGLProcessing.cc | 10 +- .../TFC_BGLProc/src/Attic/WH_Correlator.cc | 11 +- .../TFC_BGLProc/src/WH_Correlator.cc | 11 +- .../TFlopCorrelator/TFC_BGLProc/src/WH_FFT.cc | 13 +-- .../TFlopCorrelator/TFC_BGLProc/src/WH_FIR.cc | 17 ++- .../TFC_BGLProc/test/Attic/tWH_Correlator.cc | 2 +- .../TFC_BGLProc/test/tPPFilter.cc | 2 +- .../TFC_BGLProc/test/tWH_Correlator.cc | 2 +- .../TFC_BGLProc/test/tWH_FFT.cc | 2 +- .../TFC_BGLProc/test/tWH_FIR.cc | 2 +- .../TFC_DelayCompensation/configure.in | 2 +- .../src/AH_DelayCompensation.cc | 4 +- .../TFC_InputSection/configure.in | 2 +- .../TFC_InputSection/src/AH_InputSection.cc | 2 +- .../src/Attic/AH_InputSection.cc | 2 +- .../TFC_InputSection/src/Attic/WH_RSPInput.cc | 16 +-- .../TFC_InputSection/src/Attic/WH_RSPInput.h | 8 +- .../TFC_InputSection/src/WH_RSPInput.cc | 16 +-- .../TFC_InputSection/src/WH_RSPInput.h | 8 +- .../TFC_InputSection/src/WH_Transpose.cc | 4 +- .../TFC_InputSection/test/tWH_Transpose.cc | 4 +- .../TFC_Interface/configure.in | 2 +- .../TFC_Interface/src/Attic/DH_CorrCube.cc | 10 +- .../TFC_Interface/src/Attic/DH_PPF.cc | 13 +-- .../TFC_Interface/src/Attic/DH_RSP.cc | 10 +- .../TFC_Interface/src/Attic/DH_RSP.h | 6 +- .../TFC_Interface/src/Attic/DH_Vis.cc | 7 +- .../TFC_Interface/src/Attic/Stub_Corr.cc | 10 +- .../TFC_Interface/src/Attic/Stub_Corr.h | 4 +- .../TFC_Interface/src/Attic/Stub_Delay.cc | 10 +- .../TFC_Interface/src/Attic/Stub_Delay.h | 4 +- .../TFC_Interface/src/Attic/Stub_FIR.cc | 8 +- .../TFC_Interface/src/Attic/Stub_FIR.h | 4 +- .../TFC_Interface/src/Attic/Stub_RSP.cc | 4 +- .../TFC_Interface/src/Attic/Stub_RSP.h | 4 +- .../TFC_Interface/src/DH_CorrCube.cc | 10 +- .../TFC_Interface/src/DH_FIR.cc | 11 +- .../TFC_Interface/src/DH_PPF.cc | 13 +-- .../TFC_Interface/src/DH_RSP.cc | 10 +- .../TFC_Interface/src/DH_RSP.h | 6 +- .../TFC_Interface/src/DH_Vis.cc | 7 +- .../TFC_Interface/src/Stub_Corr.cc | 10 +- .../TFC_Interface/src/Stub_Corr.h | 4 +- .../TFC_Interface/src/Stub_Delay.cc | 10 +- .../TFC_Interface/src/Stub_Delay.h | 4 +- .../TFC_Interface/src/Stub_FIR.cc | 8 +- .../TFC_Interface/src/Stub_FIR.h | 4 +- .../TFC_Interface/src/Stub_RSP.cc | 4 +- .../TFC_Interface/src/Stub_RSP.h | 4 +- .../TFlopCorrelator/TFC_Storage/configure.in | 2 +- .../TFC_Storage/src/AH_Storage.cc | 4 +- .../TFC_Storage/src/Attic/AH_Storage.cc | 4 +- .../TFC_Storage/src/Attic/WH_Storage.cc | 8 +- .../TFC_Storage/src/Attic/WH_Storage.h | 6 +- .../TFC_Storage/src/WH_Storage.cc | 8 +- .../TFC_Storage/src/WH_Storage.h | 6 +- LCS/Common/include/Common/StringUtil.h | 27 +++++ LCS/Common/src/StringUtil.cc | 104 +++++++++++++++++- LCS/Common/src/StringUtil.h | 27 +++++ MAC/APL/APLCommon/configure.in | 2 +- .../include/APL/APLCommon/LogicalDevice.h | 4 +- .../include/APLCommon/LogicalDevice.h | 4 +- MAC/APL/APLCommon/src/LogicalDevice.cc | 2 +- .../_VirtualBackend/src/VirtualBackendLD.cc | 4 +- MAC/APL/_GSO/MACScheduler/configure.in | 2 +- MAC/APL/_GSO/MACScheduler/src/MACScheduler.cc | 44 ++++---- MAC/APL/_GSO/MACScheduler/src/MACScheduler.h | 6 +- 141 files changed, 668 insertions(+), 522 deletions(-) diff --git a/CEP/Demo/OnLineProto/configure.in b/CEP/Demo/OnLineProto/configure.in index e4c58330e2a..b14fd1de2ba 100644 --- a/CEP/Demo/OnLineProto/configure.in +++ b/CEP/Demo/OnLineProto/configure.in @@ -58,7 +58,7 @@ lofar_DOCXX lofar_BLITZ lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h,,) -lofar_INTERNAL(LCS/ACC,ACC,,1,ACC/ParameterSet.h,,) +lofar_INTERNAL(LCS/ACC/APS,APS,,1,APS/ParameterSet.h,,) lofar_INTERNAL(CEP/CEPFrame,CEPFrame,,1,CEPFrame/DataManager.h,,) dnl diff --git a/CEP/Demo/OnLineProto/src/DH_CorrCube.cc b/CEP/Demo/OnLineProto/src/DH_CorrCube.cc index 5c638ca6524..3b2e6c7430d 100644 --- a/CEP/Demo/OnLineProto/src/DH_CorrCube.cc +++ b/CEP/Demo/OnLineProto/src/DH_CorrCube.cc @@ -30,15 +30,15 @@ namespace LOFAR { -DH_CorrCube::DH_CorrCube (const string& name, const ACC::ParameterSet& ps) +DH_CorrCube::DH_CorrCube (const string& name, const ACC::APS::ParameterSet& ps) : DataHolder (name, "DH_CorrCube"), itsBufferptr (0), itsPS (ps) { itsBufSize = - itsPS.getInt("general.nstations") - * itsPS.getInt("corr.fsize") - * itsPS.getInt("corr.tsize") + itsPS.getInt32("general.nstations") + * itsPS.getInt32("corr.fsize") + * itsPS.getInt32("corr.tsize") * sizeof( complex<float> ); } diff --git a/CEP/Demo/OnLineProto/src/DH_CorrCube.h b/CEP/Demo/OnLineProto/src/DH_CorrCube.h index 43601c9bae5..809f7f23f5f 100644 --- a/CEP/Demo/OnLineProto/src/DH_CorrCube.h +++ b/CEP/Demo/OnLineProto/src/DH_CorrCube.h @@ -28,7 +28,7 @@ #include <Transport/DataHolder.h> #include <complex> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> using std::complex; @@ -45,7 +45,7 @@ public: typedef complex<float> BufferType; explicit DH_CorrCube (const string& name, - const ACC::ParameterSet& ps); + const ACC::APS::ParameterSet& ps); DH_CorrCube(const DH_CorrCube&); @@ -84,7 +84,7 @@ private: complex<float>* itsBufferptr; // array containing frequency spectrum. int itsBufSize; // calculate required buffer size in C'tor - const ACC::ParameterSet itsPS; // necessary configuration parameters + const ACC::APS::ParameterSet itsPS; // necessary configuration parameters }; inline DH_CorrCube::BufferType* DH_CorrCube::getBuffer() @@ -98,8 +98,8 @@ inline DH_CorrCube::BufferType* DH_CorrCube::getBufferElement(int station, int freq) { // todo: cache corr. sizes - return itsBufferptr+station*itsPS.getInt("corr.tsize")*itsPS.getInt("corr.fsize") - +time*itsPS.getInt("corr.fsize")+freq; + return itsBufferptr+station*itsPS.getInt32("corr.tsize")*itsPS.getInt32("corr.fsize") + +time*itsPS.getInt32("corr.fsize")+freq; } inline void DH_CorrCube::setBufferElement(int station, @@ -108,8 +108,8 @@ inline void DH_CorrCube::setBufferElement(int station, DH_CorrCube::BufferType* valueptr) { // todo: cache corr. sizes - complex<float>* ptr= itsBufferptr+station*itsPS.getInt("corr.tsize")* - itsPS.getInt("corr.fsize")+time*itsPS.getInt("corr.fsize")+freq; + complex<float>* ptr= itsBufferptr+station*itsPS.getInt32("corr.tsize")* + itsPS.getInt32("corr.fsize")+time*itsPS.getInt32("corr.fsize")+freq; *ptr = *valueptr; } diff --git a/CEP/Demo/OnLineProto/src/DH_Vis.cc b/CEP/Demo/OnLineProto/src/DH_Vis.cc index c7860813b0e..c9805d1c37d 100644 --- a/CEP/Demo/OnLineProto/src/DH_Vis.cc +++ b/CEP/Demo/OnLineProto/src/DH_Vis.cc @@ -30,12 +30,12 @@ namespace LOFAR { -DH_Vis::DH_Vis (const string& name, const ACC::ParameterSet& ps) +DH_Vis::DH_Vis (const string& name, const ACC::APS::ParameterSet& ps) : DataHolder (name, "DH_Vis"), itsBufferptr (0), itsPS (ps) { - itsBufSize = itsPS.getInt("general.nstations") * itsPS.getInt("general.nstations") + itsBufSize = itsPS.getInt32("general.nstations") * itsPS.getInt32("general.nstations") * sizeof(BufferType); } diff --git a/CEP/Demo/OnLineProto/src/DH_Vis.h b/CEP/Demo/OnLineProto/src/DH_Vis.h index e0ecc6b42f0..280dcd27650 100644 --- a/CEP/Demo/OnLineProto/src/DH_Vis.h +++ b/CEP/Demo/OnLineProto/src/DH_Vis.h @@ -28,7 +28,7 @@ #include "Transport/DataHolder.h" #include <complex> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> // ToDo: pass these values through configuration parameters #include <OnLineProto/definitions.h> @@ -46,7 +46,7 @@ class DH_Vis: public DataHolder public: typedef complex<float> BufferType; - explicit DH_Vis (const string& name, const ACC::ParameterSet& ps); + explicit DH_Vis (const string& name, const ACC::APS::ParameterSet& ps); DH_Vis(const DH_Vis&); @@ -84,7 +84,7 @@ private: unsigned int itsBufSize; - const ACC::ParameterSet itsPS; + const ACC::APS::ParameterSet itsPS; }; inline DH_Vis::BufferType* DH_Vis::getBuffer() @@ -95,7 +95,7 @@ inline const DH_Vis::BufferType* DH_Vis::getBuffer() const inline DH_Vis::BufferType* DH_Vis::getBufferElement(int s1, int s2) { - return itsBufferptr+s1*itsPS.getInt("general.nstations")+s2; + return itsBufferptr+s1*itsPS.getInt32("general.nstations")+s2; } inline const int DH_Vis::getFBW() const diff --git a/CEP/Demo/OnLineProto/src/OnLineProto.cc b/CEP/Demo/OnLineProto/src/OnLineProto.cc index d8495e54803..12160aa6391 100644 --- a/CEP/Demo/OnLineProto/src/OnLineProto.cc +++ b/CEP/Demo/OnLineProto/src/OnLineProto.cc @@ -31,7 +31,7 @@ #include <Common/KeyValueMap.h> //#include <Common/Debug.h> #include <Common/lofar_iostream.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> //#ifdef HAVE_CONFIG_H //#include <config.h> @@ -112,7 +112,7 @@ void OnLineProto::define(const KeyValueMap& params) char str[8]; // Read in the parameter sets - const ACC::ParameterSet myPS(params.getString("psfile", "params.ps")); + const ACC::APS::ParameterSet myPS(params.getString("psfile", "params.ps")); //////////////////////////////////////////////////////////////// // @@ -122,17 +122,17 @@ void OnLineProto::define(const KeyValueMap& params) vector<WH_SimStation*> myWHStations; vector<Step*> myStationSteps; - for (int s=0; s < myPS.getInt("general.nstations"); s++) { + for (int s=0; s < myPS.getInt32("general.nstations"); s++) { // ToDo: pass stationID, freq offset etc. to DH if (s==0){ myWHStations.push_back(new WH_SimStation("mysimstation", // name, - myPS.getInt("station.nbeamlets"), // nout + myPS.getInt32("station.nbeamlets"), // nout string("signal_1.txt"), myPS, s)); } else { myWHStations.push_back(new WH_SimStation("mysimstation", // name, - myPS.getInt("station.nbeamlets"), // nout + myPS.getInt32("station.nbeamlets"), // nout string("signal_2.txt"), myPS, s)); @@ -148,7 +148,7 @@ void OnLineProto::define(const KeyValueMap& params) // create the fringe control step // //////////////////////////////////////////////////////////////// - WH_FringeControl myWHFringeControl("myfringecontrol", myPS.getInt("general.nstations"), myPS); + WH_FringeControl myWHFringeControl("myfringecontrol", myPS.getInt32("general.nstations"), myPS); Step myFringeControl(myWHFringeControl, "myfringecontrol_step"); myFringeControl.runOnNode(0,0); app.addStep(myFringeControl); @@ -158,9 +158,9 @@ void OnLineProto::define(const KeyValueMap& params) // create the merge step // //////////////////////////////////////////////////////////////// - WH_Merge myWHMerge("mymerge", 1, myPS.getInt("general.nstations"), - myPS.getInt("general.nstations"), - myPS.getInt("station.nchannels")); + WH_Merge myWHMerge("mymerge", 1, myPS.getInt32("general.nstations"), + myPS.getInt32("general.nstations"), + myPS.getInt32("station.nchannels")); Step myMerge(myWHMerge, "mymergestep"); myMerge.runOnNode(0,0); app.addStep(myMerge); @@ -176,10 +176,10 @@ void OnLineProto::define(const KeyValueMap& params) vector<WH_PreProcess*> myWHPreProcess; vector<Step*> myPreProcessSteps; - for (int s=0; s < myPS.getInt("general.nstations"); s++) { + for (int s=0; s < myPS.getInt32("general.nstations"); s++) { // ToDo: pass stationID, freq offset etc. to DH myWHPreProcess.push_back(new WH_PreProcess("mypreprocess", // name, - myPS.getInt("station.nbeamlets"), // channels + myPS.getInt32("station.nbeamlets"), // channels myPS, s)); @@ -188,12 +188,12 @@ void OnLineProto::define(const KeyValueMap& params) app.addStep(myPreProcessSteps[s]); // connect the preprocess step to the station step - for (int b = 0; b < myPS.getInt("station.nbeamlets"); b++) { + for (int b = 0; b < myPS.getInt32("station.nbeamlets"); b++) { myPreProcessSteps[s]->connect(myStationSteps[s], b, b, 1, THproto, nonblocking); } // connect the preprocess steps to the fringecontrol step - myPreProcessSteps[s]->connect(&myMerge, myPS.getInt("station.nbeamlets"), s, 1, THproto, nonblocking); + myPreProcessSteps[s]->connect(&myMerge, myPS.getInt32("station.nbeamlets"), s, 1, THproto, nonblocking); } //////////////////////////////////////////////////////////////// @@ -205,11 +205,11 @@ void OnLineProto::define(const KeyValueMap& params) vector<Step*> myTransposeSteps; // create a Transpose step for each beamlet (raw freq channel) - for (int b=0; b < myPS.getInt("station.nbeamlets"); b++) { + for (int b=0; b < myPS.getInt32("station.nbeamlets"); b++) { // ToDo: pass stationID, freq offset etc. to DH myWHTranspose.push_back(new WH_Transpose("mytranspose", // name, - myPS.getInt("general.nstations"), // nin - myPS.getInt("corr.ncorr"), //nout + myPS.getInt32("general.nstations"), // nin + myPS.getInt32("corr.ncorr"), //nout myPS )); @@ -227,8 +227,8 @@ void OnLineProto::define(const KeyValueMap& params) // connection scheme implements transpose function // //////////////////////////////////////////////////////////////// - for (int b = 0; b < myPS.getInt("station.nbeamlets"); b++) { - for (int s = 0; s < myPS.getInt("general.nstations"); s++) { + for (int b = 0; b < myPS.getInt32("station.nbeamlets"); b++) { + for (int s = 0; s < myPS.getInt32("general.nstations"); s++) { TRACER2("Pipeline!; try to connect " << b << " " << s); myTransposeSteps[b]->connect(myPreProcessSteps[s],s,b,1, THproto, nonblocking); } @@ -242,9 +242,9 @@ void OnLineProto::define(const KeyValueMap& params) vector<WH_Correlate*> myWHCorrelators; vector<Step*> myCorrelatorSteps; - for (int b=0; b < myPS.getInt("station.nbeamlets"); b++) { //NBeamlets - for (int f=0; f < myPS.getInt("corr.ncorr"); f++) { - int correlator = b * myPS.getInt("corr.ncorr") + f; + for (int b=0; b < myPS.getInt32("station.nbeamlets"); b++) { //NBeamlets + for (int f=0; f < myPS.getInt32("corr.ncorr"); f++) { + int correlator = b * myPS.getInt32("corr.ncorr") + f; // ToDo: pass stationID, freq offset etc. to DH myWHCorrelators.push_back(new WH_Correlate("mycorrelate", // name, @@ -256,7 +256,7 @@ void OnLineProto::define(const KeyValueMap& params) myCorrelatorSteps.push_back(new Step(myWHCorrelators[correlator],"mycorrelate_step")); myCorrelatorSteps[correlator]->runOnNode(0,0); // todo: only output rate? - myCorrelatorSteps[correlator]->getWorker()->getDataManager().setOutputRate(myPS.getInt("corr.tsize")); + myCorrelatorSteps[correlator]->getWorker()->getDataManager().setOutputRate(myPS.getInt32("corr.tsize")); app.addStep(myCorrelatorSteps[correlator]); //////////////////////////////////////////////////////////////// @@ -281,7 +281,7 @@ void OnLineProto::define(const KeyValueMap& params) vector<Step*> myDumpSteps; - for (int s=0; s < myPS.getInt("corr.ncorr") * myPS.getInt("station.nbeamlets"); s++) { + for (int s=0; s < myPS.getInt32("corr.ncorr") * myPS.getInt32("station.nbeamlets"); s++) { // ToDo: pass stationID, freq offset etc. to DH myWHDumps.push_back(new WH_Dump("mydump",1,myPS,s)); @@ -289,9 +289,9 @@ void OnLineProto::define(const KeyValueMap& params) myDumpSteps.push_back(new Step(myWHDumps[s],"mydump_step")); myDumpSteps[s]->runOnNode(0,0); - myDumpSteps[s]->getWorker()->getDataManager().setInputRate(myPS.getInt("corr.tsize")); - myDumpSteps[s]->getWorker()->getDataManager().setProcessRate(myPS.getInt("corr.tsize")); - myDumpSteps[s]->getWorker()->getDataManager().setOutputRate(myPS.getInt("corr.tsize")); + myDumpSteps[s]->getWorker()->getDataManager().setInputRate(myPS.getInt32("corr.tsize")); + myDumpSteps[s]->getWorker()->getDataManager().setProcessRate(myPS.getInt32("corr.tsize")); + myDumpSteps[s]->getWorker()->getDataManager().setOutputRate(myPS.getInt32("corr.tsize")); app.addStep(myDumpSteps[s]); // connect the preprocess step to the station step myDumpSteps[s]->connectInput(myCorrelatorSteps[s], THproto, nonblocking); diff --git a/CEP/Demo/OnLineProto/src/WH_Correlate.cc b/CEP/Demo/OnLineProto/src/WH_Correlate.cc index 525cfecfdb5..d76a3040e61 100644 --- a/CEP/Demo/OnLineProto/src/WH_Correlate.cc +++ b/CEP/Demo/OnLineProto/src/WH_Correlate.cc @@ -39,10 +39,10 @@ namespace LOFAR WH_Correlate::WH_Correlate (const string& name, unsigned int channels, - const ACC::ParameterSet& ps) + const ACC::APS::ParameterSet& ps) : WorkHolder (channels, channels, name,"WH_Correlate"), - itsNelements (ps.getInt("general.nstations")), - itsNitems (ps.getInt("corr.tsize")), + itsNelements (ps.getInt32("general.nstations")), + itsNitems (ps.getInt32("corr.tsize")), itsPS (ps) { char str[8]; @@ -66,7 +66,7 @@ WH_Correlate::~WH_Correlate() WorkHolder* WH_Correlate::construct (const string& name, unsigned int channels, - const ACC::ParameterSet& ps) + const ACC::APS::ParameterSet& ps) { return new WH_Correlate (name, channels, ps); } diff --git a/CEP/Demo/OnLineProto/src/WH_Correlate.h b/CEP/Demo/OnLineProto/src/WH_Correlate.h index 04118238681..8f85d762ebc 100644 --- a/CEP/Demo/OnLineProto/src/WH_Correlate.h +++ b/CEP/Demo/OnLineProto/src/WH_Correlate.h @@ -28,7 +28,7 @@ #include "tinyCEP/WorkHolder.h" #include "OnLineProto/DH_CorrCube.h" #include "OnLineProto/DH_Vis.h" -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <blitz/blitz.h> #include <blitz/array.h> @@ -49,14 +49,14 @@ public: /// The first WorkHolder should have nin=0. explicit WH_Correlate (const string& name, unsigned int channels, - const ACC::ParameterSet& ps); + const ACC::APS::ParameterSet& ps); virtual ~WH_Correlate(); /// Static function to create an object. static WorkHolder* construct (const string& name, unsigned int channels, - const ACC::ParameterSet& ps); + const ACC::APS::ParameterSet& ps); /// Make a fresh copy of the WH object. virtual WH_Correlate* make (const string& name); @@ -92,7 +92,7 @@ private: const int itsNelements; // number of stations/inputs const int itsNitems; // number of frequency channels * number of time samples - const ACC::ParameterSet itsPS; + const ACC::APS::ParameterSet itsPS; }; diff --git a/CEP/Demo/OnLineProto/src/WH_Dump.cc b/CEP/Demo/OnLineProto/src/WH_Dump.cc index 5eed7a12858..2be199269c7 100644 --- a/CEP/Demo/OnLineProto/src/WH_Dump.cc +++ b/CEP/Demo/OnLineProto/src/WH_Dump.cc @@ -45,7 +45,7 @@ namespace LOFAR WH_Dump::WH_Dump (const string& name, unsigned int nin, - const ACC::ParameterSet& ps, + const ACC::APS::ParameterSet& ps, int rank) : WorkHolder (nin, 1, name,"WH_Dump"), itsIndex (1), @@ -85,7 +85,7 @@ WH_Dump::~WH_Dump() WorkHolder* WH_Dump::construct (const string& name, int nin, - const ACC::ParameterSet& ps, + const ACC::APS::ParameterSet& ps, int rank) { return new WH_Dump (name, nin, ps, rank); @@ -98,7 +98,7 @@ WH_Dump* WH_Dump::make (const string& name) void WH_Dump::process() { - int nstations = itsPS.getInt("general.nstations"); + int nstations = itsPS.getInt32("general.nstations"); blitz::Array<complex<float>, 2> corr(nstations, nstations); blitz::Array<float, 1> plotBuffer (PLOTSIZE) ; corr = complex<float> (0,0); diff --git a/CEP/Demo/OnLineProto/src/WH_Dump.h b/CEP/Demo/OnLineProto/src/WH_Dump.h index d0a572bcb80..77a913f4fd8 100644 --- a/CEP/Demo/OnLineProto/src/WH_Dump.h +++ b/CEP/Demo/OnLineProto/src/WH_Dump.h @@ -26,7 +26,7 @@ #include <lofar_config.h> #include "tinyCEP/WorkHolder.h" -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <blitz/blitz.h> #include <blitz/array.h> @@ -51,7 +51,7 @@ public: /// The first WorkHolder should have nin=0. explicit WH_Dump (const string& name, unsigned int nin, - const ACC::ParameterSet& ps, + const ACC::APS::ParameterSet& ps, int rank = 0); virtual ~WH_Dump(); @@ -59,7 +59,7 @@ public: /// Static function to create an object. static WorkHolder* construct (const string& name, int nin, - const ACC::ParameterSet& ps, + const ACC::APS::ParameterSet& ps, int rank); /// Make a fresh copy of the WH object. @@ -88,7 +88,7 @@ private: gnuplot_ctrl* handle; - const ACC::ParameterSet itsPS; + const ACC::APS::ParameterSet itsPS; int itsRank; }; diff --git a/CEP/Demo/OnLineProto/src/WH_FringeControl.cc b/CEP/Demo/OnLineProto/src/WH_FringeControl.cc index 1a10c5e5a1e..c602cac1ff5 100644 --- a/CEP/Demo/OnLineProto/src/WH_FringeControl.cc +++ b/CEP/Demo/OnLineProto/src/WH_FringeControl.cc @@ -40,7 +40,7 @@ namespace LOFAR WH_FringeControl::WH_FringeControl (const string& name, const int nout, - const ACC::ParameterSet& ps) + const ACC::APS::ParameterSet& ps) : WorkHolder (1, nout, name,"WH_FringeControl"), itsPS (ps) { @@ -53,7 +53,7 @@ WH_FringeControl::WH_FringeControl (const string& name, // create the output dataholders for (int i = 0; i < nout; i++) { sprintf (str, "%d", i); - getDataManager().addOutDataHolder(i,new DH_CorrectionMatrix (string("FringeCtrlout_") + str, ps.getInt("general.nstations"), ps.getInt("station.nchannels"))); + getDataManager().addOutDataHolder(i,new DH_CorrectionMatrix (string("FringeCtrlout_") + str, ps.getInt32("general.nstations"), ps.getInt32("station.nchannels"))); } } @@ -63,7 +63,7 @@ WH_FringeControl::~WH_FringeControl() WorkHolder* WH_FringeControl::construct (const string& name, const int nout, - const ACC::ParameterSet& ps) + const ACC::APS::ParameterSet& ps) { return new WH_FringeControl (name, nout, ps); } diff --git a/CEP/Demo/OnLineProto/src/WH_FringeControl.h b/CEP/Demo/OnLineProto/src/WH_FringeControl.h index 0517421ba32..bd8ac279b93 100644 --- a/CEP/Demo/OnLineProto/src/WH_FringeControl.h +++ b/CEP/Demo/OnLineProto/src/WH_FringeControl.h @@ -27,7 +27,7 @@ #include <tinyCEP/WorkHolder.h> #include <OnLineProto/DH_CorrectionMatrix.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> namespace LOFAR { @@ -40,14 +40,14 @@ public: /// The first WorkHolder should have nin=0. explicit WH_FringeControl (const string& name, const int nout, - const ACC::ParameterSet& ps); + const ACC::APS::ParameterSet& ps); virtual ~WH_FringeControl(); /// Static function to create an object. static WorkHolder* construct (const string& name, const int nout, - const ACC::ParameterSet& ps); + const ACC::APS::ParameterSet& ps); /// Make a fresh copy of the WH object. virtual WH_FringeControl* make (const string& name); @@ -65,7 +65,7 @@ private: /// Forbid assignment. WH_FringeControl& operator= (const WH_FringeControl&); - ACC::ParameterSet itsPS; + ACC::APS::ParameterSet itsPS; }; } diff --git a/CEP/Demo/OnLineProto/src/WH_PreProcess.cc b/CEP/Demo/OnLineProto/src/WH_PreProcess.cc index 3db068812e6..3a98b66da77 100644 --- a/CEP/Demo/OnLineProto/src/WH_PreProcess.cc +++ b/CEP/Demo/OnLineProto/src/WH_PreProcess.cc @@ -39,14 +39,14 @@ namespace LOFAR { WH_PreProcess::WH_PreProcess (const string& name, const int nbeamlets, - const ACC::ParameterSet& ps, + const ACC::APS::ParameterSet& ps, const int StationID) : WorkHolder (nbeamlets+1, nbeamlets, name,"WH_PreProcess"), itsPS (ps), itsStationID (StationID) { char str[8]; - int bs = itsPS.getInt("station.nchannels"); + int bs = itsPS.getInt32("station.nchannels"); for (int i = 0; i < nbeamlets; i++) { sprintf (str, "%d", i); @@ -57,7 +57,7 @@ WH_PreProcess::WH_PreProcess (const string& name, itsPS.getFloat(string("station.beamlet.") + str), itsPS.getFloat("station.chan_bw"), itsPS.getFloat("observation.ha_0"), - itsPS.getInt("station.nchannels"))); + itsPS.getInt32("station.nchannels"))); // create the output dataholders getDataManager().addOutDataHolder(i, new DH_Beamlet (string("PP_out_") + str, @@ -65,10 +65,10 @@ WH_PreProcess::WH_PreProcess (const string& name, itsPS.getFloat(string("station.beamlet.") + str), itsPS.getFloat("station.chan_bw"), itsPS.getFloat("observation.ha_0"), - itsPS.getInt("station.nchannels"))); + itsPS.getInt32("station.nchannels"))); } - getDataManager().addInDataHolder(nbeamlets, new DH_CorrectionMatrix ("in_fringe", 1, itsPS.getInt("station.nchannels"))); + getDataManager().addInDataHolder(nbeamlets, new DH_CorrectionMatrix ("in_fringe", 1, itsPS.getInt32("station.nchannels"))); } WH_PreProcess::~WH_PreProcess() @@ -77,7 +77,7 @@ WH_PreProcess::~WH_PreProcess() WorkHolder* WH_PreProcess::construct (const string& name, const int nbeamlets, - const ACC::ParameterSet& ps, + const ACC::APS::ParameterSet& ps, const int StationID) { return new WH_PreProcess (name, nbeamlets, ps, StationID); @@ -96,7 +96,7 @@ void WH_PreProcess::process() float ha; complex<float> phase; complex<float> i2pi (0,2*itsPS.getFloat("general.pi")); - int b = itsPS.getInt("station.nbeamlets"); + int b = itsPS.getInt32("station.nbeamlets"); char str[8]; sprintf(str, "%d",itsStationID); string sID (string("station.")+str+string(".")); @@ -106,9 +106,9 @@ void WH_PreProcess::process() ((DH_Beamlet*)getDataManager().getOutHolder(i))-> setElapsedTime(((DH_Beamlet*)getDataManager().getInHolder(i))->getElapsedTime()); - for (int j = 0; j < itsPS.getInt("station.nchannels"); j++) { + for (int j = 0; j < itsPS.getInt32("station.nchannels"); j++) { - if (itsPS.getInt("general.enable_fs") == 1) + if (itsPS.getInt32("general.enable_fs") == 1) { // calculate hourangle @@ -151,8 +151,8 @@ void WH_PreProcess::process() void WH_PreProcess::dump() { cout << "WH_PreProcess " << getName () << " Buffers:" << endl; - for (int i = 0; i < MIN(itsPS.getInt("station.nbeamlets"),1); i++) { - for (int j = 0; j < MIN(itsPS.getInt("station.nchannels"),10); j++) { + for (int i = 0; i < MIN(itsPS.getInt32("station.nbeamlets"),1); i++) { + for (int j = 0; j < MIN(itsPS.getInt32("station.nchannels"),10); j++) { cout << *((DH_Beamlet*)getDataManager().getOutHolder(i))->getBufferElement(j) << ' '; } cout << endl; diff --git a/CEP/Demo/OnLineProto/src/WH_PreProcess.h b/CEP/Demo/OnLineProto/src/WH_PreProcess.h index bcf0dcfb560..1ae9b4e6944 100644 --- a/CEP/Demo/OnLineProto/src/WH_PreProcess.h +++ b/CEP/Demo/OnLineProto/src/WH_PreProcess.h @@ -28,7 +28,7 @@ #include "tinyCEP/WorkHolder.h" #include "OnLineProto/DH_Beamlet.h" #include "OnLineProto/DH_CorrectionMatrix.h" -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <OnLineProto/definitions.h> namespace LOFAR @@ -42,7 +42,7 @@ public: /// The first WorkHolder should have nin=0. explicit WH_PreProcess (const string& name, const int nbeamlets, - const ACC::ParameterSet& ps, + const ACC::APS::ParameterSet& ps, const int StationID); virtual ~WH_PreProcess(); @@ -50,7 +50,7 @@ public: /// Static function to create an object. static WorkHolder* construct (const string& name, const int nbeamlets, - const ACC::ParameterSet& ps, + const ACC::APS::ParameterSet& ps, const int StationID); /// Make a fresh copy of the WH object. @@ -69,7 +69,7 @@ private: /// Forbid assignment. WH_PreProcess& operator= (const WH_PreProcess&); - ACC::ParameterSet itsPS; + ACC::APS::ParameterSet itsPS; int itsStationID; int itsCounter; }; diff --git a/CEP/Demo/OnLineProto/src/WH_SimStation.cc b/CEP/Demo/OnLineProto/src/WH_SimStation.cc index 21bb3be695e..91b53e6b420 100644 --- a/CEP/Demo/OnLineProto/src/WH_SimStation.cc +++ b/CEP/Demo/OnLineProto/src/WH_SimStation.cc @@ -39,7 +39,7 @@ namespace LOFAR WH_SimStation::WH_SimStation (const string& name, const int nout, const string& fileName, - const ACC::ParameterSet& ps, + const ACC::APS::ParameterSet& ps, const int ID) : WorkHolder (1, nout, name,"WH_SimStation"), itsFileName (fileName), @@ -52,7 +52,7 @@ namespace LOFAR // create the dummy input dataholder sprintf (str, "%d", 1); getDataManager().addInDataHolder(0, new DH_Empty (string("SimS_in_") + str)); - int bs = itsPS.getInt("station.nbeamlets"); + int bs = itsPS.getInt32("station.nbeamlets"); // create the output dataholders for (int i = 0; i < bs; i++) { @@ -63,13 +63,13 @@ namespace LOFAR itsPS.getFloat(string("station.beamlet.") + str), itsPS.getFloat("station.chan_bw"), itsPS.getFloat("observation.ha_0"), - itsPS.getInt("station.nchannels"))); + itsPS.getInt32("station.nchannels"))); } // Allocate buffer data, the add one is for the elapsed time // so the structure is t0 c1 ... cn // t1 c1 ... cn where n is the total number of channels - itsData = (complex<float>*)malloc((bs*itsPS.getInt("station.nchannels")+1) * sizeof (complex<float>)); + itsData = (complex<float>*)malloc((bs*itsPS.getInt32("station.nchannels")+1) * sizeof (complex<float>)); itsCounter = 0; } @@ -82,7 +82,7 @@ namespace LOFAR WorkHolder* WH_SimStation::construct (const string& name, const int nout, const string fileName, - const ACC::ParameterSet& ps, + const ACC::APS::ParameterSet& ps, const int ID) { return new WH_SimStation (name, nout, fileName, ps, ID); @@ -100,19 +100,19 @@ namespace LOFAR if (itsCounter == 0) { ReadData (); - itsCounter = itsPS.getInt("corr.tsize"); + itsCounter = itsPS.getInt32("corr.tsize"); } else { itsCounter--; } - float t = (float)(itsData[0].real())+ (0.05*(itsPS.getInt("corr.tsize")-itsCounter) - /itsPS.getInt("corr.tsize")); + float t = (float)(itsData[0].real())+ (0.05*(itsPS.getInt32("corr.tsize")-itsCounter) + /itsPS.getInt32("corr.tsize")); - for (int i = 0; i < itsPS.getInt("station.nbeamlets"); ++i) { + for (int i = 0; i < itsPS.getInt32("station.nbeamlets"); ++i) { ((DH_Beamlet*)getDataManager().getOutHolder(i))->setElapsedTime(t); - for (int j = 0; j < itsPS.getInt("station.nchannels"); j++) { + for (int j = 0; j < itsPS.getInt32("station.nchannels"); j++) { *((DH_Beamlet*)getDataManager().getOutHolder(i))->getBufferElement(j) - = itsData[i * itsPS.getInt("station.nchannels") + j + 1]; + = itsData[i * itsPS.getInt32("station.nchannels") + j + 1]; } } } @@ -121,8 +121,8 @@ namespace LOFAR { cout << "WH_SimStation " << getName () << " Buffers:" << endl; - for (int i = 0; i < MIN(itsPS.getInt("station.nbeamlets"), 1) ; i++) { - for (int j = 0; j < MIN(itsPS.getInt("station.nchannels"), 10) ; j++) { + for (int i = 0; i < MIN(itsPS.getInt32("station.nbeamlets"), 1) ; i++) { + for (int j = 0; j < MIN(itsPS.getInt32("station.nchannels"), 10) ; j++) { cout << *((DH_Beamlet*)getDataManager().getOutHolder(i))->getBufferElement(j) << ' '; } cout << endl; @@ -131,7 +131,7 @@ namespace LOFAR void WH_SimStation::ReadData () { - std::streamsize buffersize = (NINPUT_BEAMLETS*itsPS.getInt("station.nchannels")+1)*sizeof(complex<float>); + std::streamsize buffersize = (NINPUT_BEAMLETS*itsPS.getInt32("station.nchannels")+1)*sizeof(complex<float>); char* InputBuffer = (char*)malloc(buffersize); ASSERTSTR( itsInputFile.is_open(), "WH_SimStation input file " @@ -147,7 +147,7 @@ namespace LOFAR itsInputFile.read(InputBuffer, buffersize); } - memcpy (itsData, InputBuffer, itsPS.getInt("station.nbeamlets")*itsPS.getInt("station.nchannels")*sizeof(complex<float>)); + memcpy (itsData, InputBuffer, itsPS.getInt32("station.nbeamlets")*itsPS.getInt32("station.nchannels")*sizeof(complex<float>)); free (InputBuffer); } }// namespace LOFAR diff --git a/CEP/Demo/OnLineProto/src/WH_SimStation.h b/CEP/Demo/OnLineProto/src/WH_SimStation.h index b4f80c0b668..a6e9e90b120 100644 --- a/CEP/Demo/OnLineProto/src/WH_SimStation.h +++ b/CEP/Demo/OnLineProto/src/WH_SimStation.h @@ -32,7 +32,7 @@ #include "OnLineProto/DH_TimeDist.h" #include <Common/Lorrays.h> #include <Common/lofar_complex.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <Common/lofar_fstream.h> #include <OnLineProto/definitions.h> @@ -48,7 +48,7 @@ public: explicit WH_SimStation (const string& name, const int nout, const string& fileName, - const ACC::ParameterSet& ps, + const ACC::APS::ParameterSet& ps, const int ID); virtual ~WH_SimStation(); @@ -57,7 +57,7 @@ public: static WorkHolder* construct (const string& name, const int nout, const string fileName, - const ACC::ParameterSet& ps, + const ACC::APS::ParameterSet& ps, const int ID); /// Make a fresh copy of the WH object. @@ -80,7 +80,7 @@ public: string itsFileName; ifstream itsInputFile; - ACC::ParameterSet itsPS; + ACC::APS::ParameterSet itsPS; int itsID; complex<float>* itsData; int itsCounter; diff --git a/CEP/Demo/OnLineProto/src/WH_Sync.cc b/CEP/Demo/OnLineProto/src/WH_Sync.cc index 8077fccfa2e..30ceaa56bb7 100644 --- a/CEP/Demo/OnLineProto/src/WH_Sync.cc +++ b/CEP/Demo/OnLineProto/src/WH_Sync.cc @@ -37,14 +37,14 @@ namespace LOFAR { WH_Sync::WH_Sync (const string& name, const int nbeamlets, - const ACC::ParameterSet& ps, + const ACC::APS::ParameterSet& ps, const int StationID) : WorkHolder (nbeamlets+1, nbeamlets, name,"WH_Sync"), itsPS (ps), itsStationID (StationID) { char str[8]; - int bs = itsPS.getInt("station.nchannels"); + int bs = itsPS.getInt32("station.nchannels"); for (int i = 0; i < nbeamlets; i++) { sprintf (str, "%d", i); @@ -55,7 +55,7 @@ WH_Sync::WH_Sync (const string& name, itsPS.getFloat(string("station.beamlet.") + str), itsPS.getFloat("station.chan_bw"), itsPS.getFloat("observation.ha_0"), - itsPS.getInt("station.nchannels"))); + itsPS.getInt32("station.nchannels"))); // create the output dataholders getDataManager().addOutDataHolder(i, new DH_Beamlet (string("out_") + str, @@ -63,7 +63,7 @@ WH_Sync::WH_Sync (const string& name, itsPS.getFloat(string("station.beamlet.") + str), itsPS.getFloat("station.chan_bw"), itsPS.getFloat("observation.ha_0"), - itsPS.getInt("station.nchannels"))); + itsPS.getInt32("station.nchannels"))); } } @@ -73,7 +73,7 @@ WH_Sync::~WH_Sync() WorkHolder* WH_Sync::construct (const string& name, const int nbeamlets, - const ACC::ParameterSet& ps, + const ACC::APS::ParameterSet& ps, const int StationID) { return new WH_Sync (name, nbeamlets, ps, StationID); @@ -96,9 +96,9 @@ void WH_Sync::process() ((DH_Beamlet*)getDataManager().getOutHolder(i))-> setElapsedTime(((DH_Beamlet*)getDataManager().getInHolder(i))->getElapsedTime()); - for (int j = 0; j < itsPS.getInt("station.nchannels"); j++) { + for (int j = 0; j < itsPS.getInt32("station.nchannels"); j++) { - if (itsPS.getInt("general.enable_fs") == 1) + if (itsPS.getInt32("general.enable_fs") == 1) { // apply phase shift *((DH_Beamlet*)getDataManager().getOutHolder(i))->getBufferElement(j) @@ -117,8 +117,8 @@ void WH_Sync::process() void WH_Sync::dump() { cout << "WH_Sync " << getName () << " Buffers:" << endl; - for (int i = 0; i < MIN(itsPS.getInt("station.nbeamlets"),1); i++) { - for (int j = 0; j < MIN(itsPS.getInt("station.nchannels"),10); j++) { + for (int i = 0; i < MIN(itsPS.getInt32("station.nbeamlets"),1); i++) { + for (int j = 0; j < MIN(itsPS.getInt32("station.nchannels"),10); j++) { cout << *((DH_Beamlet*)getDataManager().getOutHolder(i))->getBufferElement(j) << ' '; } cout << endl; diff --git a/CEP/Demo/OnLineProto/src/WH_Sync.h b/CEP/Demo/OnLineProto/src/WH_Sync.h index 00adc296363..3e169a1276b 100644 --- a/CEP/Demo/OnLineProto/src/WH_Sync.h +++ b/CEP/Demo/OnLineProto/src/WH_Sync.h @@ -28,7 +28,7 @@ #include "CEPFrame/WorkHolder.h" #include "OnLineProto/DH_Beamlet.h" #include "OnLineProto/DH_CorrectionMatrix.h" -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <OnLineProto/definitions.h> namespace LOFAR @@ -42,7 +42,7 @@ public: /// The first WorkHolder should have nin=0. explicit WH_Sync (const string& name, const int nbeamlets, - const ACC::ParameterSet& ps, + const ACC::APS::ParameterSet& ps, const int StationID); virtual ~WH_Sync(); @@ -50,7 +50,7 @@ public: /// Static function to create an object. static WorkHolder* construct (const string& name, const int nbeamlets, - const ACC::ParameterSet& ps, + const ACC::APS::ParameterSet& ps, const int StationID); /// Make a fresh copy of the WH object. @@ -69,7 +69,7 @@ private: /// Forbid assignment. WH_Sync& operator= (const WH_Sync&); - ACC::ParameterSet itsPS; + ACC::APS::ParameterSet itsPS; int itsStationID; int itsCounter; }; diff --git a/CEP/Demo/OnLineProto/src/WH_Transpose.cc b/CEP/Demo/OnLineProto/src/WH_Transpose.cc index b785bd882d5..02280862480 100644 --- a/CEP/Demo/OnLineProto/src/WH_Transpose.cc +++ b/CEP/Demo/OnLineProto/src/WH_Transpose.cc @@ -42,9 +42,9 @@ namespace LOFAR WH_Transpose::WH_Transpose (const string& name, unsigned int nin, unsigned int nout, - const ACC::ParameterSet& ps) + const ACC::APS::ParameterSet& ps) : WorkHolder (nin, nout, name,"WH_Transpose"), - itsFBW(ps.getInt("station.nchannels")), + itsFBW(ps.getInt32("station.nchannels")), itsIntegrationTime(0), itsPS(ps) { @@ -70,7 +70,7 @@ WH_Transpose::~WH_Transpose() WorkHolder* WH_Transpose::construct (const string& name, unsigned int nin, unsigned int nout, - const ACC::ParameterSet& ps) + const ACC::APS::ParameterSet& ps) { return new WH_Transpose (name, nin, nout, ps); } @@ -99,7 +99,7 @@ void WH_Transpose::process() // loop over input stations and channels within the corresponding beamlets for (int station=0; station< getDataManager().getInputs(); station++) { - for (int freq=0; freq<itsPS.getInt("station.nchannels"); freq++) { + for (int freq=0; freq<itsPS.getInt32("station.nchannels"); freq++) { // in this version we make the corrcube monochromatic (see assert above) // therefore the outholder channel corresponds to the freq. @@ -127,7 +127,7 @@ void WH_Transpose::process() } // keep track of the time channel itsIntegrationTime++; - if (itsIntegrationTime == itsPS.getInt("corr.tsize")-1) itsIntegrationTime=0; + if (itsIntegrationTime == itsPS.getInt32("corr.tsize")-1) itsIntegrationTime=0; cout << itsIntegrationTime << " "; } @@ -137,7 +137,7 @@ void WH_Transpose::dump() cout << "Dump WH_Transpose " << getName() << endl; cout << " input " << endl; int nrStations = getDataManager().getInputs(); - int nrFreq = itsPS.getInt("station.nchannels"); + int nrFreq = itsPS.getInt32("station.nchannels"); for (int station=0; station < nrStations ; station++) { cout << "in station=" << station << ": "; for (int freq=0; freq < nrFreq; freq++) { diff --git a/CEP/Demo/OnLineProto/src/WH_Transpose.h b/CEP/Demo/OnLineProto/src/WH_Transpose.h index 323215c3be2..53ae8ffab11 100644 --- a/CEP/Demo/OnLineProto/src/WH_Transpose.h +++ b/CEP/Demo/OnLineProto/src/WH_Transpose.h @@ -24,7 +24,7 @@ #define ONLINEPROTO_WH_TRANSPOSE_H #include <lofar_config.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include "tinyCEP/WorkHolder.h" @@ -45,7 +45,7 @@ public: explicit WH_Transpose (const string& name, unsigned int nin, unsigned int nout, - const ACC::ParameterSet& ps); + const ACC::APS::ParameterSet& ps); virtual ~WH_Transpose(); @@ -53,7 +53,7 @@ public: static WorkHolder* construct (const string& name, unsigned int nin, unsigned int nout, - const ACC::ParameterSet& ps); + const ACC::APS::ParameterSet& ps); /// Make a fresh copy of the WH object. virtual WH_Transpose* make (const string& name); @@ -74,7 +74,7 @@ private: int itsFBW; // frequency bandwidth of the DH_Beamlet int itsIntegrationTime; - const ACC::ParameterSet itsPS; + const ACC::APS::ParameterSet itsPS; }; } diff --git a/CEP/Demo/StationCorrelator/configure.in b/CEP/Demo/StationCorrelator/configure.in index 654bfc0106c..9c34c966c72 100644 --- a/CEP/Demo/StationCorrelator/configure.in +++ b/CEP/Demo/StationCorrelator/configure.in @@ -57,7 +57,8 @@ lofar_DOCXX lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h,,) lofar_INTERNAL(LCS/Transport,Transport,,1,Transport/DataHolder.h,,) -lofar_INTERNAL(LCS/ACC,ACC,,1,ACC/ParameterSet.h,,) +lofar_INTERNAL(LCS/ACC/APS,APS,,1,APS/ParameterSet.h,,) +lofar_INTERNAL(LCS/ACC/PLC,PLC,,1,PLC/ProcessControl.h,,) lofar_INTERNAL(CEP/CEPFrame,CEPFrame,,1,CEPFrame/DataManager.h,,) lofar_INTERNAL(CEP/tinyCEP,tinyCEP,,1,tinyCEP/TinyDataManager.h,,) lofar_INTERNAL(MAC/GCF/PALlight, PALlight, ,1, , GCF/PALlight/CEPPropertySet.h, gcfceppallight) diff --git a/CEP/Demo/StationCorrelator/src/StationCorrelatorController.cc b/CEP/Demo/StationCorrelator/src/StationCorrelatorController.cc index 9870e790f27..69c13afeaa9 100644 --- a/CEP/Demo/StationCorrelator/src/StationCorrelatorController.cc +++ b/CEP/Demo/StationCorrelator/src/StationCorrelatorController.cc @@ -26,15 +26,15 @@ #include <Common/LofarLogger.h> #include <tinyCEP/Profiler.h> -#include <ACC/ProcControlServer.h> -#include <ACC/ParameterSet.h> -#include <ACC/ProcessControl.h> +#include <PLC/ProcControlServer.h> +#include <APS/ParameterSet.h> +#include <PLC/ProcessControl.h> #include <StationCorrelator.h> #include <StationCorrelatorController.h> using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::PLC; StationCorrelatorController::StationCorrelatorController(StationCorrelator& stationCor, int noRuns) : itsStationCorrelator(stationCor), diff --git a/CEP/Demo/StationCorrelator/src/StationCorrelatorController.h b/CEP/Demo/StationCorrelator/src/StationCorrelatorController.h index 665eb8953a6..cb540a59d9e 100644 --- a/CEP/Demo/StationCorrelator/src/StationCorrelatorController.h +++ b/CEP/Demo/StationCorrelator/src/StationCorrelatorController.h @@ -26,14 +26,14 @@ #include <Common/LofarLogger.h> #include <tinyCEP/Profiler.h> -#include <ACC/ProcControlServer.h> -#include <ACC/ParameterSet.h> -#include <ACC/ProcessControl.h> +#include <PLC/ProcControlServer.h> +#include <APS/ParameterSet.h> +#include <PLC/ProcessControl.h> #include <StationCorrelator.h> using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::PLC; class StationCorrelatorController : public ProcessControl { diff --git a/CEP/Demo/StationCorrelator/src/StationCorrelatorMain.cc b/CEP/Demo/StationCorrelator/src/StationCorrelatorMain.cc index dd4bb24aa9c..49cad904682 100644 --- a/CEP/Demo/StationCorrelator/src/StationCorrelatorMain.cc +++ b/CEP/Demo/StationCorrelator/src/StationCorrelatorMain.cc @@ -31,15 +31,16 @@ #include <Transport/TH_MPI.h> #include <tinyCEP/Profiler.h> -#include <ACC/ProcControlServer.h> -#include <ACC/ParameterSet.h> -#include <ACC/ProcessControl.h> +#include <PLC/ProcControlServer.h> +#include <APS/ParameterSet.h> +#include <PLC/ProcessControl.h> #include <StationCorrelator.h> #include <ApplicationHolderController.h> using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; +using namespace LOFAR::ACC::PLC; diff --git a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/configure.in b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/configure.in index 1505ec6f2b4..d9f16446466 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/configure.in +++ b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/configure.in @@ -61,7 +61,7 @@ lofar_FFTW2(1) lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h,,) lofar_INTERNAL(LCS/Transport,Transport,,1,Transport/DataHolder.h,,) -lofar_INTERNAL(LCS/ACC,ACC,,1,ACC/ParameterSet.h,,) +lofar_INTERNAL(LCS/ACC/APS,APS,,1,APS/ParameterSet.h,,) lofar_INTERNAL(CEP/tinyCEP,tinyCEP,,1,tinyCEP/TinyDataManager.h,,) lofar_INTERNAL(CEP/Demo/TFlopCorrelator/TFC_Interface,TFC_Interface,,1,TFC_Interface/DH_RSP.h,,) diff --git a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/src/AH_BGLProcessing.cc b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/src/AH_BGLProcessing.cc index b1f99fb82b8..b901380022f 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/src/AH_BGLProcessing.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/src/AH_BGLProcessing.cc @@ -12,7 +12,7 @@ #include <lofar_config.h> #include <Common/lofar_iostream.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <AH_BGLProcessing.h> #include <TFC_Interface/Stub_FIR.h> @@ -63,7 +63,7 @@ void AH_BGLProcessing::undefine() { void AH_BGLProcessing::define(const LOFAR::KeyValueMap&) { LOG_TRACE_FLOW_STR("Start of AH_BGLProcessing::define()"); - int itsNFIRF = itsParamSet.getInt("NFIRF"); // number of FIR filters in the application + int itsNFIRF = itsParamSet.getInt32("NFIRF"); // number of FIR filters in the application int lowestFreeNode = 0; @@ -82,9 +82,9 @@ void AH_BGLProcessing::define(const LOFAR::KeyValueMap&) { LOG_TRACE_FLOW_STR("Create the FIR filter workholders"); char WH_Name[40]; - int noProcBlock = itsParamSet.getInt("NoProcessingBlocks"); - int noFiltsPerBlock = itsParamSet.getInt("NoFiltersPerBlock"); - int noCorsPerFilt = itsParamSet.getInt("NoCorsPerFilt"); + int noProcBlock = itsParamSet.getInt32("NoProcessingBlocks"); + int noFiltsPerBlock = itsParamSet.getInt32("NoFiltersPerBlock"); + int noCorsPerFilt = itsParamSet.getInt32("NoCorsPerFilt"); int subband = 0; for (int pb = 0; pb < noProcBlock; pb++) { int corID = 0; diff --git a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/src/WH_Correlator.cc b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/src/WH_Correlator.cc index 97d50dc6833..c6d5f8e6168 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/src/WH_Correlator.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/src/WH_Correlator.cc @@ -10,7 +10,7 @@ #include <stdio.h> // General includes -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <Common/LofarLogger.h> #ifdef HAVE_MPI @@ -38,11 +38,10 @@ WH_Correlator::WH_Correlator(const string& name) : itsNpolarisations (2) { - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); - //ParameterCollection myPC(myPS); - itsNelements = myPS.getInt("WH_Corr.stations"); - itsNsamples = myPS.getInt("WH_Corr.samples"); - itsNchannels = myPS.getInt("WH_Corr.channels"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); + itsNelements = myPS.getInt32("WH_Corr.stations"); + itsNsamples = myPS.getInt32("WH_Corr.samples"); + itsNchannels = myPS.getInt32("WH_Corr.channels"); itsNtargets = 0; // not used? getDataManager().addInDataHolder(0, new DH_CorrCube("in", 1)); diff --git a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/src/WH_FFT.cc b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/src/WH_FFT.cc index 9bbe7d52871..3197555048e 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/src/WH_FFT.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/src/WH_FFT.cc @@ -10,7 +10,7 @@ #include <lofar_config.h> //# Includes -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <WH_FFT.h> // #include <TFC_Interface/DH_PPF.h> @@ -23,12 +23,11 @@ using namespace LOFAR; WH_FFT::WH_FFT(const string& name) : WorkHolder( 1, 1, name, "WH_Correlator") { - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); - //ParameterCollection myPC(myPS); - itsNtaps = myPS.getInt("WH_FFT.taps"); - itsNSamples = myPS.getInt("WH_FFT.times"); - itsCpF = myPS.getInt("Corr_per_Filter"); - itsInputs = myPS.getInt("WH_FFT.inputs"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); + itsNtaps = myPS.getInt32("WH_FFT.taps"); + itsNSamples = myPS.getInt32("WH_FFT.times"); + itsCpF = myPS.getInt32("Corr_per_Filter"); + itsInputs = myPS.getInt32("WH_FFT.inputs"); // todo: Pr-correlation correction DH in channel 0 // getDataManager().addInDataHolder(0, new DH_??("input", itsSBID)); diff --git a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/src/WH_FIR.cc b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/src/WH_FIR.cc index fba94065865..3ebee63e5b6 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/src/WH_FIR.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/src/WH_FIR.cc @@ -10,7 +10,7 @@ #include <lofar_config.h> //# Includes -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <WH_FIR.h> #include <TFC_Interface/DH_FIR.h> @@ -24,14 +24,13 @@ WH_FIR::WH_FIR(const string& name, itsSBID (subBandID) { - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); - //ParameterCollection myPC(myPS); - itsNFilters = myPS.getInt("WH_FIR.filters"); - itsNtaps = myPS.getInt("WH_FIR.taps"); - itsNStations = myPS.getInt("WH_FIR.stations"); - itsNTimes = myPS.getInt("WH_FIR.times"); - itsNPol = myPS.getInt("WH_FIR.pols"); - itsFFTs = myPS.getInt("WH_FIR.FFTs"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); + itsNFilters = myPS.getInt32("WH_FIR.filters"); + itsNtaps = myPS.getInt32("WH_FIR.taps"); + itsNStations = myPS.getInt32("WH_FIR.stations"); + itsNTimes = myPS.getInt32("WH_FIR.times"); + itsNPol = myPS.getInt32("WH_FIR.pols"); + itsFFTs = myPS.getInt32("WH_FIR.FFTs"); getDataManager().addInDataHolder(0, new DH_FIR("input", itsSBID)); diff --git a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/test/tPPFilter.cc b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/test/tPPFilter.cc index a761df30cfc..3ebe48f675a 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/test/tPPFilter.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/test/tPPFilter.cc @@ -24,7 +24,7 @@ #include <lofar_config.h> //# Includes -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tPPFilter.h> #include <Transport/TH_Mem.h> diff --git a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/test/tWH_Correlator.cc b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/test/tWH_Correlator.cc index d3e4af1ed2a..bab637ecc7a 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/test/tWH_Correlator.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/test/tWH_Correlator.cc @@ -24,7 +24,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tWH_Correlator.h> #include <Transport/TH_Mem.h> diff --git a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/test/tWH_FFT.cc b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/test/tWH_FFT.cc index 9854a70447c..0ef3e8b9d75 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/test/tWH_FFT.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/test/tWH_FFT.cc @@ -24,7 +24,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tWH_FFT.h> #include <Transport/TH_Mem.h> diff --git a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/test/tWH_FIR.cc b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/test/tWH_FIR.cc index cb2a73625d5..e00c2521fce 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_BGLProc/test/tWH_FIR.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_BGLProc/test/tWH_FIR.cc @@ -24,7 +24,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tWH_FIR.h> #include <Transport/TH_Mem.h> diff --git a/CEP/Demo/TFlopCorrelator/TFC_DelayCompensation/configure.in b/CEP/Demo/TFlopCorrelator/TFC_DelayCompensation/configure.in index 903d71315ed..1a7c5ff0d7f 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_DelayCompensation/configure.in +++ b/CEP/Demo/TFlopCorrelator/TFC_DelayCompensation/configure.in @@ -60,7 +60,7 @@ lofar_LOG4CPLUS lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h,,) lofar_INTERNAL(LCS/Transport,Transport,,1,Transport/DataHolder.h,,) -lofar_INTERNAL(LCS/ACC,ACC,,1,ACC/ParameterSet.h,,) +lofar_INTERNAL(LCS/ACC/APS,APS,,1,APS/ParameterSet.h,,) lofar_INTERNAL(CEP/tinyCEP,tinyCEP,,1,tinyCEP/TinyDataManager.h,,) lofar_INTERNAL(CEP/CEPFrame,CEPFrame,,1,CEPFrame/DataManager.h,,) lofar_INTERNAL(CEP/Demo/TFlopCorrelator/TFC_Interface,TFC_Interface,,1,TFC_Interface/DH_RSP.h,,) diff --git a/CEP/Demo/TFlopCorrelator/TFC_DelayCompensation/src/AH_DelayCompensation.cc b/CEP/Demo/TFlopCorrelator/TFC_DelayCompensation/src/AH_DelayCompensation.cc index 81ed5907a27..4c9ebfbbb20 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_DelayCompensation/src/AH_DelayCompensation.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_DelayCompensation/src/AH_DelayCompensation.cc @@ -13,7 +13,7 @@ #include <TFC_DelayCompensation/AH_DelayCompensation.h> #include <TFC_DelayCompensation/WH_DelayControl.h> #include <Common/lofar_iostream.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <CEPFrame/Step.h> #include <TFC_Interface/Stub_Delay.h> @@ -39,7 +39,7 @@ void AH_DelayCompensation::define(const LOFAR::KeyValueMap& kvm) { Composite comp(0, 0, "topComposite"); setComposite(comp); // tell the AppllicationHolder this is the top-level compisite - int nRSP = itsParamSet.getInt("NRSP"); + int nRSP = itsParamSet.getInt32("NRSP"); WH_DelayControl delayWH("DelayContr", nRSP); Step delayStep(delayWH, "DelayContr"); comp.addBlock(delayStep); diff --git a/CEP/Demo/TFlopCorrelator/TFC_InputSection/configure.in b/CEP/Demo/TFlopCorrelator/TFC_InputSection/configure.in index 3f088bd5e86..73317c772f4 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_InputSection/configure.in +++ b/CEP/Demo/TFlopCorrelator/TFC_InputSection/configure.in @@ -60,7 +60,7 @@ lofar_LOG4CPLUS lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h,,) lofar_INTERNAL(LCS/Transport,Transport,,1,Transport/DataHolder.h,,) -lofar_INTERNAL(LCS/ACC,ACC,,1,ACC/ParameterSet.h,,) +lofar_INTERNAL(LCS/ACC/APS,APS,,1,APS/ParameterSet.h,,) lofar_INTERNAL(CEP/tinyCEP,tinyCEP,,1,tinyCEP/TinyDataManager.h,,) lofar_INTERNAL(CEP/CEPFrame,CEPFrame,,1,CEPFrame/DataManager.h,,) lofar_INTERNAL(CEP/Demo/TFlopCorrelator/TFC_Interface,TFC_Interface,,1,TFC_Interface/DH_RSP.h,,) diff --git a/CEP/Demo/TFlopCorrelator/TFC_InputSection/src/AH_InputSection.cc b/CEP/Demo/TFlopCorrelator/TFC_InputSection/src/AH_InputSection.cc index 44dea5d464f..4de0cc50cdc 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_InputSection/src/AH_InputSection.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_InputSection/src/AH_InputSection.cc @@ -12,7 +12,7 @@ #include <lofar_config.h> #include <Common/lofar_iostream.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <AH_InputSection.h> diff --git a/CEP/Demo/TFlopCorrelator/TFC_InputSection/src/WH_RSPInput.cc b/CEP/Demo/TFlopCorrelator/TFC_InputSection/src/WH_RSPInput.cc index 31943ed0538..dea7a5182e0 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_InputSection/src/WH_RSPInput.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_InputSection/src/WH_RSPInput.cc @@ -175,13 +175,13 @@ void* WriteToBufferThread(void* arguments) } WH_RSPInput::WH_RSPInput(const string& name, - const ACC::ParameterSet pset, + const ACC::APS::ParameterSet pset, const string device, const string srcMAC, const string destMAC, const bool isSyncMaster) : WorkHolder ((isSyncMaster ? 1 : 2), - 1 + (isSyncMaster ? pset.getInt("NoWH_RSP")-1 : 0), + 1 + (isSyncMaster ? pset.getInt32("NoWH_RSP")-1 : 0), name, "WH_RSPInput"), itsDevice(device), @@ -193,17 +193,17 @@ WH_RSPInput::WH_RSPInput(const string& name, char str[32]; // total amount of RSP-board interfaces - itsNRSPOutputs = pset.getInt("NoWH_RSP"); + itsNRSPOutputs = pset.getInt32("NoWH_RSP"); // number of EPA packets per RSP frame - itsNpackets = pset.getInt("NoPacketsInFrame"); + itsNpackets = pset.getInt32("NoPacketsInFrame"); // size of an EPA packet in bytes - int sizeofpacket = ( pset.getInt("polarisations") * + int sizeofpacket = ( pset.getInt32("polarisations") * sizeof(complex<int16>) * - pset.getInt("NoRSPBeamlets") + pset.getInt32("NoRSPBeamlets") ) + - pset.getInt("SzEPAheader"); + pset.getInt32("SzEPAheader"); // size of a RSP frame in bytes itsSzRSPframe = itsNpackets * sizeofpacket; @@ -243,7 +243,7 @@ WH_RSPInput::~WH_RSPInput() WorkHolder* WH_RSPInput::construct(const string& name, - const ACC::ParameterSet pset, + const ACC::APS::ParameterSet pset, const string device, const string srcMAC, const string destMAC, diff --git a/CEP/Demo/TFlopCorrelator/TFC_InputSection/src/WH_RSPInput.h b/CEP/Demo/TFlopCorrelator/TFC_InputSection/src/WH_RSPInput.h index 5f611a28944..a4d5f657a33 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_InputSection/src/WH_RSPInput.h +++ b/CEP/Demo/TFlopCorrelator/TFC_InputSection/src/WH_RSPInput.h @@ -23,7 +23,7 @@ #ifndef TFLOPCORRELATOR_WH_RSPINPUT_H #define TFLOPCORRELATOR_WH_RSPINPUT_H -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <Common/lofar_string.h> #include <tinyCEP/TinyDataManager.h> #include <tinyCEP/WorkHolder.h> @@ -64,7 +64,7 @@ namespace LOFAR //typedef TimeStamp timestamp_t; explicit WH_RSPInput(const string& name, - const ACC::ParameterSet pset, + const ACC::APS::ParameterSet pset, const string device, const string srcMAC, const string destMAC, @@ -72,7 +72,7 @@ namespace LOFAR virtual ~WH_RSPInput(); static WorkHolder* construct(const string& name, - const ACC::ParameterSet pset, + const ACC::APS::ParameterSet pset, const string device, const string srcMAC, const string destMAC, @@ -107,7 +107,7 @@ namespace LOFAR string itsSrcMAC; string itsDestMAC; - ACC::ParameterSet itsPset; + ACC::APS::ParameterSet itsPset; bool itsSyncMaster; int itsSzRSPframe; diff --git a/CEP/Demo/TFlopCorrelator/TFC_InputSection/src/WH_Transpose.cc b/CEP/Demo/TFlopCorrelator/TFC_InputSection/src/WH_Transpose.cc index eb36600af53..2cfe1926929 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_InputSection/src/WH_Transpose.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_InputSection/src/WH_Transpose.cc @@ -24,7 +24,7 @@ // General includes #include <Common/LofarLogger.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> // Application specific includes #include <WH_Transpose.h> @@ -42,7 +42,7 @@ WH_Transpose::WH_Transpose(const string& name, { char str[32]; - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); for (int i=0; i<itsNinputs; i++) { sprintf(str, "DH_in_%d", i); diff --git a/CEP/Demo/TFlopCorrelator/TFC_InputSection/test/tWH_Transpose.cc b/CEP/Demo/TFlopCorrelator/TFC_InputSection/test/tWH_Transpose.cc index d80b7c57c58..d051592576f 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_InputSection/test/tWH_Transpose.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_InputSection/test/tWH_Transpose.cc @@ -24,7 +24,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tWH_Transpose.h> #include <Transport/TH_Mem.h> @@ -54,7 +54,7 @@ namespace LOFAR void AH_Transpose::define(const KeyValueMap& kvm) { KeyValueMap myKvm(kvm); myKvm["NoWH_RSP"] = 2; - ACC::ParameterSet myPset; + ACC::APS::ParameterSet myPset; myPset["NoWH_RSP"] = 2; itsInDH1 = new DH_RSP("DH_RSP1", myPset); diff --git a/CEP/Demo/TFlopCorrelator/TFC_Interface/configure.in b/CEP/Demo/TFlopCorrelator/TFC_Interface/configure.in index 36a7e998866..c8c2d30eee5 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Interface/configure.in +++ b/CEP/Demo/TFlopCorrelator/TFC_Interface/configure.in @@ -60,7 +60,7 @@ lofar_LOG4CPLUS lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h,,) lofar_INTERNAL(LCS/Transport,Transport,,1,Transport/DataHolder.h,,) -lofar_INTERNAL(LCS/ACC,ACC,,1,ACC/ParameterSet.h,,) +lofar_INTERNAL(LCS/ACC/APS,APS,,1,APS/ParameterSet.h,,) dnl dnl Output Makefiles diff --git a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_CorrCube.cc b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_CorrCube.cc index 9e4404cea43..3db1d7cffd3 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_CorrCube.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_CorrCube.cc @@ -11,7 +11,7 @@ #include <lofar_config.h> #include <DH_CorrCube.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> namespace LOFAR { @@ -22,11 +22,11 @@ namespace LOFAR itsSubBand (subband), itsNPol (2) { - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); //ParameterCollection myPC(myPS); - itsNFChannels = myPS.getInt("DH_CorrCube.freqs"); - itsNStations = myPS.getInt("DH_CorrCube.stations"); - itsNTimes = myPS.getInt("DH_CorrCube.times"); + itsNFChannels = myPS.getInt32("DH_CorrCube.freqs"); + itsNStations = myPS.getInt32("DH_CorrCube.stations"); + itsNTimes = myPS.getInt32("DH_CorrCube.times"); } DH_CorrCube::DH_CorrCube(const DH_CorrCube& that) diff --git a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_FIR.cc b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_FIR.cc index e650e78328b..59e6203f71e 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_FIR.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_FIR.cc @@ -27,12 +27,11 @@ namespace LOFAR itsNPol (0), itsMatrix (0) { -// ACC::ParameterSet myPS("TFlopCorrelator.cfg"); -// //ParameterCollection myPC(myPS); -// itsNFChannels = myPS.getInt("WH_FIR.freqs"); -// itsNStations = myPS.getInt("WH_FIR.stations"); -// itsNTimes = myPS.getInt("WH_FIR.times"); -// itsNPol = myPS.getInt("WH_FIR.pols"); +// ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); +// itsNFChannels = myPS.getInt32("WH_FIR.freqs"); +// itsNStations = myPS.getInt32("WH_FIR.stations"); +// itsNTimes = myPS.getInt32("WH_FIR.times"); +// itsNPol = myPS.getInt32("WH_FIR.pols"); itsNFChannels = 2; itsNStations = 3; itsNTimes = 4; diff --git a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_PPF.cc b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_PPF.cc index d792906f8c3..1c7e01db02c 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_PPF.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_PPF.cc @@ -13,7 +13,7 @@ #include <lofar_config.h> #include <DH_PPF.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> namespace LOFAR @@ -25,12 +25,11 @@ namespace LOFAR itsBuffer (0), itsNSamples (0) { - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); -// //ParameterCollection myPC(myPS); - itsNSamples = myPS.getInt("DH_PPF.samples"); -// itsNStations = myPS.getInt("WH_SubBand.stations"); -// itsNTimes = myPS.getInt("WH_SubBand.times"); -// itsNPol = myPS.getInt("WH_SubBand.pols"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); + itsNSamples = myPS.getInt32("DH_PPF.samples"); +// itsNStations = myPS.getInt32("WH_SubBand.stations"); +// itsNTimes = myPS.getInt32("WH_SubBand.times"); +// itsNPol = myPS.getInt32("WH_SubBand.pols"); } DH_PPF::DH_PPF(const DH_PPF& that) diff --git a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_RSP.cc b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_RSP.cc index 0bb8a6df93e..7a62431a553 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_RSP.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_RSP.cc @@ -20,16 +20,16 @@ namespace LOFAR { DH_RSP::DH_RSP (const string& name, - const ACC::ParameterSet pset) + const ACC::APS::ParameterSet pset) : DataHolder (name, "DH_RSP"), itsBuffer (0), itsPSet (pset) { - itsEPAheaderSize = pset.getInt("SzEPAheader"); - itsNoBeamlets = pset.getInt("NoRSPBeamlets"); - itsNoPolarisations = pset.getInt("polarisations"); - const int NoPacketsInFrame = pset.getInt("NoPacketsInFrame"); + itsEPAheaderSize = pset.getInt32("SzEPAheader"); + itsNoBeamlets = pset.getInt32("NoRSPBeamlets"); + itsNoPolarisations = pset.getInt32("polarisations"); + const int NoPacketsInFrame = pset.getInt32("NoPacketsInFrame"); itsBufSize = NoPacketsInFrame * (itsEPAheaderSize + itsNoBeamlets * itsNoPolarisations * sizeof(complex<int16>)); } diff --git a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_RSP.h b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_RSP.h index 1297e59e4c2..9bf37e4ae1b 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_RSP.h +++ b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_RSP.h @@ -14,7 +14,7 @@ #define TFLOPCORRELATOR_DH_RSP_H -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <Transport/DataHolder.h> #include <TFC_Interface/RSPTimeStamp.h> @@ -27,7 +27,7 @@ public: typedef char BufferType; explicit DH_RSP (const string& name, - const ACC::ParameterSet pset); + const ACC::APS::ParameterSet pset); DH_RSP(const DH_RSP&); @@ -75,7 +75,7 @@ public: int itsNoPolarisations; unsigned int itsBufSize; - ACC::ParameterSet itsPSet; + ACC::APS::ParameterSet itsPSet; }; inline DH_RSP::BufferType* DH_RSP::getBuffer() diff --git a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_Vis.cc b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_Vis.cc index 2dd57fe9001..e7306a6c112 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_Vis.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/DH_Vis.cc @@ -11,7 +11,7 @@ ////////////////////////////////////////////////////////////////////// #include <lofar_config.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <DH_Vis.h> @@ -24,9 +24,8 @@ DH_Vis::DH_Vis (const string& name, short startfreq) itsStartFreq (startfreq), itsNPols (2) { - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); - //ParameterCollection myPC(myPS); - itsNStations = myPS.getInt("DH_CorrCube.stations"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); + itsNStations = myPS.getInt32("DH_CorrCube.stations"); } DH_Vis::DH_Vis(const DH_Vis& that) diff --git a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_Corr.cc b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_Corr.cc index 54ca4251b93..de98b41cc8c 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_Corr.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_Corr.cc @@ -11,10 +11,10 @@ #include <TFC_Interface/Stub_Corr.h> #include <Transport/TH_Socket.h> #include <Transport/Connection.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; namespace LOFAR { @@ -23,8 +23,8 @@ namespace LOFAR { itsTHs (0), itsConnections (0) { - itsPS = new ACC::ParameterSet("TFlopCorrelator.cfg"); - itsNCorr = itsPS->getInt("NSBF")/2; + itsPS = new ACC::APS::ParameterSet("TFlopCorrelator.cfg"); + itsNCorr = itsPS->getInt32("NSBF")/2; DBGASSERTSTR(NSBF%2 == 0, "NSBF should be an even number"); LOG_TRACE_FLOW_STR("Total number of Correlators in the Stub_Corr is " << itsNCorr); ASSERTSTR(itsNCorr >= 0, "Number of Correlators in the Stub_Corr must be greater than 0"); @@ -54,7 +54,7 @@ namespace LOFAR { DBGASSERTSTR(((C_nr >= 0) && (C_nr < itsNCorr)), "C_nr argument out of boundaries; " << C_nr << " / " << itsNCorr); - int port = itsPS->getInt("CorrConnection.RequestPort"); + int port = itsPS->getInt32("CorrConnection.RequestPort"); string service(formatString("%d", port)); if (itsStubOnServer) // on the cluster side, so start server socket diff --git a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_Corr.h b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_Corr.h index eb2ae6bdfcd..22dde39051c 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_Corr.h +++ b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_Corr.h @@ -10,7 +10,7 @@ #ifndef LOFAR_TFLOPCORRELATOR_CORRSTUB_H #define LOFAR_TFLOPCORRELATOR_CORRSTUB_H -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tinyCEP/TinyDataManager.h> namespace LOFAR { @@ -36,7 +36,7 @@ public: private: bool itsStubOnServer; - ACC::ParameterSet* itsPS; + ACC::APS::ParameterSet* itsPS; int itsNCorr; // total number of correlators in this interface TH_Socket** itsTHs; Connection** itsConnections; diff --git a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_Delay.cc b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_Delay.cc index 117b8dcaf7c..41bc6841d13 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_Delay.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_Delay.cc @@ -11,10 +11,10 @@ #include <TFC_Interface/Stub_Delay.h> #include <Transport/TH_Socket.h> #include <Transport/Connection.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; namespace LOFAR { @@ -23,8 +23,8 @@ Stub_Delay::Stub_Delay (bool isInput) itsTHs (0), itsConnections (0) { - itsPS = new ACC::ParameterSet("TFlopCorrelator.cfg"); - itsNRSP = itsPS->getInt("NRSP"); + itsPS = new ACC::APS::ParameterSet("TFlopCorrelator.cfg"); + itsNRSP = itsPS->getInt32("NRSP"); LOG_TRACE_FLOW_STR("Total number of RSPinputs in the Stub_Delay is " << itsNRSP); ASSERTSTR(itsNRSP >= 0, "Number of RSPinputs in the Stub_Delay must be greater than 0"); @@ -53,7 +53,7 @@ void Stub_Delay ::connect (int RSP_nr, DBGASSERTSTR(((RSP_nr >= 0) && (RSP_nr < itsNRSP)), "RSP_nr argument out of boundaries; " << RSP_nr << " / " << itsNRSP); - int port = itsPS->getInt("DelayConnection.RequestPort"); + int port = itsPS->getInt32("DelayConnection.RequestPort"); string service(formatString("%d", port)); if (itsIsInput) // on the input side, start a client socket diff --git a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_Delay.h b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_Delay.h index 77df2c9ef50..113202407fa 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_Delay.h +++ b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_Delay.h @@ -10,7 +10,7 @@ #ifndef LOFAR_TFC_INTERFACE_STUB_DELAY_H #define LOFAR_TFC_INTERFACE_STUB_DELAY_H -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tinyCEP/TinyDataManager.h> namespace LOFAR { @@ -36,7 +36,7 @@ public: private: bool itsIsInput; // Is this stub an input for a step - ACC::ParameterSet* itsPS; + ACC::APS::ParameterSet* itsPS; int itsNRSP; // total number of RSPinputs TH_Socket** itsTHs; Connection** itsConnections; diff --git a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_FIR.cc b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_FIR.cc index bdda2d70c3a..f776255dbb0 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_FIR.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_FIR.cc @@ -12,7 +12,7 @@ using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; namespace LOFAR { @@ -21,8 +21,8 @@ namespace LOFAR { itsTHs (0), itsConnections (0) { - itsPS = new ACC::ParameterSet("TFlopCorrelator.cfg"); - itsNFIRF = itsPS->getInt("NFIRF"); // number of SubBand filters in the application + itsPS = new ACC::APS::ParameterSet("TFlopCorrelator.cfg"); + itsNFIRF = itsPS->getInt32("NFIRF"); // number of SubBand filters in the application ASSERTSTR(itsNFIRF >= 0, "Number of subband filters must be greater than 0"); itsTHs = new TH_Socket*[itsNFIRF]; itsConnections = new Connection*[itsNFIRF]; @@ -51,7 +51,7 @@ namespace LOFAR { { DBGASSERTSTR(FIRF_nr <= itsNFIRF, "Subband filter number too large"); const ParameterSet myPS("TFlopCorrelator.cfg"); - int port = myPS.getInt("FIRConnection.RequestPort"); + int port = myPS.getInt32("FIRConnection.RequestPort"); string service(formatString("%d", port)); if (itsStubOnServer) // On the cluster side, so start a server socket { diff --git a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_FIR.h b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_FIR.h index e9ba835218c..2f4f828165f 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_FIR.h +++ b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_FIR.h @@ -11,7 +11,7 @@ #define LOFAR_TFLOPCORRELATOR_FIRSTUB_H #include <string> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tinyCEP/TinyDataManager.h> //#include <TFlopCorrelator/DH_FilterCoeff.h> @@ -39,7 +39,7 @@ public: private: bool itsStubOnServer; - ACC::ParameterSet* itsPS; + ACC::APS::ParameterSet* itsPS; int itsNFIRF; TH_Socket** itsTHs; Connection** itsConnections; diff --git a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_RSP.cc b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_RSP.cc index 2c7e8c30a98..78a0789bdd0 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_RSP.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_RSP.cc @@ -11,14 +11,14 @@ using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; namespace LOFAR { Stub_RSP::Stub_RSP (bool stubOnServer) : itsStubOnServer (stubOnServer) { - itsPS = new ACC::ParameterSet("TFlopCorrelator.cfg"); + itsPS = new ACC::APS::ParameterSet("TFlopCorrelator.cfg"); // todo: add DH_?? for pre-correlation correction factors // for (int i=0; i<itsNSBF; i++) { diff --git a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_RSP.h b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_RSP.h index 73c54a34bd6..228c554e74e 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_RSP.h +++ b/CEP/Demo/TFlopCorrelator/TFC_Interface/src/Stub_RSP.h @@ -11,7 +11,7 @@ #define LOFAR_TFLOPCORRELATOR_SBSTUB_H #include <string> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> namespace LOFAR { @@ -32,7 +32,7 @@ public: private: bool itsStubOnServer; - ACC::ParameterSet* itsPS; + ACC::APS::ParameterSet* itsPS; }; } //namespace diff --git a/CEP/Demo/TFlopCorrelator/TFC_Storage/configure.in b/CEP/Demo/TFlopCorrelator/TFC_Storage/configure.in index 3a4009b1e04..e1d483e4648 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Storage/configure.in +++ b/CEP/Demo/TFlopCorrelator/TFC_Storage/configure.in @@ -61,7 +61,7 @@ lofar_AIPSPP(1,"-lms -lmeasures -ltables -lscimath -lscimath_f -lcasa") lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h,,) lofar_INTERNAL(LCS/Transport,Transport,,1,Transport/DataHolder.h,,) -lofar_INTERNAL(LCS/ACC,ACC,,1,ACC/ParameterSet.h,,) +lofar_INTERNAL(LCS/ACC/APS,APS,,1,APS/ParameterSet.h,,) lofar_INTERNAL(CEP/tinyCEP,tinyCEP,,1,tinyCEP/TinyDataManager.h,,) lofar_INTERNAL(CEP/CEPFrame,CEPFrame,,1,CEPFrame/DataManager.h,,) lofar_INTERNAL(CEP/Demo/TFlopCorrelator/TFC_Interface,TFC_Interface,,1,TFC_Interface/DH_RSP.h,,) diff --git a/CEP/Demo/TFlopCorrelator/TFC_Storage/src/AH_Storage.cc b/CEP/Demo/TFlopCorrelator/TFC_Storage/src/AH_Storage.cc index 90ca12c1425..ca8d3a2fc80 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Storage/src/AH_Storage.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_Storage/src/AH_Storage.cc @@ -12,7 +12,7 @@ #include <lofar_config.h> #include <Common/lofar_iostream.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <AH_Storage.h> #include <TFC_Interface/Stub_Corr.h> #include <TFC_Storage/WH_Storage.h> @@ -46,7 +46,7 @@ void AH_Storage::define(const LOFAR::KeyValueMap&) { undefine(); int lowestFreeNode = 0; - itsNSBF = itsParamSet.getInt("NSBF"); // number of SubBand filters in the application + itsNSBF = itsParamSet.getInt32("NSBF"); // number of SubBand filters in the application LOG_TRACE_FLOW_STR("Create the top-level composite"); diff --git a/CEP/Demo/TFlopCorrelator/TFC_Storage/src/WH_Storage.cc b/CEP/Demo/TFlopCorrelator/TFC_Storage/src/WH_Storage.cc index ba9504286f5..2a9fc3cbaab 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Storage/src/WH_Storage.cc +++ b/CEP/Demo/TFlopCorrelator/TFC_Storage/src/WH_Storage.cc @@ -24,7 +24,7 @@ // General includes #include <Common/LofarLogger.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> // Application specific includes #include <TFC_Storage/WH_Storage.h> @@ -33,8 +33,8 @@ using namespace LOFAR; WH_Storage::WH_Storage(const string& name, - const ACC::ParameterSet& pset) - : WorkHolder (pset.getInt("NSBF")/2, + const ACC::APS::ParameterSet& pset) + : WorkHolder (pset.getInt32("NSBF")/2, 0, name, "WH_Storage"), @@ -53,7 +53,7 @@ WH_Storage::~WH_Storage() { } WorkHolder* WH_Storage::construct(const string& name, - const ACC::ParameterSet& pset) + const ACC::APS::ParameterSet& pset) { return new WH_Storage(name, pset); } diff --git a/CEP/Demo/TFlopCorrelator/TFC_Storage/src/WH_Storage.h b/CEP/Demo/TFlopCorrelator/TFC_Storage/src/WH_Storage.h index 4a96f992f9f..b5de33cf45d 100644 --- a/CEP/Demo/TFlopCorrelator/TFC_Storage/src/WH_Storage.h +++ b/CEP/Demo/TFlopCorrelator/TFC_Storage/src/WH_Storage.h @@ -35,11 +35,11 @@ namespace LOFAR public: explicit WH_Storage(const string& name, - const ACC::ParameterSet& pset); + const ACC::APS::ParameterSet& pset); virtual ~WH_Storage(); static WorkHolder* construct(const string& name, - const ACC::ParameterSet& pset); + const ACC::APS::ParameterSet& pset); virtual WH_Storage* make(const string& name); virtual void process(); @@ -50,7 +50,7 @@ namespace LOFAR /// forbid assignment WH_Storage& operator= (const WH_Storage&); - const ACC::ParameterSet& itsPS; + const ACC::APS::ParameterSet& itsPS; }; } // namespace LOFAR diff --git a/CEP/Tools/AccepTest1/configure.in b/CEP/Tools/AccepTest1/configure.in index a4f4ba437a1..a7e0a304c1e 100644 --- a/CEP/Tools/AccepTest1/configure.in +++ b/CEP/Tools/AccepTest1/configure.in @@ -57,6 +57,7 @@ lofar_DOCXX lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h,,) lofar_INTERNAL(LCS/Transport,Transport,,1,Transport/DataHolder.h,,) +lofar_INTERNAL(LCS/ACC/APS,APS,,1,APS/ParameterSet.h,,) lofar_INTERNAL(CEP/tinyCEP,tinyCEP,,1,tinyCEP/TinyDataManager.h,,) dnl diff --git a/CEP/Tools/AccepTest1/src/BackEndStub.cc b/CEP/Tools/AccepTest1/src/BackEndStub.cc index 8bc73c0b30b..8e69f58ca83 100644 --- a/CEP/Tools/AccepTest1/src/BackEndStub.cc +++ b/CEP/Tools/AccepTest1/src/BackEndStub.cc @@ -8,10 +8,10 @@ #include <DFTServer/BackEndStub.h> #include <Transport/TH_Socket.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; namespace LOFAR { @@ -46,7 +46,7 @@ namespace LOFAR { const ParameterSet myPS(itsParmFileName); std::string FEIP = myPS.getString("BEConnection.FEIP"); - int Port = myPS.getInt("BEConnection.FE_Port_Offset") + corrNo; + int Port = myPS.getInt32("BEConnection.FE_Port_Offset") + corrNo; LOG_TRACE_FLOW_STR("Create Socket" << " FE IP = " << FEIP << " Port = " << Port ); diff --git a/CEP/Tools/AccepTest1/src/FrontEndStub.cc b/CEP/Tools/AccepTest1/src/FrontEndStub.cc index 5980148d69a..087ceb268e0 100644 --- a/CEP/Tools/AccepTest1/src/FrontEndStub.cc +++ b/CEP/Tools/AccepTest1/src/FrontEndStub.cc @@ -8,10 +8,10 @@ #include <DFTServer/FrontEndStub.h> #include <Transport/TH_Socket.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; namespace LOFAR { @@ -44,7 +44,7 @@ namespace LOFAR { const ParameterSet myPS(itsParmFileName); std::string FEIP = myPS.getString("FEConnection.FEIP"); - int Port = myPS.getInt("FEConnection.FE_Port_Offset") + corrNo; + int Port = myPS.getInt32("FEConnection.FE_Port_Offset") + corrNo; LOG_TRACE_FLOW_STR("Create Socket" << " FE IP = " << FEIP << " Port = " << Port ); diff --git a/CEP/tinyCEP/configure.in b/CEP/tinyCEP/configure.in index c1d55fb0771..807407326aa 100644 --- a/CEP/tinyCEP/configure.in +++ b/CEP/tinyCEP/configure.in @@ -60,7 +60,8 @@ lofar_LOG4CPLUS lofar_MPI lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h,,) lofar_INTERNAL(LCS/Transport,Transport,,1,Transport/DataHolder.h,,) -lofar_INTERNAL(LCS/ACC,ACC,,1,ACC/ParameterSet.h,,) +lofar_INTERNAL(LCS/ACC/APS,APS,,1,APS/ParameterSet.h,,) +lofar_INTERNAL(LCS/ACC/PLC,PLC,,1,PLC/ProcessControl.h,,) dnl dnl Output Makefiles diff --git a/CEP/tinyCEP/src/ApplicationHolderController.cc b/CEP/tinyCEP/src/ApplicationHolderController.cc index ed0741b04a9..72f9dda795c 100644 --- a/CEP/tinyCEP/src/ApplicationHolderController.cc +++ b/CEP/tinyCEP/src/ApplicationHolderController.cc @@ -27,14 +27,15 @@ #include <Common/LofarLogger.h> #include <tinyCEP/Profiler.h> -#include <ACC/ProcControlServer.h> -#include <ACC/ParameterSet.h> -#include <ACC/ProcessControl.h> +#include <PLC/ProcControlServer.h> +#include <PLC/ProcessControl.h> +#include <APS/ParameterSet.h> #include <ApplicationHolderController.h> using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; +using namespace LOFAR::ACC::PLC; ApplicationHolderController::ApplicationHolderController(TinyApplicationHolder& AH, int noRuns) : itsAH(AH), @@ -153,7 +154,7 @@ int ApplicationHolderController::main (int argc, const char* argv[]) { if (itsPCcomm == 0) { itsPCcomm = new ProcControlServer(itsParamSet.getString("ACnode"), - itsParamSet.getInt("ACport"), + itsParamSet.getUint16("ACport"), this); } diff --git a/CEP/tinyCEP/src/ApplicationHolderController.h b/CEP/tinyCEP/src/ApplicationHolderController.h index 908f75e3689..0522563339d 100644 --- a/CEP/tinyCEP/src/ApplicationHolderController.h +++ b/CEP/tinyCEP/src/ApplicationHolderController.h @@ -29,14 +29,12 @@ #include <Common/LofarLogger.h> #include <tinyCEP/Profiler.h> -#include <ACC/ProcControlServer.h> -#include <ACC/ParameterSet.h> -#include <ACC/ProcessControl.h> +#include <PLC/ProcControlServer.h> #include <tinyCEP/TinyApplicationHolder.h> using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::PLC; class ApplicationHolderController : public ProcessControl { diff --git a/CEP/tinyCEP/src/TinyApplicationHolder.cc b/CEP/tinyCEP/src/TinyApplicationHolder.cc index 1e64000a08b..028e8501f31 100644 --- a/CEP/tinyCEP/src/TinyApplicationHolder.cc +++ b/CEP/tinyCEP/src/TinyApplicationHolder.cc @@ -115,7 +115,7 @@ namespace LOFAR *argv = itsArgv; } - void TinyApplicationHolder::setParameters (const ACC::ParameterSet& params) { + void TinyApplicationHolder::setParameters (const ACC::APS::ParameterSet& params) { itsParamSet = params; } diff --git a/CEP/tinyCEP/src/TinyApplicationHolder.h b/CEP/tinyCEP/src/TinyApplicationHolder.h index 597bf5dac48..31b338d1df7 100644 --- a/CEP/tinyCEP/src/TinyApplicationHolder.h +++ b/CEP/tinyCEP/src/TinyApplicationHolder.h @@ -30,7 +30,7 @@ //# Includes #include <tinyCEP/TinyDataManager.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <Common/KeyValueMap.h> @@ -54,7 +54,7 @@ namespace LOFAR void getarg (int* argc, const char** argv[]); /// Set the parameters with an ACC parameterset - void setParameters (const ACC::ParameterSet& params); + void setParameters (const ACC::APS::ParameterSet& params); virtual void baseDefine (const KeyValueMap& params = KeyValueMap()); virtual void baseCheck(); @@ -105,7 +105,7 @@ namespace LOFAR protected: int itsArgc; const char** itsArgv; - ACC::ParameterSet itsParamSet; + ACC::APS::ParameterSet itsParamSet; private: diff --git a/Demo/CEP/StationCorrelator/configure.in b/Demo/CEP/StationCorrelator/configure.in index 654bfc0106c..9c34c966c72 100644 --- a/Demo/CEP/StationCorrelator/configure.in +++ b/Demo/CEP/StationCorrelator/configure.in @@ -57,7 +57,8 @@ lofar_DOCXX lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h,,) lofar_INTERNAL(LCS/Transport,Transport,,1,Transport/DataHolder.h,,) -lofar_INTERNAL(LCS/ACC,ACC,,1,ACC/ParameterSet.h,,) +lofar_INTERNAL(LCS/ACC/APS,APS,,1,APS/ParameterSet.h,,) +lofar_INTERNAL(LCS/ACC/PLC,PLC,,1,PLC/ProcessControl.h,,) lofar_INTERNAL(CEP/CEPFrame,CEPFrame,,1,CEPFrame/DataManager.h,,) lofar_INTERNAL(CEP/tinyCEP,tinyCEP,,1,tinyCEP/TinyDataManager.h,,) lofar_INTERNAL(MAC/GCF/PALlight, PALlight, ,1, , GCF/PALlight/CEPPropertySet.h, gcfceppallight) diff --git a/Demo/CEP/StationCorrelator/src/StationCorrelatorController.cc b/Demo/CEP/StationCorrelator/src/StationCorrelatorController.cc index 9870e790f27..69c13afeaa9 100644 --- a/Demo/CEP/StationCorrelator/src/StationCorrelatorController.cc +++ b/Demo/CEP/StationCorrelator/src/StationCorrelatorController.cc @@ -26,15 +26,15 @@ #include <Common/LofarLogger.h> #include <tinyCEP/Profiler.h> -#include <ACC/ProcControlServer.h> -#include <ACC/ParameterSet.h> -#include <ACC/ProcessControl.h> +#include <PLC/ProcControlServer.h> +#include <APS/ParameterSet.h> +#include <PLC/ProcessControl.h> #include <StationCorrelator.h> #include <StationCorrelatorController.h> using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::PLC; StationCorrelatorController::StationCorrelatorController(StationCorrelator& stationCor, int noRuns) : itsStationCorrelator(stationCor), diff --git a/Demo/CEP/StationCorrelator/src/StationCorrelatorController.h b/Demo/CEP/StationCorrelator/src/StationCorrelatorController.h index 665eb8953a6..cb540a59d9e 100644 --- a/Demo/CEP/StationCorrelator/src/StationCorrelatorController.h +++ b/Demo/CEP/StationCorrelator/src/StationCorrelatorController.h @@ -26,14 +26,14 @@ #include <Common/LofarLogger.h> #include <tinyCEP/Profiler.h> -#include <ACC/ProcControlServer.h> -#include <ACC/ParameterSet.h> -#include <ACC/ProcessControl.h> +#include <PLC/ProcControlServer.h> +#include <APS/ParameterSet.h> +#include <PLC/ProcessControl.h> #include <StationCorrelator.h> using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::PLC; class StationCorrelatorController : public ProcessControl { diff --git a/Demo/CEP/StationCorrelator/src/StationCorrelatorMain.cc b/Demo/CEP/StationCorrelator/src/StationCorrelatorMain.cc index dd4bb24aa9c..49cad904682 100644 --- a/Demo/CEP/StationCorrelator/src/StationCorrelatorMain.cc +++ b/Demo/CEP/StationCorrelator/src/StationCorrelatorMain.cc @@ -31,15 +31,16 @@ #include <Transport/TH_MPI.h> #include <tinyCEP/Profiler.h> -#include <ACC/ProcControlServer.h> -#include <ACC/ParameterSet.h> -#include <ACC/ProcessControl.h> +#include <PLC/ProcControlServer.h> +#include <APS/ParameterSet.h> +#include <PLC/ProcessControl.h> #include <StationCorrelator.h> #include <ApplicationHolderController.h> using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; +using namespace LOFAR::ACC::PLC; diff --git a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/configure.in b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/configure.in index 1505ec6f2b4..d9f16446466 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/configure.in +++ b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/configure.in @@ -61,7 +61,7 @@ lofar_FFTW2(1) lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h,,) lofar_INTERNAL(LCS/Transport,Transport,,1,Transport/DataHolder.h,,) -lofar_INTERNAL(LCS/ACC,ACC,,1,ACC/ParameterSet.h,,) +lofar_INTERNAL(LCS/ACC/APS,APS,,1,APS/ParameterSet.h,,) lofar_INTERNAL(CEP/tinyCEP,tinyCEP,,1,tinyCEP/TinyDataManager.h,,) lofar_INTERNAL(CEP/Demo/TFlopCorrelator/TFC_Interface,TFC_Interface,,1,TFC_Interface/DH_RSP.h,,) diff --git a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/AH_BGLProcessing.cc b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/AH_BGLProcessing.cc index b1f99fb82b8..b901380022f 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/AH_BGLProcessing.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/AH_BGLProcessing.cc @@ -12,7 +12,7 @@ #include <lofar_config.h> #include <Common/lofar_iostream.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <AH_BGLProcessing.h> #include <TFC_Interface/Stub_FIR.h> @@ -63,7 +63,7 @@ void AH_BGLProcessing::undefine() { void AH_BGLProcessing::define(const LOFAR::KeyValueMap&) { LOG_TRACE_FLOW_STR("Start of AH_BGLProcessing::define()"); - int itsNFIRF = itsParamSet.getInt("NFIRF"); // number of FIR filters in the application + int itsNFIRF = itsParamSet.getInt32("NFIRF"); // number of FIR filters in the application int lowestFreeNode = 0; @@ -82,9 +82,9 @@ void AH_BGLProcessing::define(const LOFAR::KeyValueMap&) { LOG_TRACE_FLOW_STR("Create the FIR filter workholders"); char WH_Name[40]; - int noProcBlock = itsParamSet.getInt("NoProcessingBlocks"); - int noFiltsPerBlock = itsParamSet.getInt("NoFiltersPerBlock"); - int noCorsPerFilt = itsParamSet.getInt("NoCorsPerFilt"); + int noProcBlock = itsParamSet.getInt32("NoProcessingBlocks"); + int noFiltsPerBlock = itsParamSet.getInt32("NoFiltersPerBlock"); + int noCorsPerFilt = itsParamSet.getInt32("NoCorsPerFilt"); int subband = 0; for (int pb = 0; pb < noProcBlock; pb++) { int corID = 0; diff --git a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/Attic/AH_BGLProcessing.cc b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/Attic/AH_BGLProcessing.cc index b1f99fb82b8..b901380022f 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/Attic/AH_BGLProcessing.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/Attic/AH_BGLProcessing.cc @@ -12,7 +12,7 @@ #include <lofar_config.h> #include <Common/lofar_iostream.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <AH_BGLProcessing.h> #include <TFC_Interface/Stub_FIR.h> @@ -63,7 +63,7 @@ void AH_BGLProcessing::undefine() { void AH_BGLProcessing::define(const LOFAR::KeyValueMap&) { LOG_TRACE_FLOW_STR("Start of AH_BGLProcessing::define()"); - int itsNFIRF = itsParamSet.getInt("NFIRF"); // number of FIR filters in the application + int itsNFIRF = itsParamSet.getInt32("NFIRF"); // number of FIR filters in the application int lowestFreeNode = 0; @@ -82,9 +82,9 @@ void AH_BGLProcessing::define(const LOFAR::KeyValueMap&) { LOG_TRACE_FLOW_STR("Create the FIR filter workholders"); char WH_Name[40]; - int noProcBlock = itsParamSet.getInt("NoProcessingBlocks"); - int noFiltsPerBlock = itsParamSet.getInt("NoFiltersPerBlock"); - int noCorsPerFilt = itsParamSet.getInt("NoCorsPerFilt"); + int noProcBlock = itsParamSet.getInt32("NoProcessingBlocks"); + int noFiltsPerBlock = itsParamSet.getInt32("NoFiltersPerBlock"); + int noCorsPerFilt = itsParamSet.getInt32("NoCorsPerFilt"); int subband = 0; for (int pb = 0; pb < noProcBlock; pb++) { int corID = 0; diff --git a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/Attic/WH_Correlator.cc b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/Attic/WH_Correlator.cc index 97d50dc6833..c6d5f8e6168 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/Attic/WH_Correlator.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/Attic/WH_Correlator.cc @@ -10,7 +10,7 @@ #include <stdio.h> // General includes -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <Common/LofarLogger.h> #ifdef HAVE_MPI @@ -38,11 +38,10 @@ WH_Correlator::WH_Correlator(const string& name) : itsNpolarisations (2) { - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); - //ParameterCollection myPC(myPS); - itsNelements = myPS.getInt("WH_Corr.stations"); - itsNsamples = myPS.getInt("WH_Corr.samples"); - itsNchannels = myPS.getInt("WH_Corr.channels"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); + itsNelements = myPS.getInt32("WH_Corr.stations"); + itsNsamples = myPS.getInt32("WH_Corr.samples"); + itsNchannels = myPS.getInt32("WH_Corr.channels"); itsNtargets = 0; // not used? getDataManager().addInDataHolder(0, new DH_CorrCube("in", 1)); diff --git a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/WH_Correlator.cc b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/WH_Correlator.cc index 97d50dc6833..c6d5f8e6168 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/WH_Correlator.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/WH_Correlator.cc @@ -10,7 +10,7 @@ #include <stdio.h> // General includes -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <Common/LofarLogger.h> #ifdef HAVE_MPI @@ -38,11 +38,10 @@ WH_Correlator::WH_Correlator(const string& name) : itsNpolarisations (2) { - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); - //ParameterCollection myPC(myPS); - itsNelements = myPS.getInt("WH_Corr.stations"); - itsNsamples = myPS.getInt("WH_Corr.samples"); - itsNchannels = myPS.getInt("WH_Corr.channels"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); + itsNelements = myPS.getInt32("WH_Corr.stations"); + itsNsamples = myPS.getInt32("WH_Corr.samples"); + itsNchannels = myPS.getInt32("WH_Corr.channels"); itsNtargets = 0; // not used? getDataManager().addInDataHolder(0, new DH_CorrCube("in", 1)); diff --git a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/WH_FFT.cc b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/WH_FFT.cc index 9bbe7d52871..3197555048e 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/WH_FFT.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/WH_FFT.cc @@ -10,7 +10,7 @@ #include <lofar_config.h> //# Includes -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <WH_FFT.h> // #include <TFC_Interface/DH_PPF.h> @@ -23,12 +23,11 @@ using namespace LOFAR; WH_FFT::WH_FFT(const string& name) : WorkHolder( 1, 1, name, "WH_Correlator") { - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); - //ParameterCollection myPC(myPS); - itsNtaps = myPS.getInt("WH_FFT.taps"); - itsNSamples = myPS.getInt("WH_FFT.times"); - itsCpF = myPS.getInt("Corr_per_Filter"); - itsInputs = myPS.getInt("WH_FFT.inputs"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); + itsNtaps = myPS.getInt32("WH_FFT.taps"); + itsNSamples = myPS.getInt32("WH_FFT.times"); + itsCpF = myPS.getInt32("Corr_per_Filter"); + itsInputs = myPS.getInt32("WH_FFT.inputs"); // todo: Pr-correlation correction DH in channel 0 // getDataManager().addInDataHolder(0, new DH_??("input", itsSBID)); diff --git a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/WH_FIR.cc b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/WH_FIR.cc index fba94065865..3ebee63e5b6 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/WH_FIR.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/src/WH_FIR.cc @@ -10,7 +10,7 @@ #include <lofar_config.h> //# Includes -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <WH_FIR.h> #include <TFC_Interface/DH_FIR.h> @@ -24,14 +24,13 @@ WH_FIR::WH_FIR(const string& name, itsSBID (subBandID) { - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); - //ParameterCollection myPC(myPS); - itsNFilters = myPS.getInt("WH_FIR.filters"); - itsNtaps = myPS.getInt("WH_FIR.taps"); - itsNStations = myPS.getInt("WH_FIR.stations"); - itsNTimes = myPS.getInt("WH_FIR.times"); - itsNPol = myPS.getInt("WH_FIR.pols"); - itsFFTs = myPS.getInt("WH_FIR.FFTs"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); + itsNFilters = myPS.getInt32("WH_FIR.filters"); + itsNtaps = myPS.getInt32("WH_FIR.taps"); + itsNStations = myPS.getInt32("WH_FIR.stations"); + itsNTimes = myPS.getInt32("WH_FIR.times"); + itsNPol = myPS.getInt32("WH_FIR.pols"); + itsFFTs = myPS.getInt32("WH_FIR.FFTs"); getDataManager().addInDataHolder(0, new DH_FIR("input", itsSBID)); diff --git a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/Attic/tWH_Correlator.cc b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/Attic/tWH_Correlator.cc index d3e4af1ed2a..bab637ecc7a 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/Attic/tWH_Correlator.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/Attic/tWH_Correlator.cc @@ -24,7 +24,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tWH_Correlator.h> #include <Transport/TH_Mem.h> diff --git a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/tPPFilter.cc b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/tPPFilter.cc index a761df30cfc..3ebe48f675a 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/tPPFilter.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/tPPFilter.cc @@ -24,7 +24,7 @@ #include <lofar_config.h> //# Includes -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tPPFilter.h> #include <Transport/TH_Mem.h> diff --git a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/tWH_Correlator.cc b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/tWH_Correlator.cc index d3e4af1ed2a..bab637ecc7a 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/tWH_Correlator.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/tWH_Correlator.cc @@ -24,7 +24,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tWH_Correlator.h> #include <Transport/TH_Mem.h> diff --git a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/tWH_FFT.cc b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/tWH_FFT.cc index 9854a70447c..0ef3e8b9d75 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/tWH_FFT.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/tWH_FFT.cc @@ -24,7 +24,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tWH_FFT.h> #include <Transport/TH_Mem.h> diff --git a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/tWH_FIR.cc b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/tWH_FIR.cc index cb2a73625d5..e00c2521fce 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/tWH_FIR.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_BGLProc/test/tWH_FIR.cc @@ -24,7 +24,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tWH_FIR.h> #include <Transport/TH_Mem.h> diff --git a/Demo/CEP/TFlopCorrelator/TFC_DelayCompensation/configure.in b/Demo/CEP/TFlopCorrelator/TFC_DelayCompensation/configure.in index 903d71315ed..1a7c5ff0d7f 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_DelayCompensation/configure.in +++ b/Demo/CEP/TFlopCorrelator/TFC_DelayCompensation/configure.in @@ -60,7 +60,7 @@ lofar_LOG4CPLUS lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h,,) lofar_INTERNAL(LCS/Transport,Transport,,1,Transport/DataHolder.h,,) -lofar_INTERNAL(LCS/ACC,ACC,,1,ACC/ParameterSet.h,,) +lofar_INTERNAL(LCS/ACC/APS,APS,,1,APS/ParameterSet.h,,) lofar_INTERNAL(CEP/tinyCEP,tinyCEP,,1,tinyCEP/TinyDataManager.h,,) lofar_INTERNAL(CEP/CEPFrame,CEPFrame,,1,CEPFrame/DataManager.h,,) lofar_INTERNAL(CEP/Demo/TFlopCorrelator/TFC_Interface,TFC_Interface,,1,TFC_Interface/DH_RSP.h,,) diff --git a/Demo/CEP/TFlopCorrelator/TFC_DelayCompensation/src/AH_DelayCompensation.cc b/Demo/CEP/TFlopCorrelator/TFC_DelayCompensation/src/AH_DelayCompensation.cc index 81ed5907a27..4c9ebfbbb20 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_DelayCompensation/src/AH_DelayCompensation.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_DelayCompensation/src/AH_DelayCompensation.cc @@ -13,7 +13,7 @@ #include <TFC_DelayCompensation/AH_DelayCompensation.h> #include <TFC_DelayCompensation/WH_DelayControl.h> #include <Common/lofar_iostream.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <CEPFrame/Step.h> #include <TFC_Interface/Stub_Delay.h> @@ -39,7 +39,7 @@ void AH_DelayCompensation::define(const LOFAR::KeyValueMap& kvm) { Composite comp(0, 0, "topComposite"); setComposite(comp); // tell the AppllicationHolder this is the top-level compisite - int nRSP = itsParamSet.getInt("NRSP"); + int nRSP = itsParamSet.getInt32("NRSP"); WH_DelayControl delayWH("DelayContr", nRSP); Step delayStep(delayWH, "DelayContr"); comp.addBlock(delayStep); diff --git a/Demo/CEP/TFlopCorrelator/TFC_InputSection/configure.in b/Demo/CEP/TFlopCorrelator/TFC_InputSection/configure.in index 3f088bd5e86..73317c772f4 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_InputSection/configure.in +++ b/Demo/CEP/TFlopCorrelator/TFC_InputSection/configure.in @@ -60,7 +60,7 @@ lofar_LOG4CPLUS lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h,,) lofar_INTERNAL(LCS/Transport,Transport,,1,Transport/DataHolder.h,,) -lofar_INTERNAL(LCS/ACC,ACC,,1,ACC/ParameterSet.h,,) +lofar_INTERNAL(LCS/ACC/APS,APS,,1,APS/ParameterSet.h,,) lofar_INTERNAL(CEP/tinyCEP,tinyCEP,,1,tinyCEP/TinyDataManager.h,,) lofar_INTERNAL(CEP/CEPFrame,CEPFrame,,1,CEPFrame/DataManager.h,,) lofar_INTERNAL(CEP/Demo/TFlopCorrelator/TFC_Interface,TFC_Interface,,1,TFC_Interface/DH_RSP.h,,) diff --git a/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/AH_InputSection.cc b/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/AH_InputSection.cc index 44dea5d464f..4de0cc50cdc 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/AH_InputSection.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/AH_InputSection.cc @@ -12,7 +12,7 @@ #include <lofar_config.h> #include <Common/lofar_iostream.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <AH_InputSection.h> diff --git a/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/Attic/AH_InputSection.cc b/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/Attic/AH_InputSection.cc index 44dea5d464f..4de0cc50cdc 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/Attic/AH_InputSection.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/Attic/AH_InputSection.cc @@ -12,7 +12,7 @@ #include <lofar_config.h> #include <Common/lofar_iostream.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <AH_InputSection.h> diff --git a/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/Attic/WH_RSPInput.cc b/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/Attic/WH_RSPInput.cc index 31943ed0538..dea7a5182e0 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/Attic/WH_RSPInput.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/Attic/WH_RSPInput.cc @@ -175,13 +175,13 @@ void* WriteToBufferThread(void* arguments) } WH_RSPInput::WH_RSPInput(const string& name, - const ACC::ParameterSet pset, + const ACC::APS::ParameterSet pset, const string device, const string srcMAC, const string destMAC, const bool isSyncMaster) : WorkHolder ((isSyncMaster ? 1 : 2), - 1 + (isSyncMaster ? pset.getInt("NoWH_RSP")-1 : 0), + 1 + (isSyncMaster ? pset.getInt32("NoWH_RSP")-1 : 0), name, "WH_RSPInput"), itsDevice(device), @@ -193,17 +193,17 @@ WH_RSPInput::WH_RSPInput(const string& name, char str[32]; // total amount of RSP-board interfaces - itsNRSPOutputs = pset.getInt("NoWH_RSP"); + itsNRSPOutputs = pset.getInt32("NoWH_RSP"); // number of EPA packets per RSP frame - itsNpackets = pset.getInt("NoPacketsInFrame"); + itsNpackets = pset.getInt32("NoPacketsInFrame"); // size of an EPA packet in bytes - int sizeofpacket = ( pset.getInt("polarisations") * + int sizeofpacket = ( pset.getInt32("polarisations") * sizeof(complex<int16>) * - pset.getInt("NoRSPBeamlets") + pset.getInt32("NoRSPBeamlets") ) + - pset.getInt("SzEPAheader"); + pset.getInt32("SzEPAheader"); // size of a RSP frame in bytes itsSzRSPframe = itsNpackets * sizeofpacket; @@ -243,7 +243,7 @@ WH_RSPInput::~WH_RSPInput() WorkHolder* WH_RSPInput::construct(const string& name, - const ACC::ParameterSet pset, + const ACC::APS::ParameterSet pset, const string device, const string srcMAC, const string destMAC, diff --git a/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/Attic/WH_RSPInput.h b/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/Attic/WH_RSPInput.h index 5f611a28944..a4d5f657a33 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/Attic/WH_RSPInput.h +++ b/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/Attic/WH_RSPInput.h @@ -23,7 +23,7 @@ #ifndef TFLOPCORRELATOR_WH_RSPINPUT_H #define TFLOPCORRELATOR_WH_RSPINPUT_H -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <Common/lofar_string.h> #include <tinyCEP/TinyDataManager.h> #include <tinyCEP/WorkHolder.h> @@ -64,7 +64,7 @@ namespace LOFAR //typedef TimeStamp timestamp_t; explicit WH_RSPInput(const string& name, - const ACC::ParameterSet pset, + const ACC::APS::ParameterSet pset, const string device, const string srcMAC, const string destMAC, @@ -72,7 +72,7 @@ namespace LOFAR virtual ~WH_RSPInput(); static WorkHolder* construct(const string& name, - const ACC::ParameterSet pset, + const ACC::APS::ParameterSet pset, const string device, const string srcMAC, const string destMAC, @@ -107,7 +107,7 @@ namespace LOFAR string itsSrcMAC; string itsDestMAC; - ACC::ParameterSet itsPset; + ACC::APS::ParameterSet itsPset; bool itsSyncMaster; int itsSzRSPframe; diff --git a/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/WH_RSPInput.cc b/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/WH_RSPInput.cc index 31943ed0538..dea7a5182e0 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/WH_RSPInput.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/WH_RSPInput.cc @@ -175,13 +175,13 @@ void* WriteToBufferThread(void* arguments) } WH_RSPInput::WH_RSPInput(const string& name, - const ACC::ParameterSet pset, + const ACC::APS::ParameterSet pset, const string device, const string srcMAC, const string destMAC, const bool isSyncMaster) : WorkHolder ((isSyncMaster ? 1 : 2), - 1 + (isSyncMaster ? pset.getInt("NoWH_RSP")-1 : 0), + 1 + (isSyncMaster ? pset.getInt32("NoWH_RSP")-1 : 0), name, "WH_RSPInput"), itsDevice(device), @@ -193,17 +193,17 @@ WH_RSPInput::WH_RSPInput(const string& name, char str[32]; // total amount of RSP-board interfaces - itsNRSPOutputs = pset.getInt("NoWH_RSP"); + itsNRSPOutputs = pset.getInt32("NoWH_RSP"); // number of EPA packets per RSP frame - itsNpackets = pset.getInt("NoPacketsInFrame"); + itsNpackets = pset.getInt32("NoPacketsInFrame"); // size of an EPA packet in bytes - int sizeofpacket = ( pset.getInt("polarisations") * + int sizeofpacket = ( pset.getInt32("polarisations") * sizeof(complex<int16>) * - pset.getInt("NoRSPBeamlets") + pset.getInt32("NoRSPBeamlets") ) + - pset.getInt("SzEPAheader"); + pset.getInt32("SzEPAheader"); // size of a RSP frame in bytes itsSzRSPframe = itsNpackets * sizeofpacket; @@ -243,7 +243,7 @@ WH_RSPInput::~WH_RSPInput() WorkHolder* WH_RSPInput::construct(const string& name, - const ACC::ParameterSet pset, + const ACC::APS::ParameterSet pset, const string device, const string srcMAC, const string destMAC, diff --git a/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/WH_RSPInput.h b/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/WH_RSPInput.h index 5f611a28944..a4d5f657a33 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/WH_RSPInput.h +++ b/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/WH_RSPInput.h @@ -23,7 +23,7 @@ #ifndef TFLOPCORRELATOR_WH_RSPINPUT_H #define TFLOPCORRELATOR_WH_RSPINPUT_H -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <Common/lofar_string.h> #include <tinyCEP/TinyDataManager.h> #include <tinyCEP/WorkHolder.h> @@ -64,7 +64,7 @@ namespace LOFAR //typedef TimeStamp timestamp_t; explicit WH_RSPInput(const string& name, - const ACC::ParameterSet pset, + const ACC::APS::ParameterSet pset, const string device, const string srcMAC, const string destMAC, @@ -72,7 +72,7 @@ namespace LOFAR virtual ~WH_RSPInput(); static WorkHolder* construct(const string& name, - const ACC::ParameterSet pset, + const ACC::APS::ParameterSet pset, const string device, const string srcMAC, const string destMAC, @@ -107,7 +107,7 @@ namespace LOFAR string itsSrcMAC; string itsDestMAC; - ACC::ParameterSet itsPset; + ACC::APS::ParameterSet itsPset; bool itsSyncMaster; int itsSzRSPframe; diff --git a/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/WH_Transpose.cc b/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/WH_Transpose.cc index eb36600af53..2cfe1926929 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/WH_Transpose.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_InputSection/src/WH_Transpose.cc @@ -24,7 +24,7 @@ // General includes #include <Common/LofarLogger.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> // Application specific includes #include <WH_Transpose.h> @@ -42,7 +42,7 @@ WH_Transpose::WH_Transpose(const string& name, { char str[32]; - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); for (int i=0; i<itsNinputs; i++) { sprintf(str, "DH_in_%d", i); diff --git a/Demo/CEP/TFlopCorrelator/TFC_InputSection/test/tWH_Transpose.cc b/Demo/CEP/TFlopCorrelator/TFC_InputSection/test/tWH_Transpose.cc index d80b7c57c58..d051592576f 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_InputSection/test/tWH_Transpose.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_InputSection/test/tWH_Transpose.cc @@ -24,7 +24,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tWH_Transpose.h> #include <Transport/TH_Mem.h> @@ -54,7 +54,7 @@ namespace LOFAR void AH_Transpose::define(const KeyValueMap& kvm) { KeyValueMap myKvm(kvm); myKvm["NoWH_RSP"] = 2; - ACC::ParameterSet myPset; + ACC::APS::ParameterSet myPset; myPset["NoWH_RSP"] = 2; itsInDH1 = new DH_RSP("DH_RSP1", myPset); diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/configure.in b/Demo/CEP/TFlopCorrelator/TFC_Interface/configure.in index 36a7e998866..c8c2d30eee5 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/configure.in +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/configure.in @@ -60,7 +60,7 @@ lofar_LOG4CPLUS lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h,,) lofar_INTERNAL(LCS/Transport,Transport,,1,Transport/DataHolder.h,,) -lofar_INTERNAL(LCS/ACC,ACC,,1,ACC/ParameterSet.h,,) +lofar_INTERNAL(LCS/ACC/APS,APS,,1,APS/ParameterSet.h,,) dnl dnl Output Makefiles diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_CorrCube.cc b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_CorrCube.cc index 9e4404cea43..3db1d7cffd3 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_CorrCube.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_CorrCube.cc @@ -11,7 +11,7 @@ #include <lofar_config.h> #include <DH_CorrCube.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> namespace LOFAR { @@ -22,11 +22,11 @@ namespace LOFAR itsSubBand (subband), itsNPol (2) { - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); //ParameterCollection myPC(myPS); - itsNFChannels = myPS.getInt("DH_CorrCube.freqs"); - itsNStations = myPS.getInt("DH_CorrCube.stations"); - itsNTimes = myPS.getInt("DH_CorrCube.times"); + itsNFChannels = myPS.getInt32("DH_CorrCube.freqs"); + itsNStations = myPS.getInt32("DH_CorrCube.stations"); + itsNTimes = myPS.getInt32("DH_CorrCube.times"); } DH_CorrCube::DH_CorrCube(const DH_CorrCube& that) diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_PPF.cc b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_PPF.cc index d792906f8c3..1c7e01db02c 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_PPF.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_PPF.cc @@ -13,7 +13,7 @@ #include <lofar_config.h> #include <DH_PPF.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> namespace LOFAR @@ -25,12 +25,11 @@ namespace LOFAR itsBuffer (0), itsNSamples (0) { - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); -// //ParameterCollection myPC(myPS); - itsNSamples = myPS.getInt("DH_PPF.samples"); -// itsNStations = myPS.getInt("WH_SubBand.stations"); -// itsNTimes = myPS.getInt("WH_SubBand.times"); -// itsNPol = myPS.getInt("WH_SubBand.pols"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); + itsNSamples = myPS.getInt32("DH_PPF.samples"); +// itsNStations = myPS.getInt32("WH_SubBand.stations"); +// itsNTimes = myPS.getInt32("WH_SubBand.times"); +// itsNPol = myPS.getInt32("WH_SubBand.pols"); } DH_PPF::DH_PPF(const DH_PPF& that) diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_RSP.cc b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_RSP.cc index 0bb8a6df93e..7a62431a553 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_RSP.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_RSP.cc @@ -20,16 +20,16 @@ namespace LOFAR { DH_RSP::DH_RSP (const string& name, - const ACC::ParameterSet pset) + const ACC::APS::ParameterSet pset) : DataHolder (name, "DH_RSP"), itsBuffer (0), itsPSet (pset) { - itsEPAheaderSize = pset.getInt("SzEPAheader"); - itsNoBeamlets = pset.getInt("NoRSPBeamlets"); - itsNoPolarisations = pset.getInt("polarisations"); - const int NoPacketsInFrame = pset.getInt("NoPacketsInFrame"); + itsEPAheaderSize = pset.getInt32("SzEPAheader"); + itsNoBeamlets = pset.getInt32("NoRSPBeamlets"); + itsNoPolarisations = pset.getInt32("polarisations"); + const int NoPacketsInFrame = pset.getInt32("NoPacketsInFrame"); itsBufSize = NoPacketsInFrame * (itsEPAheaderSize + itsNoBeamlets * itsNoPolarisations * sizeof(complex<int16>)); } diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_RSP.h b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_RSP.h index 1297e59e4c2..9bf37e4ae1b 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_RSP.h +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_RSP.h @@ -14,7 +14,7 @@ #define TFLOPCORRELATOR_DH_RSP_H -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <Transport/DataHolder.h> #include <TFC_Interface/RSPTimeStamp.h> @@ -27,7 +27,7 @@ public: typedef char BufferType; explicit DH_RSP (const string& name, - const ACC::ParameterSet pset); + const ACC::APS::ParameterSet pset); DH_RSP(const DH_RSP&); @@ -75,7 +75,7 @@ public: int itsNoPolarisations; unsigned int itsBufSize; - ACC::ParameterSet itsPSet; + ACC::APS::ParameterSet itsPSet; }; inline DH_RSP::BufferType* DH_RSP::getBuffer() diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_Vis.cc b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_Vis.cc index 2dd57fe9001..e7306a6c112 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_Vis.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/DH_Vis.cc @@ -11,7 +11,7 @@ ////////////////////////////////////////////////////////////////////// #include <lofar_config.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <DH_Vis.h> @@ -24,9 +24,8 @@ DH_Vis::DH_Vis (const string& name, short startfreq) itsStartFreq (startfreq), itsNPols (2) { - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); - //ParameterCollection myPC(myPS); - itsNStations = myPS.getInt("DH_CorrCube.stations"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); + itsNStations = myPS.getInt32("DH_CorrCube.stations"); } DH_Vis::DH_Vis(const DH_Vis& that) diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_Corr.cc b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_Corr.cc index 54ca4251b93..de98b41cc8c 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_Corr.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_Corr.cc @@ -11,10 +11,10 @@ #include <TFC_Interface/Stub_Corr.h> #include <Transport/TH_Socket.h> #include <Transport/Connection.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; namespace LOFAR { @@ -23,8 +23,8 @@ namespace LOFAR { itsTHs (0), itsConnections (0) { - itsPS = new ACC::ParameterSet("TFlopCorrelator.cfg"); - itsNCorr = itsPS->getInt("NSBF")/2; + itsPS = new ACC::APS::ParameterSet("TFlopCorrelator.cfg"); + itsNCorr = itsPS->getInt32("NSBF")/2; DBGASSERTSTR(NSBF%2 == 0, "NSBF should be an even number"); LOG_TRACE_FLOW_STR("Total number of Correlators in the Stub_Corr is " << itsNCorr); ASSERTSTR(itsNCorr >= 0, "Number of Correlators in the Stub_Corr must be greater than 0"); @@ -54,7 +54,7 @@ namespace LOFAR { DBGASSERTSTR(((C_nr >= 0) && (C_nr < itsNCorr)), "C_nr argument out of boundaries; " << C_nr << " / " << itsNCorr); - int port = itsPS->getInt("CorrConnection.RequestPort"); + int port = itsPS->getInt32("CorrConnection.RequestPort"); string service(formatString("%d", port)); if (itsStubOnServer) // on the cluster side, so start server socket diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_Corr.h b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_Corr.h index eb2ae6bdfcd..22dde39051c 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_Corr.h +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_Corr.h @@ -10,7 +10,7 @@ #ifndef LOFAR_TFLOPCORRELATOR_CORRSTUB_H #define LOFAR_TFLOPCORRELATOR_CORRSTUB_H -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tinyCEP/TinyDataManager.h> namespace LOFAR { @@ -36,7 +36,7 @@ public: private: bool itsStubOnServer; - ACC::ParameterSet* itsPS; + ACC::APS::ParameterSet* itsPS; int itsNCorr; // total number of correlators in this interface TH_Socket** itsTHs; Connection** itsConnections; diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_Delay.cc b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_Delay.cc index 117b8dcaf7c..41bc6841d13 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_Delay.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_Delay.cc @@ -11,10 +11,10 @@ #include <TFC_Interface/Stub_Delay.h> #include <Transport/TH_Socket.h> #include <Transport/Connection.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; namespace LOFAR { @@ -23,8 +23,8 @@ Stub_Delay::Stub_Delay (bool isInput) itsTHs (0), itsConnections (0) { - itsPS = new ACC::ParameterSet("TFlopCorrelator.cfg"); - itsNRSP = itsPS->getInt("NRSP"); + itsPS = new ACC::APS::ParameterSet("TFlopCorrelator.cfg"); + itsNRSP = itsPS->getInt32("NRSP"); LOG_TRACE_FLOW_STR("Total number of RSPinputs in the Stub_Delay is " << itsNRSP); ASSERTSTR(itsNRSP >= 0, "Number of RSPinputs in the Stub_Delay must be greater than 0"); @@ -53,7 +53,7 @@ void Stub_Delay ::connect (int RSP_nr, DBGASSERTSTR(((RSP_nr >= 0) && (RSP_nr < itsNRSP)), "RSP_nr argument out of boundaries; " << RSP_nr << " / " << itsNRSP); - int port = itsPS->getInt("DelayConnection.RequestPort"); + int port = itsPS->getInt32("DelayConnection.RequestPort"); string service(formatString("%d", port)); if (itsIsInput) // on the input side, start a client socket diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_Delay.h b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_Delay.h index 77df2c9ef50..113202407fa 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_Delay.h +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_Delay.h @@ -10,7 +10,7 @@ #ifndef LOFAR_TFC_INTERFACE_STUB_DELAY_H #define LOFAR_TFC_INTERFACE_STUB_DELAY_H -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tinyCEP/TinyDataManager.h> namespace LOFAR { @@ -36,7 +36,7 @@ public: private: bool itsIsInput; // Is this stub an input for a step - ACC::ParameterSet* itsPS; + ACC::APS::ParameterSet* itsPS; int itsNRSP; // total number of RSPinputs TH_Socket** itsTHs; Connection** itsConnections; diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_FIR.cc b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_FIR.cc index bdda2d70c3a..f776255dbb0 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_FIR.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_FIR.cc @@ -12,7 +12,7 @@ using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; namespace LOFAR { @@ -21,8 +21,8 @@ namespace LOFAR { itsTHs (0), itsConnections (0) { - itsPS = new ACC::ParameterSet("TFlopCorrelator.cfg"); - itsNFIRF = itsPS->getInt("NFIRF"); // number of SubBand filters in the application + itsPS = new ACC::APS::ParameterSet("TFlopCorrelator.cfg"); + itsNFIRF = itsPS->getInt32("NFIRF"); // number of SubBand filters in the application ASSERTSTR(itsNFIRF >= 0, "Number of subband filters must be greater than 0"); itsTHs = new TH_Socket*[itsNFIRF]; itsConnections = new Connection*[itsNFIRF]; @@ -51,7 +51,7 @@ namespace LOFAR { { DBGASSERTSTR(FIRF_nr <= itsNFIRF, "Subband filter number too large"); const ParameterSet myPS("TFlopCorrelator.cfg"); - int port = myPS.getInt("FIRConnection.RequestPort"); + int port = myPS.getInt32("FIRConnection.RequestPort"); string service(formatString("%d", port)); if (itsStubOnServer) // On the cluster side, so start a server socket { diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_FIR.h b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_FIR.h index e9ba835218c..2f4f828165f 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_FIR.h +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_FIR.h @@ -11,7 +11,7 @@ #define LOFAR_TFLOPCORRELATOR_FIRSTUB_H #include <string> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tinyCEP/TinyDataManager.h> //#include <TFlopCorrelator/DH_FilterCoeff.h> @@ -39,7 +39,7 @@ public: private: bool itsStubOnServer; - ACC::ParameterSet* itsPS; + ACC::APS::ParameterSet* itsPS; int itsNFIRF; TH_Socket** itsTHs; Connection** itsConnections; diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_RSP.cc b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_RSP.cc index 2c7e8c30a98..78a0789bdd0 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_RSP.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_RSP.cc @@ -11,14 +11,14 @@ using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; namespace LOFAR { Stub_RSP::Stub_RSP (bool stubOnServer) : itsStubOnServer (stubOnServer) { - itsPS = new ACC::ParameterSet("TFlopCorrelator.cfg"); + itsPS = new ACC::APS::ParameterSet("TFlopCorrelator.cfg"); // todo: add DH_?? for pre-correlation correction factors // for (int i=0; i<itsNSBF; i++) { diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_RSP.h b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_RSP.h index 73c54a34bd6..228c554e74e 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_RSP.h +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Attic/Stub_RSP.h @@ -11,7 +11,7 @@ #define LOFAR_TFLOPCORRELATOR_SBSTUB_H #include <string> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> namespace LOFAR { @@ -32,7 +32,7 @@ public: private: bool itsStubOnServer; - ACC::ParameterSet* itsPS; + ACC::APS::ParameterSet* itsPS; }; } //namespace diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_CorrCube.cc b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_CorrCube.cc index 9e4404cea43..3db1d7cffd3 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_CorrCube.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_CorrCube.cc @@ -11,7 +11,7 @@ #include <lofar_config.h> #include <DH_CorrCube.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> namespace LOFAR { @@ -22,11 +22,11 @@ namespace LOFAR itsSubBand (subband), itsNPol (2) { - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); //ParameterCollection myPC(myPS); - itsNFChannels = myPS.getInt("DH_CorrCube.freqs"); - itsNStations = myPS.getInt("DH_CorrCube.stations"); - itsNTimes = myPS.getInt("DH_CorrCube.times"); + itsNFChannels = myPS.getInt32("DH_CorrCube.freqs"); + itsNStations = myPS.getInt32("DH_CorrCube.stations"); + itsNTimes = myPS.getInt32("DH_CorrCube.times"); } DH_CorrCube::DH_CorrCube(const DH_CorrCube& that) diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_FIR.cc b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_FIR.cc index e650e78328b..59e6203f71e 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_FIR.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_FIR.cc @@ -27,12 +27,11 @@ namespace LOFAR itsNPol (0), itsMatrix (0) { -// ACC::ParameterSet myPS("TFlopCorrelator.cfg"); -// //ParameterCollection myPC(myPS); -// itsNFChannels = myPS.getInt("WH_FIR.freqs"); -// itsNStations = myPS.getInt("WH_FIR.stations"); -// itsNTimes = myPS.getInt("WH_FIR.times"); -// itsNPol = myPS.getInt("WH_FIR.pols"); +// ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); +// itsNFChannels = myPS.getInt32("WH_FIR.freqs"); +// itsNStations = myPS.getInt32("WH_FIR.stations"); +// itsNTimes = myPS.getInt32("WH_FIR.times"); +// itsNPol = myPS.getInt32("WH_FIR.pols"); itsNFChannels = 2; itsNStations = 3; itsNTimes = 4; diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_PPF.cc b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_PPF.cc index d792906f8c3..1c7e01db02c 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_PPF.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_PPF.cc @@ -13,7 +13,7 @@ #include <lofar_config.h> #include <DH_PPF.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> namespace LOFAR @@ -25,12 +25,11 @@ namespace LOFAR itsBuffer (0), itsNSamples (0) { - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); -// //ParameterCollection myPC(myPS); - itsNSamples = myPS.getInt("DH_PPF.samples"); -// itsNStations = myPS.getInt("WH_SubBand.stations"); -// itsNTimes = myPS.getInt("WH_SubBand.times"); -// itsNPol = myPS.getInt("WH_SubBand.pols"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); + itsNSamples = myPS.getInt32("DH_PPF.samples"); +// itsNStations = myPS.getInt32("WH_SubBand.stations"); +// itsNTimes = myPS.getInt32("WH_SubBand.times"); +// itsNPol = myPS.getInt32("WH_SubBand.pols"); } DH_PPF::DH_PPF(const DH_PPF& that) diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_RSP.cc b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_RSP.cc index 0bb8a6df93e..7a62431a553 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_RSP.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_RSP.cc @@ -20,16 +20,16 @@ namespace LOFAR { DH_RSP::DH_RSP (const string& name, - const ACC::ParameterSet pset) + const ACC::APS::ParameterSet pset) : DataHolder (name, "DH_RSP"), itsBuffer (0), itsPSet (pset) { - itsEPAheaderSize = pset.getInt("SzEPAheader"); - itsNoBeamlets = pset.getInt("NoRSPBeamlets"); - itsNoPolarisations = pset.getInt("polarisations"); - const int NoPacketsInFrame = pset.getInt("NoPacketsInFrame"); + itsEPAheaderSize = pset.getInt32("SzEPAheader"); + itsNoBeamlets = pset.getInt32("NoRSPBeamlets"); + itsNoPolarisations = pset.getInt32("polarisations"); + const int NoPacketsInFrame = pset.getInt32("NoPacketsInFrame"); itsBufSize = NoPacketsInFrame * (itsEPAheaderSize + itsNoBeamlets * itsNoPolarisations * sizeof(complex<int16>)); } diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_RSP.h b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_RSP.h index 1297e59e4c2..9bf37e4ae1b 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_RSP.h +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_RSP.h @@ -14,7 +14,7 @@ #define TFLOPCORRELATOR_DH_RSP_H -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <Transport/DataHolder.h> #include <TFC_Interface/RSPTimeStamp.h> @@ -27,7 +27,7 @@ public: typedef char BufferType; explicit DH_RSP (const string& name, - const ACC::ParameterSet pset); + const ACC::APS::ParameterSet pset); DH_RSP(const DH_RSP&); @@ -75,7 +75,7 @@ public: int itsNoPolarisations; unsigned int itsBufSize; - ACC::ParameterSet itsPSet; + ACC::APS::ParameterSet itsPSet; }; inline DH_RSP::BufferType* DH_RSP::getBuffer() diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_Vis.cc b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_Vis.cc index 2dd57fe9001..e7306a6c112 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_Vis.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/DH_Vis.cc @@ -11,7 +11,7 @@ ////////////////////////////////////////////////////////////////////// #include <lofar_config.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <DH_Vis.h> @@ -24,9 +24,8 @@ DH_Vis::DH_Vis (const string& name, short startfreq) itsStartFreq (startfreq), itsNPols (2) { - ACC::ParameterSet myPS("TFlopCorrelator.cfg"); - //ParameterCollection myPC(myPS); - itsNStations = myPS.getInt("DH_CorrCube.stations"); + ACC::APS::ParameterSet myPS("TFlopCorrelator.cfg"); + itsNStations = myPS.getInt32("DH_CorrCube.stations"); } DH_Vis::DH_Vis(const DH_Vis& that) diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_Corr.cc b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_Corr.cc index 54ca4251b93..de98b41cc8c 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_Corr.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_Corr.cc @@ -11,10 +11,10 @@ #include <TFC_Interface/Stub_Corr.h> #include <Transport/TH_Socket.h> #include <Transport/Connection.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; namespace LOFAR { @@ -23,8 +23,8 @@ namespace LOFAR { itsTHs (0), itsConnections (0) { - itsPS = new ACC::ParameterSet("TFlopCorrelator.cfg"); - itsNCorr = itsPS->getInt("NSBF")/2; + itsPS = new ACC::APS::ParameterSet("TFlopCorrelator.cfg"); + itsNCorr = itsPS->getInt32("NSBF")/2; DBGASSERTSTR(NSBF%2 == 0, "NSBF should be an even number"); LOG_TRACE_FLOW_STR("Total number of Correlators in the Stub_Corr is " << itsNCorr); ASSERTSTR(itsNCorr >= 0, "Number of Correlators in the Stub_Corr must be greater than 0"); @@ -54,7 +54,7 @@ namespace LOFAR { DBGASSERTSTR(((C_nr >= 0) && (C_nr < itsNCorr)), "C_nr argument out of boundaries; " << C_nr << " / " << itsNCorr); - int port = itsPS->getInt("CorrConnection.RequestPort"); + int port = itsPS->getInt32("CorrConnection.RequestPort"); string service(formatString("%d", port)); if (itsStubOnServer) // on the cluster side, so start server socket diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_Corr.h b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_Corr.h index eb2ae6bdfcd..22dde39051c 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_Corr.h +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_Corr.h @@ -10,7 +10,7 @@ #ifndef LOFAR_TFLOPCORRELATOR_CORRSTUB_H #define LOFAR_TFLOPCORRELATOR_CORRSTUB_H -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tinyCEP/TinyDataManager.h> namespace LOFAR { @@ -36,7 +36,7 @@ public: private: bool itsStubOnServer; - ACC::ParameterSet* itsPS; + ACC::APS::ParameterSet* itsPS; int itsNCorr; // total number of correlators in this interface TH_Socket** itsTHs; Connection** itsConnections; diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_Delay.cc b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_Delay.cc index 117b8dcaf7c..41bc6841d13 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_Delay.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_Delay.cc @@ -11,10 +11,10 @@ #include <TFC_Interface/Stub_Delay.h> #include <Transport/TH_Socket.h> #include <Transport/Connection.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; namespace LOFAR { @@ -23,8 +23,8 @@ Stub_Delay::Stub_Delay (bool isInput) itsTHs (0), itsConnections (0) { - itsPS = new ACC::ParameterSet("TFlopCorrelator.cfg"); - itsNRSP = itsPS->getInt("NRSP"); + itsPS = new ACC::APS::ParameterSet("TFlopCorrelator.cfg"); + itsNRSP = itsPS->getInt32("NRSP"); LOG_TRACE_FLOW_STR("Total number of RSPinputs in the Stub_Delay is " << itsNRSP); ASSERTSTR(itsNRSP >= 0, "Number of RSPinputs in the Stub_Delay must be greater than 0"); @@ -53,7 +53,7 @@ void Stub_Delay ::connect (int RSP_nr, DBGASSERTSTR(((RSP_nr >= 0) && (RSP_nr < itsNRSP)), "RSP_nr argument out of boundaries; " << RSP_nr << " / " << itsNRSP); - int port = itsPS->getInt("DelayConnection.RequestPort"); + int port = itsPS->getInt32("DelayConnection.RequestPort"); string service(formatString("%d", port)); if (itsIsInput) // on the input side, start a client socket diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_Delay.h b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_Delay.h index 77df2c9ef50..113202407fa 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_Delay.h +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_Delay.h @@ -10,7 +10,7 @@ #ifndef LOFAR_TFC_INTERFACE_STUB_DELAY_H #define LOFAR_TFC_INTERFACE_STUB_DELAY_H -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tinyCEP/TinyDataManager.h> namespace LOFAR { @@ -36,7 +36,7 @@ public: private: bool itsIsInput; // Is this stub an input for a step - ACC::ParameterSet* itsPS; + ACC::APS::ParameterSet* itsPS; int itsNRSP; // total number of RSPinputs TH_Socket** itsTHs; Connection** itsConnections; diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_FIR.cc b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_FIR.cc index bdda2d70c3a..f776255dbb0 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_FIR.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_FIR.cc @@ -12,7 +12,7 @@ using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; namespace LOFAR { @@ -21,8 +21,8 @@ namespace LOFAR { itsTHs (0), itsConnections (0) { - itsPS = new ACC::ParameterSet("TFlopCorrelator.cfg"); - itsNFIRF = itsPS->getInt("NFIRF"); // number of SubBand filters in the application + itsPS = new ACC::APS::ParameterSet("TFlopCorrelator.cfg"); + itsNFIRF = itsPS->getInt32("NFIRF"); // number of SubBand filters in the application ASSERTSTR(itsNFIRF >= 0, "Number of subband filters must be greater than 0"); itsTHs = new TH_Socket*[itsNFIRF]; itsConnections = new Connection*[itsNFIRF]; @@ -51,7 +51,7 @@ namespace LOFAR { { DBGASSERTSTR(FIRF_nr <= itsNFIRF, "Subband filter number too large"); const ParameterSet myPS("TFlopCorrelator.cfg"); - int port = myPS.getInt("FIRConnection.RequestPort"); + int port = myPS.getInt32("FIRConnection.RequestPort"); string service(formatString("%d", port)); if (itsStubOnServer) // On the cluster side, so start a server socket { diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_FIR.h b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_FIR.h index e9ba835218c..2f4f828165f 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_FIR.h +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_FIR.h @@ -11,7 +11,7 @@ #define LOFAR_TFLOPCORRELATOR_FIRSTUB_H #include <string> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <tinyCEP/TinyDataManager.h> //#include <TFlopCorrelator/DH_FilterCoeff.h> @@ -39,7 +39,7 @@ public: private: bool itsStubOnServer; - ACC::ParameterSet* itsPS; + ACC::APS::ParameterSet* itsPS; int itsNFIRF; TH_Socket** itsTHs; Connection** itsConnections; diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_RSP.cc b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_RSP.cc index 2c7e8c30a98..78a0789bdd0 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_RSP.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_RSP.cc @@ -11,14 +11,14 @@ using namespace LOFAR; -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; namespace LOFAR { Stub_RSP::Stub_RSP (bool stubOnServer) : itsStubOnServer (stubOnServer) { - itsPS = new ACC::ParameterSet("TFlopCorrelator.cfg"); + itsPS = new ACC::APS::ParameterSet("TFlopCorrelator.cfg"); // todo: add DH_?? for pre-correlation correction factors // for (int i=0; i<itsNSBF; i++) { diff --git a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_RSP.h b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_RSP.h index 73c54a34bd6..228c554e74e 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_RSP.h +++ b/Demo/CEP/TFlopCorrelator/TFC_Interface/src/Stub_RSP.h @@ -11,7 +11,7 @@ #define LOFAR_TFLOPCORRELATOR_SBSTUB_H #include <string> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> namespace LOFAR { @@ -32,7 +32,7 @@ public: private: bool itsStubOnServer; - ACC::ParameterSet* itsPS; + ACC::APS::ParameterSet* itsPS; }; } //namespace diff --git a/Demo/CEP/TFlopCorrelator/TFC_Storage/configure.in b/Demo/CEP/TFlopCorrelator/TFC_Storage/configure.in index 3a4009b1e04..e1d483e4648 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Storage/configure.in +++ b/Demo/CEP/TFlopCorrelator/TFC_Storage/configure.in @@ -61,7 +61,7 @@ lofar_AIPSPP(1,"-lms -lmeasures -ltables -lscimath -lscimath_f -lcasa") lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h,,) lofar_INTERNAL(LCS/Transport,Transport,,1,Transport/DataHolder.h,,) -lofar_INTERNAL(LCS/ACC,ACC,,1,ACC/ParameterSet.h,,) +lofar_INTERNAL(LCS/ACC/APS,APS,,1,APS/ParameterSet.h,,) lofar_INTERNAL(CEP/tinyCEP,tinyCEP,,1,tinyCEP/TinyDataManager.h,,) lofar_INTERNAL(CEP/CEPFrame,CEPFrame,,1,CEPFrame/DataManager.h,,) lofar_INTERNAL(CEP/Demo/TFlopCorrelator/TFC_Interface,TFC_Interface,,1,TFC_Interface/DH_RSP.h,,) diff --git a/Demo/CEP/TFlopCorrelator/TFC_Storage/src/AH_Storage.cc b/Demo/CEP/TFlopCorrelator/TFC_Storage/src/AH_Storage.cc index 90ca12c1425..ca8d3a2fc80 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Storage/src/AH_Storage.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Storage/src/AH_Storage.cc @@ -12,7 +12,7 @@ #include <lofar_config.h> #include <Common/lofar_iostream.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <AH_Storage.h> #include <TFC_Interface/Stub_Corr.h> #include <TFC_Storage/WH_Storage.h> @@ -46,7 +46,7 @@ void AH_Storage::define(const LOFAR::KeyValueMap&) { undefine(); int lowestFreeNode = 0; - itsNSBF = itsParamSet.getInt("NSBF"); // number of SubBand filters in the application + itsNSBF = itsParamSet.getInt32("NSBF"); // number of SubBand filters in the application LOG_TRACE_FLOW_STR("Create the top-level composite"); diff --git a/Demo/CEP/TFlopCorrelator/TFC_Storage/src/Attic/AH_Storage.cc b/Demo/CEP/TFlopCorrelator/TFC_Storage/src/Attic/AH_Storage.cc index 90ca12c1425..ca8d3a2fc80 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Storage/src/Attic/AH_Storage.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Storage/src/Attic/AH_Storage.cc @@ -12,7 +12,7 @@ #include <lofar_config.h> #include <Common/lofar_iostream.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> #include <AH_Storage.h> #include <TFC_Interface/Stub_Corr.h> #include <TFC_Storage/WH_Storage.h> @@ -46,7 +46,7 @@ void AH_Storage::define(const LOFAR::KeyValueMap&) { undefine(); int lowestFreeNode = 0; - itsNSBF = itsParamSet.getInt("NSBF"); // number of SubBand filters in the application + itsNSBF = itsParamSet.getInt32("NSBF"); // number of SubBand filters in the application LOG_TRACE_FLOW_STR("Create the top-level composite"); diff --git a/Demo/CEP/TFlopCorrelator/TFC_Storage/src/Attic/WH_Storage.cc b/Demo/CEP/TFlopCorrelator/TFC_Storage/src/Attic/WH_Storage.cc index ba9504286f5..2a9fc3cbaab 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Storage/src/Attic/WH_Storage.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Storage/src/Attic/WH_Storage.cc @@ -24,7 +24,7 @@ // General includes #include <Common/LofarLogger.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> // Application specific includes #include <TFC_Storage/WH_Storage.h> @@ -33,8 +33,8 @@ using namespace LOFAR; WH_Storage::WH_Storage(const string& name, - const ACC::ParameterSet& pset) - : WorkHolder (pset.getInt("NSBF")/2, + const ACC::APS::ParameterSet& pset) + : WorkHolder (pset.getInt32("NSBF")/2, 0, name, "WH_Storage"), @@ -53,7 +53,7 @@ WH_Storage::~WH_Storage() { } WorkHolder* WH_Storage::construct(const string& name, - const ACC::ParameterSet& pset) + const ACC::APS::ParameterSet& pset) { return new WH_Storage(name, pset); } diff --git a/Demo/CEP/TFlopCorrelator/TFC_Storage/src/Attic/WH_Storage.h b/Demo/CEP/TFlopCorrelator/TFC_Storage/src/Attic/WH_Storage.h index 4a96f992f9f..b5de33cf45d 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Storage/src/Attic/WH_Storage.h +++ b/Demo/CEP/TFlopCorrelator/TFC_Storage/src/Attic/WH_Storage.h @@ -35,11 +35,11 @@ namespace LOFAR public: explicit WH_Storage(const string& name, - const ACC::ParameterSet& pset); + const ACC::APS::ParameterSet& pset); virtual ~WH_Storage(); static WorkHolder* construct(const string& name, - const ACC::ParameterSet& pset); + const ACC::APS::ParameterSet& pset); virtual WH_Storage* make(const string& name); virtual void process(); @@ -50,7 +50,7 @@ namespace LOFAR /// forbid assignment WH_Storage& operator= (const WH_Storage&); - const ACC::ParameterSet& itsPS; + const ACC::APS::ParameterSet& itsPS; }; } // namespace LOFAR diff --git a/Demo/CEP/TFlopCorrelator/TFC_Storage/src/WH_Storage.cc b/Demo/CEP/TFlopCorrelator/TFC_Storage/src/WH_Storage.cc index ba9504286f5..2a9fc3cbaab 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Storage/src/WH_Storage.cc +++ b/Demo/CEP/TFlopCorrelator/TFC_Storage/src/WH_Storage.cc @@ -24,7 +24,7 @@ // General includes #include <Common/LofarLogger.h> -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> // Application specific includes #include <TFC_Storage/WH_Storage.h> @@ -33,8 +33,8 @@ using namespace LOFAR; WH_Storage::WH_Storage(const string& name, - const ACC::ParameterSet& pset) - : WorkHolder (pset.getInt("NSBF")/2, + const ACC::APS::ParameterSet& pset) + : WorkHolder (pset.getInt32("NSBF")/2, 0, name, "WH_Storage"), @@ -53,7 +53,7 @@ WH_Storage::~WH_Storage() { } WorkHolder* WH_Storage::construct(const string& name, - const ACC::ParameterSet& pset) + const ACC::APS::ParameterSet& pset) { return new WH_Storage(name, pset); } diff --git a/Demo/CEP/TFlopCorrelator/TFC_Storage/src/WH_Storage.h b/Demo/CEP/TFlopCorrelator/TFC_Storage/src/WH_Storage.h index 4a96f992f9f..b5de33cf45d 100644 --- a/Demo/CEP/TFlopCorrelator/TFC_Storage/src/WH_Storage.h +++ b/Demo/CEP/TFlopCorrelator/TFC_Storage/src/WH_Storage.h @@ -35,11 +35,11 @@ namespace LOFAR public: explicit WH_Storage(const string& name, - const ACC::ParameterSet& pset); + const ACC::APS::ParameterSet& pset); virtual ~WH_Storage(); static WorkHolder* construct(const string& name, - const ACC::ParameterSet& pset); + const ACC::APS::ParameterSet& pset); virtual WH_Storage* make(const string& name); virtual void process(); @@ -50,7 +50,7 @@ namespace LOFAR /// forbid assignment WH_Storage& operator= (const WH_Storage&); - const ACC::ParameterSet& itsPS; + const ACC::APS::ParameterSet& itsPS; }; } // namespace LOFAR diff --git a/LCS/Common/include/Common/StringUtil.h b/LCS/Common/include/Common/StringUtil.h index 70393b4ec29..73acfd1ba51 100644 --- a/LCS/Common/include/Common/StringUtil.h +++ b/LCS/Common/include/Common/StringUtil.h @@ -30,6 +30,7 @@ #include <Common/LofarTypes.h> #include <Common/lofar_string.h> #include <Common/lofar_vector.h> +#include <Common/Exception.h> namespace LOFAR { @@ -217,6 +218,32 @@ inline std::string toString(long double val, const char* fmt = 0) // @} +// @name Convert string to numeric value +// Convert a string to the value of any of the fundamental arithmetic data +// types. Most of the StringTo...() methods provide the user with +// a means to override the default formatting behaviour by supplying his/her +// own formatting string, following the well-known <tt>scanf</tt>-like +// conversions. +// +// \attention The user is responsible for the correctness of the optional +// conversion string. No checks are done by the StringTo...() methods. + +// @{ + +bool StringToBool (const string& aString) throw(Exception); +int16 StringToInt16 (const string& aString,const char* fmt=0) throw(Exception); +uint16 StringToUint16(const string& aString,const char* fmt=0) throw(Exception); +int32 StringToInt32 (const string& aString,const char* fmt=0) throw(Exception); +uint32 StringToUint32(const string& aString,const char* fmt=0) throw(Exception); +#if HAVE_LONG_LONG +int64 StringToInt64 (const string& aString,const char* fmt=0) throw(Exception); +uint64 StringToUint64(const string& aString,const char* fmt=0) throw(Exception); +#endif +float StringToFloat (const string& aString,const char* fmt=0) throw(Exception); +double StringToDouble(const string& aString,const char* fmt=0) throw(Exception); + +// @} + } // namespace LOFAR #endif diff --git a/LCS/Common/src/StringUtil.cc b/LCS/Common/src/StringUtil.cc index 1fadd5c0d0d..1fd52080dee 100644 --- a/LCS/Common/src/StringUtil.cc +++ b/LCS/Common/src/StringUtil.cc @@ -1,6 +1,6 @@ //# StringUtil.cc: implementation of the string utilities class. //# -//# Copyright (C) 2002-2003 +//# Copyright (C) 2002-2005 //# ASTRON (Netherlands Foundation for Research in Astronomy) //# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl //# @@ -117,6 +117,108 @@ char* ltrim(char* aCstring, char* whiteSpace) return (aCstring); } +bool StringToBool(const string& aString) throw(Exception) +{ + char firstChar = aString.c_str()[0]; + if ((firstChar == 't') || (firstChar == 'T') || (firstChar == 1)) + return (true); + + if ((firstChar == 'f') || (firstChar == 'F') || (firstChar == 0)) + return (false); + + THROW (Exception, aString + " is not a boolean value"); +} + +int16 StringToInt16(const string& aString, const char* fmt) throw(Exception) +{ + int16 theShort; + if ((fmt ? sscanf(aString.c_str(), fmt, &theShort) : + sscanf(aString.c_str(), "%hd", &theShort)) != 1) { + THROW (Exception, aString + " is not an short value"); + } + + return (theShort); +} + +uint16 StringToUint16(const string& aString, const char* fmt) throw(Exception) +{ + uint16 theUshort; + if ((fmt ? sscanf(aString.c_str(), fmt, &theUshort) : + sscanf(aString.c_str(), "%hu", &theUshort)) != 1) { + THROW (Exception, aString + " is not an unsigned short value"); + } + + return (theUshort); +} + +int32 StringToInt32(const string& aString, const char* fmt) throw(Exception) +{ + int32 theInt; + if ((fmt ? sscanf(aString.c_str(), fmt, &theInt) : + sscanf(aString.c_str(), "%d", &theInt)) != 1) { + THROW (Exception, aString + " is not an integer value"); + } + + return (theInt); +} + +uint32 StringToUint32(const string& aString, const char* fmt) throw(Exception) +{ + uint32 theUint; + if ((fmt ? sscanf(aString.c_str(), fmt, &theUint) : + sscanf(aString.c_str(), "%u", &theUint)) != 1) { + THROW (Exception, aString + " is not an unsigned integer value"); + } + + return (theUint); +} + +#if HAVE_LONG_LONG +int64 StringToInt64(const string& aString, const char* fmt) throw(Exception) +{ + int64 theLong; + if ((fmt ? sscanf(aString.c_str(), fmt, &theLong) : + sscanf(aString.c_str(), "%lld", &theLong)) != 1) { + THROW (Exception, aString + " is not a long integer value"); + } + + return (theLong); +} + +uint64 StringToUint64(const string& aString, const char* fmt) throw(Exception) +{ + uint64 theUlong; + if ((fmt ? sscanf(aString.c_str(), fmt, &theUlong) : + sscanf(aString.c_str(), "%llu", &theUlong)) != 1) { + THROW (Exception, aString + " is not an unsigned long integer value"); + } + + return (theUlong); +} +#endif + +float StringToFloat(const string& aString, const char* fmt) throw(Exception) +{ + float theFloat; + if ((fmt ? sscanf(aString.c_str(), fmt, &theFloat) : + sscanf(aString.c_str(), "%g", &theFloat)) != 1) { + THROW (Exception, aString + " is not a float value"); + } + + return (theFloat); +} + + +double StringToDouble(const string& aString, const char* fmt) throw(Exception) +{ + double theDouble; + if ((fmt ? sscanf(aString.c_str(), fmt, &theDouble) : + sscanf(aString.c_str(), "%lg", &theDouble)) != 1) { + THROW (Exception, aString + " is not a double value"); + } + + return (theDouble); +} } // namespace LOFAR diff --git a/LCS/Common/src/StringUtil.h b/LCS/Common/src/StringUtil.h index 70393b4ec29..73acfd1ba51 100644 --- a/LCS/Common/src/StringUtil.h +++ b/LCS/Common/src/StringUtil.h @@ -30,6 +30,7 @@ #include <Common/LofarTypes.h> #include <Common/lofar_string.h> #include <Common/lofar_vector.h> +#include <Common/Exception.h> namespace LOFAR { @@ -217,6 +218,32 @@ inline std::string toString(long double val, const char* fmt = 0) // @} +// @name Convert string to numeric value +// Convert a string to the value of any of the fundamental arithmetic data +// types. Most of the StringTo...() methods provide the user with +// a means to override the default formatting behaviour by supplying his/her +// own formatting string, following the well-known <tt>scanf</tt>-like +// conversions. +// +// \attention The user is responsible for the correctness of the optional +// conversion string. No checks are done by the StringTo...() methods. + +// @{ + +bool StringToBool (const string& aString) throw(Exception); +int16 StringToInt16 (const string& aString,const char* fmt=0) throw(Exception); +uint16 StringToUint16(const string& aString,const char* fmt=0) throw(Exception); +int32 StringToInt32 (const string& aString,const char* fmt=0) throw(Exception); +uint32 StringToUint32(const string& aString,const char* fmt=0) throw(Exception); +#if HAVE_LONG_LONG +int64 StringToInt64 (const string& aString,const char* fmt=0) throw(Exception); +uint64 StringToUint64(const string& aString,const char* fmt=0) throw(Exception); +#endif +float StringToFloat (const string& aString,const char* fmt=0) throw(Exception); +double StringToDouble(const string& aString,const char* fmt=0) throw(Exception); + +// @} + } // namespace LOFAR #endif diff --git a/MAC/APL/APLCommon/configure.in b/MAC/APL/APLCommon/configure.in index d67722e6a60..cc92423b970 100644 --- a/MAC/APL/APLCommon/configure.in +++ b/MAC/APL/APLCommon/configure.in @@ -62,7 +62,7 @@ lofar_COMPILETOOLS #lofar_MPI(0) lofar_PVSS(1) lofar_EXTERNAL(common,1,Common/LofarTypes.h,,) -lofar_EXTERNAL(ACC,1,ACC/ParameterSet.h,,) +lofar_EXTERNAL(ACC/APS,1,APS/ParameterSet.h,,) lofar_EXTERNAL(log4cplus,1,log4cplus/logger.h,,) lofar_EXTERNAL(boost,1,boost/shared_ptr.hpp,"") lofar_EXTERNAL(GCFTM,1,GCF/TM/GCF_Control.h,,) diff --git a/MAC/APL/APLCommon/include/APL/APLCommon/LogicalDevice.h b/MAC/APL/APLCommon/include/APL/APLCommon/LogicalDevice.h index 14990ff174e..07174d9173b 100644 --- a/MAC/APL/APLCommon/include/APL/APLCommon/LogicalDevice.h +++ b/MAC/APL/APLCommon/include/APL/APLCommon/LogicalDevice.h @@ -46,7 +46,7 @@ #include <Common/lofar_vector.h> //# ACC Includes -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> // forward declaration @@ -209,7 +209,7 @@ namespace APLCommon std::string m_basePropertySetName; GCFMyPropertySetSharedPtr m_detailsPropertySet; std::string m_detailsPropertySetName; - ACC::ParameterSet m_parameterSet; + ACC::APS::ParameterSet m_parameterSet; string m_serverPortName; TRemotePort m_serverPort; // listening port diff --git a/MAC/APL/APLCommon/include/APLCommon/LogicalDevice.h b/MAC/APL/APLCommon/include/APLCommon/LogicalDevice.h index 14990ff174e..07174d9173b 100644 --- a/MAC/APL/APLCommon/include/APLCommon/LogicalDevice.h +++ b/MAC/APL/APLCommon/include/APLCommon/LogicalDevice.h @@ -46,7 +46,7 @@ #include <Common/lofar_vector.h> //# ACC Includes -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> // forward declaration @@ -209,7 +209,7 @@ namespace APLCommon std::string m_basePropertySetName; GCFMyPropertySetSharedPtr m_detailsPropertySet; std::string m_detailsPropertySetName; - ACC::ParameterSet m_parameterSet; + ACC::APS::ParameterSet m_parameterSet; string m_serverPortName; TRemotePort m_serverPort; // listening port diff --git a/MAC/APL/APLCommon/src/LogicalDevice.cc b/MAC/APL/APLCommon/src/LogicalDevice.cc index f38e12ad127..a399e4f681c 100644 --- a/MAC/APL/APLCommon/src/LogicalDevice.cc +++ b/MAC/APL/APLCommon/src/LogicalDevice.cc @@ -45,7 +45,7 @@ str = str.c_str(); \ } -using namespace LOFAR::ACC; +using namespace LOFAR::ACC::APS; using namespace LOFAR::GCF::Common; using namespace LOFAR::GCF::TM; using namespace LOFAR::GCF::PAL; diff --git a/MAC/APL/PAC/_VirtualBackend/src/VirtualBackendLD.cc b/MAC/APL/PAC/_VirtualBackend/src/VirtualBackendLD.cc index 11cbe8bde35..d7f220584a3 100644 --- a/MAC/APL/PAC/_VirtualBackend/src/VirtualBackendLD.cc +++ b/MAC/APL/PAC/_VirtualBackend/src/VirtualBackendLD.cc @@ -24,14 +24,14 @@ #include "VirtualBackendLD.h" #include <APLCommon/LogicalDevice_Protocol.ph> -#include <ACC/KVpair.h> +#include <APS/KVpair.h> #include <GCF/GCF_PVChar.h> #include <GCF/GCF_PVString.h> #include <GCF/Utils.h> namespace LOFAR { -using namespace ACC; +using namespace ACC::APS; using namespace APLCommon; using namespace GCF::Common; using namespace GCF::TM; diff --git a/MAC/APL/_GSO/MACScheduler/configure.in b/MAC/APL/_GSO/MACScheduler/configure.in index 0123a90d607..d43c91ecdcb 100644 --- a/MAC/APL/_GSO/MACScheduler/configure.in +++ b/MAC/APL/_GSO/MACScheduler/configure.in @@ -62,7 +62,7 @@ lofar_COMPILETOOLS #lofar_MPI(0) lofar_PVSS(1) lofar_EXTERNAL(common,1,Common/LofarTypes.h,,) -lofar_EXTERNAL(ACC,1,ACC/ParameterSet.h,,) +lofar_EXTERNAL(ACC/APS,1,APS/ParameterSet.h,,) lofar_EXTERNAL(log4cplus,1,log4cplus/logger.h,,) lofar_EXTERNAL(boost,1,boost/shared_ptr.hpp,"") lofar_EXTERNAL(GCFTM,1,GCF/TM/GCF_Control.h,,) diff --git a/MAC/APL/_GSO/MACScheduler/src/MACScheduler.cc b/MAC/APL/_GSO/MACScheduler/src/MACScheduler.cc index 82e166d23c3..04d238c1af1 100644 --- a/MAC/APL/_GSO/MACScheduler/src/MACScheduler.cc +++ b/MAC/APL/_GSO/MACScheduler/src/MACScheduler.cc @@ -190,18 +190,18 @@ void MACScheduler::handlePropertySetAnswer(GCFEvent& answer) { // read the parameterset from the database: #ifndef ACC_CONFIGURATIONMGR_UNAVAILABLE - boost::shared_ptr<ACC::ParameterSet> ps(m_configurationManager->getPS(parameters[0], "latest"); + boost::shared_ptr<ACC::APS::ParameterSet> ps(m_configurationManager->getPS(parameters[0], "latest"); #else // ACC_CONFIGURATIONMGR_UNAVAILABLE LOG_FATAL("TODO: Use ACC::ConfigurationMgr to access OTDB database"); // When the ACC::ConfigurationMgr can be used, then the following code is obsolete: ACC::ParameterCollection pc(shareLocation + string("source/") + parameters[0]); // assume VIrootID is a file - boost::shared_ptr<ACC::ParameterSet> ps(new ACC::ParameterSet(pc)); + boost::shared_ptr<ACC::APS::ParameterSet> ps(new ACC::APS::ParameterSet(pc)); // End of soon to be obsolete code #endif // ACC_CONFIGURATIONMGR_UNAVAILABLE // replace the parent port (assigned by the ServiceBroker) unsigned int parentPort = m_VIparentPort.getPortNumber(); - ACC::KVpair kvPair(string("parentPort"),(int)parentPort); + ACC::APS::KVpair kvPair(string("parentPort"),(int)parentPort); ps->replace(kvPair); // get some parameters and write it to the allocated CCU @@ -261,18 +261,18 @@ ADJUSTEVENTSTRINGPARAMTOBSE(sdScheduleEvent.fileName) { // read the parameterset from the database: #ifndef ACC_CONFIGURATIONMGR_UNAVAILABLE - boost::shared_ptr<ACC::ParameterSet> ps(m_configurationManager->getPS(parameters[0], "latest"); + boost::shared_ptr<ACC::APS::ParameterSet> ps(m_configurationManager->getPS(parameters[0], "latest"); #else // ACC_CONFIGURATIONMGR_UNAVAILABLE LOG_FATAL("TODO: Use ACC::ConfigurationMgr to access OTDB database"); // When the ACC::ConfigurationMgr can be used, then the following code is obsolete: ACC::ParameterCollection pc(shareLocation + string("source/") + parameters[0]); // assume VIrootID is a file - boost::shared_ptr<ACC::ParameterSet> ps(new ACC::ParameterSet(pc)); + boost::shared_ptr<ACC::APS::ParameterSet> ps(new ACC::APS::ParameterSet(pc)); // End of soon to be obsolete code #endif // ACC_CONFIGURATIONMGR_UNAVAILABLE // replace the parent port (assigned by the ServiceBroker) unsigned int parentPort = m_VIparentPort.getPortNumber(); - ACC::KVpair kvPair(string("parentPort"),(int)parentPort); + ACC::APS::KVpair kvPair(string("parentPort"),(int)parentPort); ps->replace(kvPair); string allocatedCCU = ps->getString("allocatedCCU"); @@ -329,12 +329,12 @@ ADJUSTEVENTSTRINGPARAMTOBSE(scheduleEvent.fileName) { // read the parameterset from the database: #ifndef ACC_CONFIGURATIONMGR_UNAVAILABLE - boost::shared_ptr<ACC::ParameterSet> ps(m_configurationManager->getPS(parameters[0], "latest"); + boost::shared_ptr<ACC::APS::ParameterSet> ps(m_configurationManager->getPS(parameters[0], "latest"); #else // ACC_CONFIGURATIONMGR_UNAVAILABLE LOG_FATAL("TODO: Use ACC::ConfigurationMgr to access OTDB database"); // When the ACC::ConfigurationMgr can be used, then the following code is obsolete: ACC::ParameterCollection pc(shareLocation + string("source/") + parameters[0]); // assume VIrootID is a file - boost::shared_ptr<ACC::ParameterSet> ps(new ACC::ParameterSet(pc)); + boost::shared_ptr<ACC::APS::ParameterSet> ps(new ACC::APS::ParameterSet(pc)); // End of soon to be obsolete code #endif // ACC_CONFIGURATIONMGR_UNAVAILABLE @@ -807,18 +807,18 @@ void MACScheduler::_handleSASprotocol(GCFEvent& event, GCFPortInterface& port) { // read the parameterset from the database: #ifndef ACC_CONFIGURATIONMGR_UNAVAILABLE - boost::shared_ptr<ACC::ParameterSet> ps(m_configurationManager->getPS(sasScheduleEvent.VIrootID, "latest"); + boost::shared_ptr<ACC::APS::ParameterSet> ps(m_configurationManager->getPS(sasScheduleEvent.VIrootID, "latest"); #else // ACC_CONFIGURATIONMGR_UNAVAILABLE LOG_FATAL("TODO: Use ACC::ConfigurationMgr to access OTDB database"); // When the ACC::ConfigurationMgr can be used, then the following code is obsolete: ACC::ParameterCollection pc(shareLocation + sasScheduleEvent.VIrootID); // assume VIrootID is a file - boost::shared_ptr<ACC::ParameterSet> ps(new ACC::ParameterSet(pc)); + boost::shared_ptr<ACC::APS::ParameterSet> ps(new ACC::APS::ParameterSet(pc)); // End of soon to be obsolete code #endif // ACC_CONFIGURATIONMGR_UNAVAILABLE // replace the parent port (assigned by the ServiceBroker) unsigned int parentPort = m_VIparentPort.getPortNumber(); - ACC::KVpair kvPair(string("parentPort"),(int)parentPort); + ACC::APS::KVpair kvPair(string("parentPort"),(int)parentPort); ps->replace(kvPair); // get some parameters and write it to the allocated CCU @@ -902,12 +902,12 @@ ADJUSTEVENTSTRINGPARAMTOBSE(sasResponseEvent.VIrootID) { // read the parameterset from the database: #ifndef ACC_CONFIGURATIONMGR_UNAVAILABLE - boost::shared_ptr<ACC::ParameterSet> ps(m_configurationManager->getPS(sasCancelScheduleEvent.VIrootID, "latest"); + boost::shared_ptr<ACC::APS::ParameterSet> ps(m_configurationManager->getPS(sasCancelScheduleEvent.VIrootID, "latest"); #else // ACC_CONFIGURATIONMGR_UNAVAILABLE LOG_FATAL("TODO: Use ACC::ConfigurationMgr to access OTDB database"); // When the ACC::ConfigurationMgr can be used, then the following code is obsolete: ACC::ParameterCollection pc(shareLocation + sasCancelScheduleEvent.VIrootID); // assume VIrootID is a file - boost::shared_ptr<ACC::ParameterSet> ps(new ACC::ParameterSet(pc)); + boost::shared_ptr<ACC::APS::ParameterSet> ps(new ACC::APS::ParameterSet(pc)); // End of soon to be obsolete code #endif // ACC_CONFIGURATIONMGR_UNAVAILABLE @@ -958,18 +958,18 @@ ADJUSTEVENTSTRINGPARAMTOBSE(sasResponseEvent.VIrootID) { // read the parameterset from the database: #ifndef ACC_CONFIGURATIONMGR_UNAVAILABLE - boost::shared_ptr<ACC::ParameterSet> ps(m_configurationManager->getPS(sasUpdateScheduleEvent.VIrootID, "latest"); + boost::shared_ptr<ACC::APS::ParameterSet> ps(m_configurationManager->getPS(sasUpdateScheduleEvent.VIrootID, "latest"); #else // ACC_CONFIGURATIONMGR_UNAVAILABLE LOG_FATAL("TODO: Use ACC::ConfigurationMgr to access OTDB database"); // When the ACC::ConfigurationMgr can be used, then the following code is obsolete: ACC::ParameterCollection pc(shareLocation + sasUpdateScheduleEvent.VIrootID); // assume VIrootID is a file - boost::shared_ptr<ACC::ParameterSet> ps(new ACC::ParameterSet(pc)); + boost::shared_ptr<ACC::APS::ParameterSet> ps(new ACC::APS::ParameterSet(pc)); // End of soon to be obsolete code #endif // ACC_CONFIGURATIONMGR_UNAVAILABLE // replace the parent port (assigned by the ServiceBroker) unsigned int parentPort = m_VIparentPort.getPortNumber(); - ACC::KVpair kvPair(string("parentPort"),(int)parentPort); + ACC::APS::KVpair kvPair(string("parentPort"),(int)parentPort); ps->replace(kvPair); string allocatedCCU = ps->getString("allocatedCCU"); @@ -1025,7 +1025,7 @@ ADJUSTEVENTSTRINGPARAMTOBSE(sasResponseEvent.VIrootID) } } -void MACScheduler::_convertRelativeTimes(boost::shared_ptr<ACC::ParameterSet> ps) +void MACScheduler::_convertRelativeTimes(boost::shared_ptr<ACC::APS::ParameterSet> ps) { try { @@ -1036,7 +1036,7 @@ void MACScheduler::_convertRelativeTimes(boost::shared_ptr<ACC::ParameterSet> ps } } -void MACScheduler::_convertRelativeTimesChild(string child, boost::shared_ptr<ACC::ParameterSet> ps) +void MACScheduler::_convertRelativeTimesChild(string child, boost::shared_ptr<ACC::APS::ParameterSet> ps) { string keyPrefix(""); if(child.length() > 0) @@ -1054,13 +1054,13 @@ void MACScheduler::_convertRelativeTimesChild(string child, boost::shared_ptr<AC time_t startTime = APLUtilities::decodeTimeString(ps->getString(startKey)); time_t stopTime = APLUtilities::decodeTimeString(ps->getString(stopKey)); - ACC::KVpair kvPairClaimTime(claimKey,(int)claimTime); + ACC::APS::KVpair kvPairClaimTime(claimKey,(int)claimTime); ps->replace(kvPairClaimTime); - ACC::KVpair kvPairPrepareTime(prepareKey,(int)prepareTime); + ACC::APS::KVpair kvPairPrepareTime(prepareKey,(int)prepareTime); ps->replace(kvPairPrepareTime); - ACC::KVpair kvPairStartTime(startKey,(int)startTime); + ACC::APS::KVpair kvPairStartTime(startKey,(int)startTime); ps->replace(kvPairStartTime); - ACC::KVpair kvPairStopTime(stopKey,(int)stopTime); + ACC::APS::KVpair kvPairStopTime(stopKey,(int)stopTime); ps->replace(kvPairStopTime); // propagate into the child keys diff --git a/MAC/APL/_GSO/MACScheduler/src/MACScheduler.h b/MAC/APL/_GSO/MACScheduler/src/MACScheduler.h index 2d58d6219a7..df5ec29b9fc 100644 --- a/MAC/APL/_GSO/MACScheduler/src/MACScheduler.h +++ b/MAC/APL/_GSO/MACScheduler/src/MACScheduler.h @@ -51,7 +51,7 @@ #ifndef ACC_CONFIGURATIONMGR_UNAVAILABLE #include <ACC/ConfigurationMgr.h> #endif // ACC_CONFIGURATIONMGR_UNAVAILABLE -#include <ACC/ParameterSet.h> +#include <APS/ParameterSet.h> // forward declaration @@ -144,8 +144,8 @@ namespace GSO TSASResult _LDtoSASresult(const TLDResult& ldResult); TSASResult _SDtoSASresult(const TSDResult& sdResult); - void _convertRelativeTimes(boost::shared_ptr<ACC::ParameterSet> ps); - void _convertRelativeTimesChild(string child, boost::shared_ptr<ACC::ParameterSet> ps); + void _convertRelativeTimes(boost::shared_ptr<ACC::APS::ParameterSet> ps); + void _convertRelativeTimesChild(string child, boost::shared_ptr<ACC::APS::ParameterSet> ps); bool _allocateBeamlets(const string& VIrootID, boost::shared_ptr<ACC::ParameterSet> ps); -- GitLab