Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ctp_readout_enabled forwarding to CTP service #510

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
149 changes: 80 additions & 69 deletions core/integration/trg/protos/ctpecs.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions core/integration/trg/protos/ctpecs.proto
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ message RunLoadRequest {
// -partname -the content is in ctp config dir partname.pd
// -key in case the config is available in Consul[key]
string detectors= 3; // available detectors, "" -all required must be ready
bool ctp_readout_included = 4; // true: ctp readout included in the run
}
// global + stdalone runs (common for ctpd/ltud):
message RunStartRequest {
Expand Down
2 changes: 1 addition & 1 deletion core/integration/trg/protos/ctpecs_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading