/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Mdc/DedxCalibAlg/DedxCalibAlg-00-01-15/share/shell/check_raw_filter.py

Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import os
00004 import sys
00005 import re
00006 
00007 # setup parameters
00008 if(len(sys.argv)<2):
00009     print "usage: check_raw_filter.py filename.log"
00010     sys.exit()
00011 else:
00012     filename = sys.argv[1]
00013 
00014 logfile = open(filename, "r")
00015 dist = 0
00016 runno = ""
00017 for line in logfile:
00018     if(dist == 1):
00019         if(line.find("Reach end of data file")>-1):
00020             dist = 0
00021         else:
00022             dist = 2
00023     if(dist == 2):
00024         print runno
00025         dist = 0
00026     if(dist==0 and line.find("Prepare for reading")>-1):
00027         idx_beg = line.find("run_") + len("run_")
00028         idx_end = line.find("_", idx_beg)
00029         runno = line[idx_beg:idx_end]
00030         dist = 1
00031 
00032 
00033 
00034 
00035 
00036 

Generated on Tue Nov 29 23:12:45 2016 for BOSS_7.0.2 by  doxygen 1.4.7