diff --git a/run.py b/run.py index 508c308..68b058a 100755 --- a/run.py +++ b/run.py @@ -17,19 +17,22 @@ for o, a in opts: if o in ('-fp','--pedestal'): pedFile = str(a) + print 'Pedestal file: ', pedFile if o in ('-fs','--signal'): sigFile = str(a) - + print 'Signal file: ', sigFile + inputFilePedestal = inputPathPedestal+pedFile inputFileSignal = inputPathSignal+sigFile -print inputFilePedestal -print inputFileSignal +print 'Pedestal file: ', inputFilePedestal +print 'Signal file: ', inputFileSignal subprocess.call('source /afs/cern.ch/project/eos/installation/lhcb/etc/setup.sh',shell=True) subprocess.call('/afs/cern.ch/project/eos/installation/0.3.15/bin/eos.select -b fuse mount $KEPLERROOT/eos',shell=True) shFile = open(os.environ["KEPLERROOT"]+"/../run_k.sh","w") shFile.write('#!/bin/bash\n') shFile.write('cd $KEPLERROOT/../TbUT\n') + shFile.write('python options/TbUTPedestal_conf.py -f '+inputFilePedestal+"\n") shFile.write('python options/TbUTRun_conf.py -f '+inputFileSignal+"\n") shFile.write('cd ../../\n') @@ -49,8 +52,17 @@ subprocess.call("sed -i 's/defRUN/"+sigFile[-8:-4]+"/g' $KEPLERROOT/../TbUT/scripts/AnalysisBase_Inputs.h",shell=True) shFile.write('\nmkdir -p Plots') shFile.write('\nroot -b -q ../Tb/TbUT/scripts/runClusterWithTrackAna.C') + +''' +ch=245 +print './TbUTLandauFits '+'AnalisysOutput_'+sigFile+' '+str(ch) +shFile.write('\n./TbUTLandauFits '+'AnalisysOutput_'+sigFile+' '+str(ch)) +''' + +''' shFile.write('\n. LbLogin.sh -c x86_64-slc6-gcc49-opt\n') shFile.write('. SetupProject.sh LHCb\n') +''' shFile.close() subprocess.call("chmod +x "+os.environ["KEPLERROOT"]+"/../run_k.sh",shell=True) os.system('/$KEPLERROOT/../run_k.sh')