Trace fcl parameters to source file
It would be nice to be able to trace origin (source file and line number) of (final) fcl parameter values in parameter sets generated by fcl job files. This is hard to do manually due to multiple levels of include files with possible parameter overriding in different fcl files.
#1 Updated by Christopher Green over 5 years ago
- Category set to Infrastructure
- Target version set to 1.14.00
- Estimated time set to 32.00 h
- SSI Package fhicl-cpp added
- SSI Package deleted (
We believe that implementing this is relatively straightforward, and that is reflected in the time estimate. One possible wrinkle is that the most appropriate place for the origin information is in the intermediate table, but the formatted printing for the diagnostics is done on the final parameter sets, and some thought / work may be necessary to reconcile these two facts.
#4 Updated by Kyle Knoepfel about 5 years ago
- Status changed from Accepted to Assigned
- Assignee set to Kyle Knoepfel
- % Done changed from 0 to 20
Chris Green and I have investigated this issue at length. The path forward is to add a data member to the
fhicl::extended_value class that contains the file/line-number information. This involves updating the
document_parser portion of fhiclcpp/parse.cc and providing a properly overloaded/specialized
encode function. Estimated total time of 32 hrs. still seems reasonable.
#5 Updated by Kyle Knoepfel about 5 years ago
- File uboone_dump.fcl uboone_dump.fcl added
- Status changed from Assigned to Resolved
- % Done changed from 20 to 100
We now provide the filename and line number of the origin of the FHiCL parameters (or where they were last overridden) whenever the following options are used:
art --debug-config config.out -c file-to-debug.fcl # prints out 'config.out' and stops processing art --config-out config.out -c file-to-debug.fcl # prints out 'config.out' and continues the art job
For an example of the type of printout, see uboone_dump.fcl, which was produced using:
art --debug-config uboone_dump.fcl -c standard_detsim_uboone.fclEntries without annotations correspond to FHiCL parameters that fall under four categories:
- they were inserted by the framework and thus have no FHiCL file source,
- they originate from dumping rootfile configuration information and thus have no FHiCL file source,
- they are sequences which are defined on the same line as the first element of the sequence,
- they correspond to nested tables that were inserted through a fully qualified name. For example, in the case where the user specifies
keywill have source information, but the intermediate table will not.
- Manual override in (possibly user) code using one of the replacing
Entries with '
# ""' annotations refer to source locations that are the same as those on immediately previous lines.
If it is desired to use a script to parse the output, the information provided may not be in a format that can be easily parsed. For that reason, I will enter another issue into the tracker to anticipate future needs.