Description
In many SmartDaqApplication implementations, Queue Descriptor and Network Descriptor inputs are matched against what the application expects, with pointers to the expected descriptors being then used to create the connection objects that the application needs.
e.g.
const QueueDescriptor* fa_output_qdesc = nullptr;
for (auto rule : get_queue_rules()) {
auto destination_class = rule->get_destination_class();
if (destination_class == "FragmentAggregatorModule") {
fa_output_qdesc = rule->get_descriptor();
}
}
Whenever an object is retrieved from the configuration with a pattern like this, the pointer should be checked and a BadConf exception thrown if it is still nullptr. This prevents segmentation faults that are much harder to diagnose than a mismatch of configuration objects.
Potential impact radius
Small/Isolated
Reason for change
No response
Suggested implementations
No response
Testing suggestions
No response
Anything else?
No response
Description
In many SmartDaqApplication implementations, Queue Descriptor and Network Descriptor inputs are matched against what the application expects, with pointers to the expected descriptors being then used to create the connection objects that the application needs.
e.g.
Whenever an object is retrieved from the configuration with a pattern like this, the pointer should be checked and a BadConf exception thrown if it is still
nullptr. This prevents segmentation faults that are much harder to diagnose than a mismatch of configuration objects.Potential impact radius
Small/Isolated
Reason for change
No response
Suggested implementations
No response
Testing suggestions
No response
Anything else?
No response