Skip to content
Snippets Groups Projects

Anonymize dependencies during packing

Merged Gerhard Raven requested to merge anonymizeDependencies into master
Compare and
14 files
+ 75
370
Compare changes
  • Side-by-side
  • Inline
Files
14
@@ -31,7 +31,11 @@ from GaudiConf.reading import load_manifest
def error(msg):
print("Hlt2CheckOutput ERROR", msg)
print("Hlt2CheckOutput ERROR: ", msg)
def warning(msg):
print("Hlt2CheckOutput WARNING: ", msg)
LHCbApp(
@@ -58,6 +62,12 @@ input_file = sys.argv[1]
input_type = "ROOT" if input_file.find(".dst") != -1 else "RAW"
IOHelper(input_type).inputFiles([input_file], clear=True)
stream = None
if input_file.startswith('sprucing'): stream = 'Sprucing'
if input_file.startswith('turbo'): stream = 'Turbo'
if not stream:
warning(f'could not determine stream type from file name: {input_file}')
appMgr = GP.AppMgr()
TES = appMgr.evtsvc()
appMgr.run(1)
@@ -79,6 +89,10 @@ while TES['/Event']:
decRep = TES[str(decdecoder.OutputHltDecReportsLocation)].decReports()
for name, report in decRep.items():
# for _these_ tests: Hlt2Topo is in 'Spruce' and the rest in 'Turbo' _if_ (and only if) we could recognize the stream
# TODO: could also check that the particles are _not_ present when in the 'other' stream(s)...
if stream == 'Sprucing' and not name.startswith("Hlt2Topo"): continue
if stream == 'Turbo' and name.startswith("Hlt2Topo"): continue
if report.decision():
print('Checking line {}'.format(name))
prefix = '/Event/HLT2/{}'.format(name[:-len("Decision")])
Loading