formatting bug in output of --debug-config
I made a --debug-config file from one of the Mu2e fcl files that makes heavy use of @sequence:: and @table. There is a formatting bug in the output. The original error was found in Analyses/test/genReco.fcl . I have produced a stripped down version that is much shorter and still produces the bug.
Here is the command that will demonstrate the error:
mu2e -c Analyses/test/debug_config_bug.fcl --debug-config bug.fcl
In bug.fcl find the definition of gen_allpatrec_rec, which is shown below. The error is that after the first 10 module labels in the list, the comma that delimits module labels is missing.
gen_allpatrec_reco: [ "generate", "g4run", "protonTimeMap", "muonTimeMap", "MakeCaloReadoutHits", "MakeCaloCrystalHits", "makeSD", "makeSH", "FSHPreStereo", "MakeStereoHits", "FlagStrawHits" "FlagBkgHits" "TimePeakFinder" "PosHelixFinder" "TRFDownstreameMinus" ]
To reproduce the bug, first setup a ups repository. Then:
git clone http://cdcvs.fnal.gov/projects/mu2eofflinesoftwaremu2eoffline/Offline.git
mu2e -c Analyses/test/genReco.fcl --debug-config bug.fcl
You do need to build the Mu2e code in order to reproduce this bug.
#4 Updated by Kyle Knoepfel almost 5 years ago
- Status changed from Assigned to Resolved
- % Done changed from 0 to 100
When rewriting the
ParameterSet::to_indented_string implementation, I changed the sequence-element printout to rely on regex-pattern matching. To determine if a parameter is a sequence element it must have a key that ends with
"\[\d+\]" (at least one indexed digit -- e.g.
"seq"). I omitted the
'+' character so that elements with only one digit matched the pattern -- hence why you saw commas for the first 10 elements and none afterward.
This has been fixed and implemented with fhicl-cpp:b0ef663.