mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-12 16:21:13 +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;
|
||||
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");
|
||||
SetTransport(fDefaultTransport);
|
||||
fId = config.GetValue<string>("id");
|
||||
|
|
Loading…
Reference in New Issue
Block a user