[Feature]: Ensure that objects are actually retrieved from the configuration
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 0
- Forks
- 1
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 7
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search SmartDaqApplication implementations for get_queue_rules and similar Queue Descriptor or Network Descriptor retrieval patterns, then inspect how BadConf is used. Add checks for retrieved pointers that remain nullptr, and consider the work done when missing configuration objects consistently produce BadConf instead of a segmentation fault.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100