Skip to content
Snippets Groups Projects
Commit e85e8f46 authored by Rosen Matev's avatar Rosen Matev :sunny:
Browse files

Merge branch 'spradlin-202204Apr21-mdf_read_decs_allen' into 'master'

Update to test Hlt1Conf.persistency.mdf_read_decs_allen

See merge request !1515
parents d0051333 b0213772
No related branches found
No related tags found
1 merge request!1515Update to test Hlt1Conf.persistency.mdf_read_decs_allen
Pipeline #3889448 passed
......@@ -17,6 +17,7 @@ between the two is considered a failure. The options dump is used to
configure the HltANNSvc for the job ran by this script.
"""
from __future__ import print_function
import re
import argparse
from collections import defaultdict
from Configurables import (ApplicationMgr, HistogramPersistencySvc,
......@@ -29,19 +30,17 @@ from Moore.config import setup_ann_service, get_allen_hlt1_decision_ids
def get_counts_from_log(f):
"""Return the decisions of each line as extracted from a log file."""
logre = re.compile(
r' \|\*"Selected by (Hlt1.*Decision)"\s*\|\s*(\d+) \|\s*(\d+) \|')
counts = {}
with open(f) as f:
for line in (l for l in f if "Selected by" in l):
columns = line.split()
hlt_line = columns[2].replace('"', '')
count = int(columns[6])
counts[hlt_line] = count
f.seek(0)
for line in (l for l in f if "LAZY_AND: allen" in l):
columns = line.split()
hlt_line = columns[1]
count = int(columns[3].replace("Sum=", ""))
counts[hlt_line] = count
for line in f:
m = re.match(logre, line)
if m:
hlt_line = m.group(1)
count = int(m.group(3))
counts[hlt_line] = count
return counts
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment