Created
November 28, 2014 08:57
-
-
Save kdungs/4cd53e962ff7aa664917 to your computer and use it in GitHub Desktop.
Extract streamer information for LHCb HLT1 Muon Streamers from TCK. The resulting JSON is put into https://github.com/kdungs/lhcb-hltflow via the `--config` option.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import json | |
import TCKUtils.utils as ut | |
TCK = 0x6A1710 | |
streamers = [ | |
'Hlt1TrackMuonUnit', | |
'Hlt1DiMuonHighMassStreamer', | |
'Hlt1DiMuonLowMassStreamer', | |
'Hlt1SingleMuonHighPTStreamer', | |
'Hlt1SingleMuonNoIPStreamer' | |
] | |
tree = ut.getConfigTree(TCK) | |
codes = [{'name': streamer.replace('Streamer', ''), | |
'code': tree.leafs()[streamer].props['Code']} | |
for streamer in streamers] | |
with open('hlt1streamers.json', 'w') as jsonfile: | |
json.dump(codes, jsonfile) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment