-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request