mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
Merge channels from config to device, instead of replace
This commit is contained in:
parent
a26925cbf5
commit
6f18cf23da
|
@ -968,7 +968,13 @@ void FairMQDevice::SetConfig(FairMQProgOptions& config)
|
||||||
{
|
{
|
||||||
fExternalConfig = true;
|
fExternalConfig = true;
|
||||||
fConfig = &config;
|
fConfig = &config;
|
||||||
fChannels = config.GetFairMQMap();
|
for (auto& c : config.GetFairMQMap())
|
||||||
|
{
|
||||||
|
if (!fChannels.insert(c).second)
|
||||||
|
{
|
||||||
|
LOG(WARN) << "FairMQDevice::SetConfig: did not insert channel '" << c.first << "', it is already in the device.";
|
||||||
|
}
|
||||||
|
}
|
||||||
fDefaultTransport = config.GetValue<string>("transport");
|
fDefaultTransport = config.GetValue<string>("transport");
|
||||||
SetTransport(fDefaultTransport);
|
SetTransport(fDefaultTransport);
|
||||||
fId = config.GetValue<string>("id");
|
fId = config.GetValue<string>("id");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user