Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
#!python

histos={}
missing={}

f=open('CSCDQM_HistoType.txt', 'r')
for h in f:
  histos[h.strip()]=0

f=open('map.txt', 'r')
for h in f:
  a=h.strip().split()
  key=a[0].strip()
  name=a[1].strip()
  if key in histos:
    histos[key]=name
  else:
    missing[key]=name

a=sorted(histos.keys())
for h in a:
  print(h, end=' ')
  if histos[h] != 0:
    print("\t\t\t\t\t",  histos[h])
  else:
    print("")

print("========================= MISSING ============================")

a=missing.keys()
a.sort()
for h in a:
  print(h, missing[h])