Skip to content

Commit b3252bf

Browse files
committed
[core] CCDB client: include TRG in GRP object if ctp_readout_enabled
1 parent 0e96dfe commit b3252bf

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

core/integration/ccdb/plugin.go

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,20 @@ import (
2929
"encoding/json"
3030
"errors"
3131
"fmt"
32+
"go/types"
33+
"net/url"
34+
"os/exec"
35+
"strconv"
36+
"strings"
37+
"time"
38+
3239
"github.com/AliceO2Group/Control/common/logger"
3340
"github.com/AliceO2Group/Control/common/runtype"
3441
"github.com/AliceO2Group/Control/common/utils/uid"
3542
"github.com/AliceO2Group/Control/core/integration"
3643
"github.com/AliceO2Group/Control/core/workflow/callable"
3744
"github.com/sirupsen/logrus"
3845
"github.com/spf13/viper"
39-
"go/types"
40-
"net/url"
41-
"os/exec"
42-
"strconv"
43-
"strings"
44-
"time"
4546
)
4647

4748
var log = logger.New(logrus.StandardLogger(), "ccdbclient")
@@ -164,6 +165,13 @@ func NewGRPObject(varStack map[string]string) *GeneralRunParameters {
164165
return nil
165166
}
166167

168+
// Special case: if ctp_readout_enabled, we must add TRG to the detectors list
169+
ctpReadoutEnabled := "false"
170+
ctpReadoutEnabled, ok = varStack["ctp_readout_enabled"]
171+
if ok && strings.ToLower(strings.TrimSpace(ctpReadoutEnabled)) == "true" {
172+
detectorsSlice = append(detectorsSlice, "TRG")
173+
}
174+
167175
// TODO fill once we have those available
168176
var continuousReadoutDetectors []string
169177
var triggeringDetectors []string

0 commit comments

Comments
 (0)