Skip to content

update CounterJSONhandler

Ziyi Wang requested to merge ziyi_counter_handler into master

Due to the latest update for JSONSink in Gaudi (gaudi/Gaudi!1362 (merged)), we update the corresponding counter scripts to solve the test problem and follow the updated JSON structure.

The options in CounterToJSON.py in PRConfig need to be updated, there are three strategies available.

a) Put all available information into JSON file (its size is about 6.6M)

from Gaudi.Configuration import *
from Configurables import Gaudi__Monitoring__JSONSink as JSONSink

JSONSink(FileName="MooreJSONFile_Test.json")
app = ApplicationMgr()
app.ExtSvc += [JSONSink()]

b) Only keep what we need in handlers. (Have to be updated in time following the changing of CounterJSONhandler)

from Gaudi.Configuration import *
from Configurables import Gaudi__Monitoring__JSONSink as JSONSink

JSONSink(FileName="MooreJSONFile_Test.json")
JSONSink(
        ComponentsToSave=[
           'TrackMonitor',
           'fromPr.*TracksV1Tracks.*',
            ]
)
JSONSink(
        TypesToSave=[
            'counter.*',
            ],
)
app = ApplicationMgr()
app.ExtSvc += [JSONSink()]

c)Keep all the items with counter type. (Can be more general than case b, and its size is about 680K which is tolerable)

from Gaudi.Configuration import *
from Configurables import Gaudi__Monitoring__JSONSink as JSONSink

JSONSink(FileName="MooreJSONFile_Test.json")
JSONSink(
        TypesToSave=[
            'counter.*',
            ],
)
app = ApplicationMgr()
app.ExtSvc += [JSONSink()]

FYI @msaur

Edited by Ziyi Wang

Merge request reports