mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 17:41:45 +00:00
Allow plugins to create channels
This also fixes a bug, that prevented the usage of custom types with the plugin config API.
This commit is contained in:
committed by
Dennis Klein
parent
3b5b2b501f
commit
5e4876c947
@@ -162,7 +162,7 @@ int FairMQProgOptions::ParseAll(const int argc, char const* const* argv, bool al
|
||||
else if (fVarMap.count("channel-config"))
|
||||
{
|
||||
LOG(debug) << "channel-config: Parsing channel configuration";
|
||||
UpdateChannelMap(parser::SUBOPT().UserParser(fVarMap.at("channel-config").as<vector<string>>(), idForParser));
|
||||
ParseChannelsFromCmdLine();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -185,6 +185,23 @@ int FairMQProgOptions::ParseAll(const int argc, char const* const* argv, bool al
|
||||
return 0;
|
||||
}
|
||||
|
||||
void FairMQProgOptions::ParseChannelsFromCmdLine()
|
||||
{
|
||||
string idForParser;
|
||||
|
||||
// check if config-key for config parser is provided
|
||||
if (fVarMap.count("config-key"))
|
||||
{
|
||||
idForParser = fVarMap["config-key"].as<string>();
|
||||
}
|
||||
else if (fVarMap.count("id"))
|
||||
{
|
||||
idForParser = fVarMap["id"].as<string>();
|
||||
}
|
||||
|
||||
UpdateChannelMap(parser::SUBOPT().UserParser(fVarMap.at("channel-config").as<vector<string>>(), idForParser));
|
||||
}
|
||||
|
||||
void FairMQProgOptions::ParseCmdLine(const int argc, char const* const* argv, bool allowUnregistered)
|
||||
{
|
||||
fVarMap.clear();
|
||||
|
Reference in New Issue
Block a user