From aec5781e9f9ee02985ef72f37de6c442637d2eed Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Thu, 16 Nov 2023 11:06:12 +0100 Subject: [PATCH] [core] Add support for ctp_readout_enabled forwarding to CTP service --- core/integration/trg/plugin.go | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/core/integration/trg/plugin.go b/core/integration/trg/plugin.go index a7bdd434..3cb13c86 100644 --- a/core/integration/trg/plugin.go +++ b/core/integration/trg/plugin.go @@ -558,10 +558,24 @@ func (p *Plugin) CallStack(data interface{}) (stack map[string]interface{}) { return } + ctpReadoutIncluded := false + ctpReadoutIncludedStr, ok := varStack["ctp_readout_enabled"] + if ok { + ctpReadoutIncluded, err = strconv.ParseBool(ctpReadoutIncludedStr) + if err != nil { + log.WithError(err). + WithField("level", infologger.IL_Support). + WithField("partition", envId). + WithField("call", "RunLoad"). + Warn("could not parse ctp_readout_enabled value") + } + } + in := trgpb.RunLoadRequest{ - Runn: uint32(runNumber64), - Detectors: detectors, - Config: globalConfig, + Runn: uint32(runNumber64), + Detectors: detectors, + Config: globalConfig, + CtpReadoutIncluded: ctpReadoutIncluded, } if p.trgClient == nil { err = fmt.Errorf("TRG plugin not initialized, RunLoad impossible")