Last active
March 16, 2024 11:53
-
-
Save artlbv/f82845607b5fe18c9e35c58502874cc5 to your computer and use it in GitHub Desktop.
parse the HLT trigger results json from the CMSSW build bot
This file contains hidden or 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
## 14_0 Backport results: | |
## JSON https://cmssdt.cern.ch/SDT/jenkins-artifacts/baseLineComparisons/CMSSW_14_0_X_2024-03-15-2300+220365/61714/triggerResults/141.044_RunJetMET2023D/reHLT.json | |
## from tests https://github.com/cms-sw/cmssw/pull/44397#issuecomment-2001893129 | |
## "reHLT_140_backport.json" | |
## 14_1 PR results: | |
## JSON https://cmssdt.cern.ch/SDT/jenkins-artifacts/baseLineComparisons/CMSSW_14_1_X_2024-03-13-1100+5aa5c5/61657/triggerResults/141.044_RunJetMET2023D/reHLT.json | |
## From comment https://github.com/cms-sw/cmssw/pull/44054#issuecomment-1996266443 | |
# fname = "reHLT_141.json" | |
fnames = { | |
"140 backport": "reHLT_140_backport.json", | |
"141 PR": "reHLT_141.json", | |
} | |
trig_results = {} | |
for label, fname in fnames.items(): | |
print(label, fname) | |
with open(fname) as f: | |
log = json.load(f) | |
trig_old = dict(zip(log["vars"]["trigger"], [e["o"] for e in log["vars"]["trigger_passed_count"]])) | |
trig_new = dict(zip(log["vars"]["trigger"], [e["n"] for e in log["vars"]["trigger_passed_count"]])) | |
trig_results[label+"_old"] = trig_old | |
trig_results[label+"_new"] = trig_new | |
axo_trigs = [n for n in log["vars"]["trigger"] if "AXO" in n] | |
# axo_trigs | |
for trig in axo_trigs: | |
print(f"{trig:30}", trig_old[trig], trig_new[trig]) | |
df_trig = pd.DataFrame(trig_results) | |
mask = (df_trig["140 backport_old"] != df_trig["141 PR_old"]) | |
df_trig[mask] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment