From 829f84ad1e33bbba1fcc7c0b4f926a89fb9dd7ca Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Fri, 1 Mar 2024 11:16:41 +0100 Subject: [PATCH 1/2] [core] Ensure the CTP readout FLP is included in BK call if enabled --- core/integration/bookkeeping/plugin.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/core/integration/bookkeeping/plugin.go b/core/integration/bookkeeping/plugin.go index afa6541a..4f752fe7 100644 --- a/core/integration/bookkeeping/plugin.go +++ b/core/integration/bookkeeping/plugin.go @@ -431,6 +431,24 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) { rnString := strconv.FormatUint(uint64(runNumber), 10) flps := env.GetFLPs() + + // The enabled status of CTP Readout and its FLP is governed by the variable ctp_readout_enabled, so it requires + // special treatment to be included in the list of FLPs + ctpReadoutEnabled, err := strconv.ParseBool(env.GetKV("", "ctp_readout_enabled")) + if err != nil { + log.WithError(err). + WithField("run", runNumber64). + WithField("partition", envId). + WithField("call", "StartOfRun"). + Warning("cannot parse CTP readout enabled") + } + if ctpReadoutEnabled { + ctpReadoutFlp := env.GetKV("", "ctp_readout_host") + if len(ctpReadoutFlp) > 0 { + flps = append(flps, ctpReadoutFlp) + } + } + epns, err := strconv.ParseInt(env.GetKV("", "odc_n_epns"), 10, 0) if err != nil { log.WithError(err). From 5697355fdc66aa0c469342fd1ab407fb69fa847a Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac <126364+teo@users.noreply.github.com> Date: Fri, 1 Mar 2024 13:06:13 +0100 Subject: [PATCH 2/2] [core] Improve wording in warning message Co-authored-by: Piotr Konopka --- core/integration/bookkeeping/plugin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/integration/bookkeeping/plugin.go b/core/integration/bookkeeping/plugin.go index 4f752fe7..e6d46502 100644 --- a/core/integration/bookkeeping/plugin.go +++ b/core/integration/bookkeeping/plugin.go @@ -440,7 +440,7 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) { WithField("run", runNumber64). WithField("partition", envId). WithField("call", "StartOfRun"). - Warning("cannot parse CTP readout enabled") + Warning("cannot parse ctp_readout_enabled") } if ctpReadoutEnabled { ctpReadoutFlp := env.GetKV("", "ctp_readout_host")