2 from __future__
import print_function
9 parser = optparse.OptionParser()
10 (options, args) = parser.parse_args()
11 ROOT.gROOT.SetBatch(
True)
13 if "vDrift_segment_" in filename:
15 m=re.search(
"vDrift_segment_(\d*)",filename)
20 f = open(
'dtVDriftAnalyzer_cfg.py',
'w')
21 print(
"from CalibMuon.DTCalibration.Workflow.addPoolDBESSource import addPoolDBESSource", file=f)
22 print(
"from CalibMuon.DTCalibration.dtVDriftAnalyzer_cfg import process", file=f)
23 print(
"addPoolDBESSource(process = process, moduleName = 'vDriftDB',record = 'DTMtimeRcd',tag = 'vDrift', connect = 'sqlite_file:"+filename+
"')", file=f)
24 print(
"process.dtVDriftAnalyzer.rootFileName = 'dtVDriftAnalyzer_dtVDriftCalibration"+run+
".root'", file=f)
26 os.system(
"cmsRun dtVDriftAnalyzer_cfg.py")
28 runvdrift(name, run,
"dtVDriftAnalyzer_dtVDriftCalibration"+run+
".root")
30 if "vDrift_meantimer_" in filename:
32 m=re.search(
"vDrift_meantimer_(\d*)",filename)
37 f = open(
'dtVDriftAnalyzer_cfg.py',
'w')
38 print(
"from CalibMuon.DTCalibration.Workflow.addPoolDBESSource import addPoolDBESSource", file=f)
39 print(
"from CalibMuon.DTCalibration.dtVDriftAnalyzer_cfg import process", file=f)
40 print(
"addPoolDBESSource(process = process, moduleName = 'vDriftDB',record = 'DTMtimeRcd',tag = 'vDrift', connect = 'sqlite_file:"+filename+
"')", file=f)
41 print(
"process.dtVDriftAnalyzer.rootFileName = 'dtVDriftAnalyzer_dtVDriftCalibration"+run+
".root'", file=f)
43 os.system(
"cmsRun dtVDriftAnalyzer_cfg.py")
45 runvdrift(name, run,
"dtVDriftAnalyzer_dtVDriftCalibration"+run+
".root")
47 elif "DQM" in filename:
49 m=re.search(
"R000(\d*)__",filename)
51 path=
"DQMData/Run "+run+
"/DT/Run summary/DTCalibValidation" 53 elif "TestPulses" in filename:
55 runt0(name,filename,123456)
58 m=re.search(
"DTResidualValidation_(\d*)\.root",filename)
64 from CalibMuon.DTCalibration.PlottingTools.plotResiduals
import *
66 mean,sigma =
plot(filename, SL,dir=path)
67 mean[0].Print(name+run+
"-SL"+
str(SL)+
"-mean.pdf")
68 mean[0].SaveAs(name+run+
"-SL"+
str(SL)+
"-mean.root")
69 sigma[0].Print(name+run+
"-SL"+
str(SL)+
"-sigma.pdf")
70 sigma[0].SaveAs(name+run+
"-SL"+
str(SL)+
"-sigma.root")
72 from CalibMuon.DTCalibration.PlottingTools.plotVDriftFromHistos
import *
74 mean =
plot(filename, SL)
75 mean[0].Print(name+run+
"-SL"+
str(SL)+
"-mean.pdf")
76 mean[0].SaveAs(name+run+
"-SL"+
str(SL)+
"-mean.root")
82 from CalibMuon.DTCalibration.PlottingTools.plotT0FromHistos
import *
84 mean =
plot(filename, SL ,run)
85 mean[0].Print(name+run+
"-SL"+
str(SL)+
"-mean.pdf")
86 mean[0].SaveAs(name+run+
"-SL"+
str(SL)+
"-mean.root")
88 if __name__==
"__main__":
def runvdrift(name, run, filename)
def runt0(name, filename, run)
S & print(S &os, JobReport::InputFile const &f)
def runttrig(name, filename, path, run)