Skip to content
Snippets Groups Projects
Commit 6689e1b2 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

fixed variable networks with external trigger not being put into the same...

fixed variable networks with external trigger not being put into the same TriggerFanOut (which is required since they should be in the same TransferGroup)
parent 71ac02e9
No related branches found
No related tags found
No related merge requests found
......@@ -127,8 +127,9 @@ namespace ChimeraTK {
/** List of constant variable nodes */
std::list<VariableNetworkNode> constantList;
/** Map of trigger sources to their corresponding TriggerFanOuts */
std::map<boost::shared_ptr<mtca4u::TransferElement>, boost::shared_ptr<TriggerFanOut>> triggerMap;
/** Map of trigger sources to their corresponding TriggerFanOuts. Note: we need to use the plain pointer as a
* key, since the shared pointer objects would not be identical even when pointing to the same target. */
std::map<mtca4u::TransferElement*, boost::shared_ptr<TriggerFanOut>> triggerMap;
/** Create a new, empty network */
VariableNetwork& createNetwork();
......
......@@ -446,7 +446,7 @@ void Application::typedMakeConnection(VariableNetwork &network) {
if(useExternalTrigger) {
// if external trigger is enabled, use externally triggered threaded FanOut
auto triggerNode = network.getExternalTriggerImpl();
auto triggerFanOut = triggerMap[triggerNode];
auto triggerFanOut = triggerMap[triggerNode.get()];
if(!triggerFanOut) {
triggerFanOut = boost::make_shared<TriggerFanOut>(triggerNode);
internalModuleList.push_back(triggerFanOut);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment