Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:28

0001 #!/bin/python
0002 from __future__ import print_function
0003 import sys
0004 
0005 # Parse the output of dump_l1t_configs.py, printing the nonempty records and hash values
0006 # Author: Dustin Burns Oct 22, 2015
0007 
0008 # Check inputs
0009 if len(sys.argv) != 2: 
0010   print('Usage: python parse_dump_l1t_configs.py log_file.txt')
0011   sys.exit()
0012 
0013 # Open log file
0014 f = open(sys.argv[1])
0015 
0016 # Loop through log file, printing hashes for records of interest
0017 ind=0
0018 rec = ' '
0019 for i, line in enumerate(f):
0020   if 'Rcd' in line or 'Record' in line:
0021     ind = i
0022     rec = line.split()[0]
0023   if i == ind+3 and len(line.split())>3:
0024     print(rec + ' ' + ':' + ' ' + line.split()[4])