Skip to content

Commit

Permalink
[core] Add support for ctp_readout_enabled forwarding to CTP service
Browse files Browse the repository at this point in the history
  • Loading branch information
teo committed Nov 16, 2023
1 parent 0325649 commit aec5781
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions core/integration/trg/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit aec5781

Please sign in to comment.