Feature #17407
Configuration description of module
0%
Description
fhiclcpp offers automated validation and documentation of the configuration parameters.
It would be good to have the same documentation possibility for the top level configuration object.
For example:
struct Config {
fhicl::Description desc{
"The module estimates the momentum of the specified tracks from their Coulomb scattering."
};
fhicl::Atom<art::InputTag> tracks{
fhicl::Name{"tracks"},
fhicl::Comment{"tag of collection of tracks to be analysed"}
};
}; // struct Config
The idea is that when
Config
is enclosed in a fhicl::Table
and its description is requested, the content of the object(s) of type fhicl::Description
is dumped as header of the parameter documentation.
History
#1 Updated by Kyle Knoepfel over 3 years ago
- Status changed from New to Accepted
- Estimated time set to 24.00 h
This is a sensible request. It is somewhat non-trivial, however, to come up with an implementation that interacts seamlessly with the current system.
#2 Updated by Kyle Knoepfel almost 3 years ago
- Target version set to Vega
#3 Updated by Kyle Knoepfel over 1 year ago
After discussing this issue with Andrei (added as watcher), who also would benefit from this facility, we believe the best approach is to separate the actual configuration, and the description of the module for which the configuration struct
is implemented. Instead of:
struct Config {
fhicl::Description desc{"This module does such-and-such."};
...
};
using Parameters = Table<Config>;
The code would instead look (heuristically) like:
struct Config {
...
};
struct Description {
auto text() { return "This module does such-and-such."; }
};
using Parameters = Table<Config, Description>;
I will work to produce a design that reduces the amount of boilerplate needed for the Description
type.
#4 Updated by Kyle Knoepfel over 1 year ago
- Subject changed from Description of parameter set to Configuration description of module