Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-10-29 22:51:01

0001 #!/usr/bin/env python3
0002 from __future__ import print_function
0003 import os,string,sys,time
0004 
0005 # template file to be used
0006 MODFILE="reco_skim_cfg_mod.py"
0007 
0008 # the output file is PREFIX_date.root
0009 PREFIX="SkimSM"
0010 
0011 # it produces a file every NUEVENTS events
0012 NUMEVENTS="-1"
0013 
0014 while True:
0015     DATE=str(int(time.time()))
0016     print("Suffix:"+DATE)
0017     FILENAME=PREFIX+"_"+DATE+"_cfg.py"
0018     FILELOG=PREFIX+"_"+DATE+".log"
0019     COMMAND="sed 's/SUFFIX/"+DATE+"/;s/NUMEVENTS/"+NUMEVENTS+"/' "+MODFILE+" > "+FILENAME
0020     os.system(COMMAND)
0021     print("Created: "+FILENAME+" . Running cmsRun now and logging in "+FILELOG)
0022     os.system("cmsRun "+FILENAME+" 2>&1 | tee "+FILELOG+" | grep  --line-buffered -e \"Begin processing\" -e \"BeamSplash\"")