Skip to content

Add JSON sink for Gaudi histograms

Johannes Heuel requested to merge lhcb/Gaudi:jheuel_JSONSink into master

This merge request adds a JSON sink for Gaudi histograms and a corresponding reference validator.

Because of changes in JSONSink, tests in LHCb and Moore have to be updated: lhcb/LHCb!3700 (merged) lhcb/Moore!1693 (merged)

To use the JSON sink one has to add the following to options:

from Configurables import Gaudi__Monitoring__JSONSink as JSONSink

...

appMgr = ApplicationMgr(
    EvtMax=20,
    TopAlg=[someSequence],
    ExtSvc=[
        JSONSink(
            FileName='json_output.json',
            NamesToSave=[
                'TAE/.*/coarse/LiteClustersPerPseudoChannel',
                'nClustersPerTAE',
            ],
            ComponentsToSave=[
                'FT.*',
            ],
            TypesToSave=[
                'histogram.*',
            ],
        ),
    ],
)

And the validator can be used like this:

<extension class="GaudiTest.GaudiExeTest" kind="test">
  <argument name="use_temp_dir"><enumeral>true</enumeral></argument>
  <argument name="program"><text>gaudirun.py</text></argument>
  <argument name="args"><set>
    <text>../options/zs_cluster_monitoring.py</text>
  </set></argument>
  <argument name="validator"><text>
validateJSONWithReference("json_output.json", "reference.json")
  </text></argument>
</extension>
Edited by Johannes Heuel

Merge request reports