1 import FWCore.ParameterSet.Config
as cms
4 from FWCore.ParameterSet.VarParsing
import VarParsing
10 process = cms.Process(
"validation")
14 options.register(
"config",
"", VarParsing.multiplicity.singleton, VarParsing.varType.string ,
"AllInOne config")
16 options.parseArguments()
22 with open(options.config,
"r") as configFile: config = json.load(configFile) 25 if 'empty_modules' in config[
"validation"][
"GCP"]:
26 if config[
"validation"][
"GCP"][
"empty_modules"].startswith(
'/store'):
27 os.system(
'xrdcp root://eoscms//eos/'+config[
"validation"][
"GCP"][
"empty_modules"])
28 elif config[
"validation"][
"GCP"][
"empty_modules"].startswith(
'root://'):
29 os.system(
'xrdcp '+config[
"validation"][
"GCP"][
"empty_modules"])
31 os.system(
'cp '+config[
"validation"][
"GCP"][
"empty_modules"])
32 else: os.system(
'touch emptyModuleList.txt')
35 process.load(
"Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
36 from Configuration.AlCa.GlobalTag
import GlobalTag
37 process.GlobalTag =
GlobalTag(process.GlobalTag,config[
"alignments"][
"comp"][
"globaltag"])
40 process.load(
"Configuration.Geometry.GeometryRecoDB_cff")
42 process.load(
"CondCore.CondDB.CondDB_cfi")
44 process.MessageLogger = cms.Service(
"MessageLogger",
46 destinations = cms.untracked.vstring(
'warnings'),
47 warnings = cms.untracked.PSet(
48 threshold = cms.untracked.string(
'WARNING')
52 process.source = cms.Source(
"EmptySource",
53 firstRun=cms.untracked.uint32(config[
"validation"][
"IOVcomp"])
56 process.maxEvents = cms.untracked.PSet(
57 input = cms.untracked.int32(1)
60 process.siStripQualityESProducer.ListOfRecordToMerge=cms.VPSet(
61 cms.PSet(record = cms.string(
'SiStripDetCablingRcd'),
62 tag = cms.string(
'')),
63 cms.PSet(record = cms.string(
'RunInfoRcd'),
64 tag = cms.string(
'')),
65 cms.PSet(record = cms.string(
'SiStripBadChannelRcd'),
66 tag = cms.string(
'')),
67 cms.PSet(record = cms.string(
'SiStripBadFiberRcd'),
68 tag = cms.string(
'')),
69 cms.PSet(record = cms.string(
'SiStripBadModuleRcd'),
70 tag = cms.string(
'')),
71 cms.PSet(record = cms.string(
'SiStripBadStripRcd'),
75 process.load(
"DQM.SiStripCommon.TkHistoMap_cff")
79 process.load(
"Alignment.OfflineValidation.TrackerGeometryCompare_cfi")
82 process.TrackerGeometryCompare.inputROOTFile1 =
str(config[
'input_ref']+
'/Ntuples.root')
83 process.TrackerGeometryCompare.inputROOTFile2 =
str(config[
'input_comp']+
'/Ntuples.root')
84 process.TrackerGeometryCompare.moduleList =
'emptyModuleList.txt' 85 process.TrackerGeometryCompare.outputFile =
str(config[
'output'])+
'/GCPtree.root' 86 process.TrackerGeometryCompare.levels = [
str(config[
'validation'][
'GCP'][
'levels']) ]
88 surf_dir =
str(config[
'output'])+
'/SurfDeform' 89 if not os.path.isdir(surf_dir):
91 process.TrackerGeometryCompare.surfDir = surf_dir
93 process.load(
"CommonTools.UtilAlgos.TFileService_cfi")
94 process.TFileService.fileName = cms.string(
"TkSurfDeform.root")
100 process.p = cms.Path(process.TrackerGeometryCompare)