Skip to content

Commit 3fca423

Browse files
committed
[core] Ensure the CTP readout FLP is included in BK call if enabled
1 parent 1783f5c commit 3fca423

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

core/integration/bookkeeping/plugin.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,24 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) {
431431
rnString := strconv.FormatUint(uint64(runNumber), 10)
432432

433433
flps := env.GetFLPs()
434+
435+
// The enabled status of CTP Readout and its FLP is governed by the variable ctp_readout_enabled, so it requires
436+
// special treatment to be included in the list of FLPs
437+
ctpReadoutEnabled, err := strconv.ParseBool(env.GetKV("", "ctp_readout_enabled"))
438+
if err != nil {
439+
log.WithError(err).
440+
WithField("run", runNumber64).
441+
WithField("partition", envId).
442+
WithField("call", "StartOfRun").
443+
Warning("cannot parse CTP readout enabled")
444+
}
445+
if ctpReadoutEnabled {
446+
ctpReadoutFlp := env.GetKV("", "ctp_readout_host")
447+
if len(ctpReadoutFlp) > 0 {
448+
flps = append(flps, ctpReadoutFlp)
449+
}
450+
}
451+
434452
epns, err := strconv.ParseInt(env.GetKV("", "odc_n_epns"), 10, 0)
435453
if err != nil {
436454
log.WithError(err).

0 commit comments

Comments
 (0)