Skip to content

HistogramDef Upgrade Completion

Charles Burton requested to merge cburton/athena:master-HistDefUpdates into master

Here is the other half of the HistogramDef migration to JSON. I've added new options to HistogramDef to handle the user's plotting options (kAddBinsDynamically, Sumw2, etc.) Uses can now provide the old style string `opt = 'kLBNHistoryDepth=10, kCumulative' or provide a python dictionary in their calls to defineHistogram(). The latter can hopefully eliminate some repetition in the defineHistogram() calls.

I've added a new MockHistogramDef to the test suite to help with the HistogramFillerFactory test.

AthenaMonitoring Council of Elders: @ponyisi, @tbold, @fwinkl.

Detailed list of changes:

File Name Changes
HistogramDef.h
HistogramDef.cxx
  • Add members for drawing/filling options
  • Document aforementioned new options
  • Parse new options into the struct members
GenericMonitoringTool.py
  • options() function to add user's opt dict to JSON
  • default values for each option
  • parser to parse older style opt string
GenericMon.txt Update histogram strings to include the new options
HistogramFactory.h
HistogramFactory.cxx
  • Throw error when bad TEfficiency is requested
  • Refactor label and option setting functions
  • Replace string searches with HistogramDef bool checks
HistogramFillerFactory.cxx Replace string searches with Histogram member checks
HistogramFillerRebinable1D.h
  • Replace string searches with Histogram member checks
  • Ran code through my lint: replaced lines with mixed tabs/spaces.
  • Add check on value of kLBNHistoryDepth in histogram() function.
LumiblockHistogramProvider.h
  • Eliminate member m_historyDepth
  • kLBNHistoryDepth parsing moved to python. Removed here.
GenericMonParsing_test.cxx Replace opt strings with direct HistogramDef options
HistogramFactoryTestSuite.cxx Replace opt strings with direct HistogramDef options
HistogramFillerFactoryTestSuite.cxx
  • New member for MockHistogramDef
  • Test HistogramFillerFactory by setting HistogramDef options, not passing opt string
HistogramFillerRebinable1DTestSuite.cxx
  • Replace opt strings with direct HistogramDef options
  • Fix a number of typos
LumiblockHistogramProviderTestSuite.cxx Remove one unnecessary test and update other tests to new syntax.
MockHistogramDef.cxx A subclass of HistogramDef where every member has been explicitly set.
test_defineHistogram.py Update histogram strings to include the new options.
Edited by Charles Burton

Merge request reports