Project

General

Profile

Feature #7788

Trace fcl parameters to source file

Added by Herbert Greenlee about 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Infrastructure
Target version:
Start date:
02/05/2015
Due date:
% Done:

100%

Estimated time:
32.00 h
Spent time:
Scope:
Internal
Experiment:
MicroBooNE
SSI Package:
fhicl-cpp
Duration:

Description

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.

uboone_dump.fcl (82.9 KB) uboone_dump.fcl Kyle Knoepfel, 04/10/2015 01:15 PM

Related issues

Related to art - Feature #8300: FHiCL parameter tracker needs to provide parsable outputClosed04/10/201508/01/2015

History

#1 Updated by Christopher Green about 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.

#2 Updated by Christopher Green about 5 years ago

  • Status changed from New to Accepted

#3 Updated by Adam Lyon about 5 years ago

This is a nice feature to have. Glad it's been requested and accepted.

#4 Updated by Kyle Knoepfel almost 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 almost 5 years ago

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.fcl
Entries 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 'first_table.<a_new_table>.key', first_table and key will have source information, but the intermediate table will not.
  • Manual override in (possibly user) code using one of the replacing put...() calls.

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.

Implemented with commits cetlib:c9358b6e607f11b764072fbcab9358e5fc45c04d, fhicl-cpp:d6a9621743e969ab9dc40c069cb0eec11bc1d9e4, and art:50bcebf86080333cf7b98db9cca012f337477d2e.

#6 Updated by Kyle Knoepfel almost 5 years ago

  • Related to Feature #8300: FHiCL parameter tracker needs to provide parsable output added

#7 Updated by Kyle Knoepfel almost 5 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF