diff --git a/Appl/CEP/CS1/CS1_BGLProc/src/AH_BGL_Processing.cc b/Appl/CEP/CS1/CS1_BGLProc/src/AH_BGL_Processing.cc index ebe8335d5b52961690d7a408097e973f4f41454b..49894d41661b78ea1802e7833d37cd161889ee9e 100644 --- a/Appl/CEP/CS1/CS1_BGLProc/src/AH_BGL_Processing.cc +++ b/Appl/CEP/CS1/CS1_BGLProc/src/AH_BGL_Processing.cc @@ -32,15 +32,14 @@ #include <CS1_Interface/Stub_BGL_Subband.h> //#include <CS1_Interface/Stub_BGL_RFI_Mitigation.h> #include <CS1_Interface/Stub_BGL_Visibilities.h> -// tinyCEP +#include <Transport/BGLConnection.h> -// Transporters #if defined HAVE_MPI #include <Transport/TH_MPI.h> #endif #if defined USE_ZOID -#include <CS1_Interface/TH_ZoidClient.h> +#include <CS1_BGLProc/TH_ZoidClient.h> #endif #include <Blob/KeyValueMap.h> @@ -135,6 +134,8 @@ void AH_BGL_Processing::define(const KeyValueMap&) { unsigned psetsPerCell = itsParamSet.getInt32("BGLProc.PsetsPerCell"); unsigned usedNodesPerPset = itsParamSet.getInt32("BGLProc.NodesPerPset"); unsigned nrSubbandsPerPset = itsParamSet.getInt32("General.SubbandsPerPset"); + bool connectInput = itsParamSet.getBool("Connections.InputToBGLProc"); + bool connectOutput = itsParamSet.getBool("Connections.BGLProcToStorage"); ASSERTSTR(nrSubBands <= baseFreqs.size(), "Not enough base frequencies in Data.RefFreqs specified"); @@ -184,12 +185,27 @@ void AH_BGL_Processing::define(const KeyValueMap&) { #if defined USE_ZOID TH_ZoidClient *th = new TH_ZoidClient(); - Connection *conn = new Connection("zoid", 0, dm.getGeneralInHolder(WH_BGL_Processing::SUBBAND_CHANNEL), th, true); - dm.setInConnection(WH_BGL_Processing::SUBBAND_CHANNEL, conn); + + if (connectInput) { + Connection *in = new BGLConnection("zoid", 0, dm.getGeneralInHolder(WH_BGL_Processing::SUBBAND_CHANNEL), th); + dm.setInConnection(WH_BGL_Processing::SUBBAND_CHANNEL, in); + } + + if (connectOutput) { +#if 1 + Connection *out = new BGLConnection("zoid", dm.getGeneralOutHolder(WH_BGL_Processing::VISIBILITIES_CHANNEL), 0, th); + dm.setOutConnection(WH_BGL_Processing::VISIBILITIES_CHANNEL, out); #else - itsSubbandStub->connect(cell, cellCore, dm, WH_BGL_Processing::SUBBAND_CHANNEL); + itsVisibilitiesStub->connect(cell, cellCore, dm, WH_BGL_Processing::VISIBILITIES_CHANNEL); +#endif + } +#else + if (connectInput) + itsSubbandStub->connect(cell, cellCore, dm, WH_BGL_Processing::SUBBAND_CHANNEL); // itsRFI_MitigationStub->connect(cell, cellCore, dm, WH_BGL_Processing::RFI_MITIGATION_CHANNEL); - itsVisibilitiesStub->connect(cell, cellCore, dm, WH_BGL_Processing::VISIBILITIES_CHANNEL); + + if (connectOutput) + itsVisibilitiesStub->connect(cell, cellCore, dm, WH_BGL_Processing::VISIBILITIES_CHANNEL); #endif #if defined HAVE_BGL diff --git a/Appl/CEP/CS1/CS1_BGLProc/src/WH_BGL_Processing.cc b/Appl/CEP/CS1/CS1_BGLProc/src/WH_BGL_Processing.cc index e04c10fe4070dd408c55878cf1e36367a336a210..3198f5dd363799a83bd040ceb607396c66c9de24 100644 --- a/Appl/CEP/CS1/CS1_BGLProc/src/WH_BGL_Processing.cc +++ b/Appl/CEP/CS1/CS1_BGLProc/src/WH_BGL_Processing.cc @@ -1180,6 +1180,8 @@ WH_BGL_Processing::WH_BGL_Processing(const string& name, unsigned coreNumber, co itsCurrentSubband = itsFirstSubband + coreNumber % nrNodesPerPset % nrSubbandsPerPset; itsSubbandIncrement = nrNodesPerPset % nrSubbandsPerPset; + itsInputConnected = ps.getBool("Connections.InputToBGLProc"); + getDataManager().addInDataHolder(SUBBAND_CHANNEL, new DH_Subband("input", ps)); //getDataManager().addInDataHolder(RFI_MITIGATION_CHANNEL, new DH_RFI_Mitigation("RFI")); getDataManager().addOutDataHolder(VISIBILITIES_CHANNEL, new DH_Visibilities("output", ps)); @@ -1787,7 +1789,8 @@ void WH_BGL_Processing::process() readTimer.start(); getDataManager().readyWithInHolder(SUBBAND_CHANNEL); #if defined SPARSE_FLAGS - get_DH_Subband()->getExtraData(); + if (itsInputConnected) + get_DH_Subband()->getExtraData(); #endif readTimer.stop(); diff --git a/Appl/CEP/CS1/CS1_BGLProc/src/WH_BGL_Processing.h b/Appl/CEP/CS1/CS1_BGLProc/src/WH_BGL_Processing.h index cf919eed5f978aeadfff309b28ed6ed486d52c18..5a0c813e97a7305bc26a09f600897e32c4b58f23 100644 --- a/Appl/CEP/CS1/CS1_BGLProc/src/WH_BGL_Processing.h +++ b/Appl/CEP/CS1/CS1_BGLProc/src/WH_BGL_Processing.h @@ -139,6 +139,7 @@ class WH_BGL_Processing: public WorkHolder { const ACC::APS::ParameterSet &itsPS; const unsigned itsCoreNumber; unsigned itsFirstSubband, itsCurrentSubband, itsLastSubband, itsSubbandIncrement; + bool itsInputConnected; static FIR itsFIRs[NR_STATIONS][NR_POLARIZATIONS][NR_SUBBAND_CHANNELS] CACHE_ALIGNED; diff --git a/Appl/CEP/CS1/CS1_Interface/src/CS1.parset b/Appl/CEP/CS1/CS1_Interface/src/CS1.parset index 4f2d19be5bf33af20239a5288ee7a377ef9531c5..08c782eecab2db32f909cf77a87ca8c240b3645c 100644 --- a/Appl/CEP/CS1/CS1_Interface/src/CS1.parset +++ b/Appl/CEP/CS1/CS1_Interface/src/CS1.parset @@ -19,6 +19,9 @@ Connections.Input_BGLProc.Ports =[8000,8001,8002,8003,8004,8005,8006,8007,8008, Connections.BGLProc_Storage.Ports=[8200,8201,8202,8203,8204,8205,8206,8207,8208,8209,8210,8211,8212,8213,8214,8215] Connections.AMC.Port =31337 +Connections.InputToBGLProc = T +Connections.BGLProcToStorage = T + # The format of the data Observation.NSubbands=4 Observation.NChannels = 256 diff --git a/Appl/CEP/CS1/CS1_Run/src/CS1.parset b/Appl/CEP/CS1/CS1_Run/src/CS1.parset index d571290426652c4bca3fb171d909da3c5acb88c3..cbcdbfee574cc80fec0ec6e90eb047b848669d55 100644 --- a/Appl/CEP/CS1/CS1_Run/src/CS1.parset +++ b/Appl/CEP/CS1/CS1_Run/src/CS1.parset @@ -20,6 +20,9 @@ Connections.Input_BGLProc.Ports =[8000, 8001, 8002, 8003, 8004, 8005, 8006, 800 Connections.BGLProc_Storage.Ports=[8200, 8201, 8202, 8203, 8204, 8205, 8206, 8207, 8208, 8209, 8210, 8211, 8212, 8213, 8214, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8223, 8224, 8225, 8226, 8227, 8228, 8229, 8230, 8231, 8232, 8233, 8234, 8235, 8236, 8237, 8238, 8239, 8240, 8241, 8242, 8243, 8244, 8245, 8246, 8247, 8248, 8249, 8250, 8251, 8252, 8253, 8254, 8255, 8256, 8257, 8258, 8259, 8260, 8261, 8262, 8263] Connections.AMC.Port =31337 +Connections.InputToBGLProc = T +Connections.BGLProcToStorage = T + # The format of the data Observation.NChannels = 256 Observation.NPolarisations=2