1 import FWCore.ParameterSet.Config
as cms
4 from FWCore.ParameterSet.VarParsing
import VarParsing
10 process = cms.Process(
"ValidationIntoNTuples")
14 options.register(
"config",
"", VarParsing.multiplicity.singleton, VarParsing.varType.string ,
"AllInOne config")
16 options.parseArguments()
22 if options.config ==
"":
23 config = {
"validation": {},
26 with open(options.config,
"r") as configFile: 27 config = json.load(configFile) 30 process.load(
"Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
31 from Configuration.AlCa.GlobalTag
import GlobalTag
32 process.GlobalTag =
GlobalTag(process.GlobalTag,config[
"alignments"][
"globaltag"])
34 process.load(
"Configuration.Geometry.GeometryRecoDB_cff")
36 process.load(
"CondCore.CondDB.CondDB_cfi")
38 process.MessageLogger = cms.Service(
"MessageLogger",
40 destinations = cms.untracked.vstring(
'warnings'),
41 warnings = cms.untracked.PSet(
42 threshold = cms.untracked.string(
'WARNING')
47 if "conditions" in config[
"alignments"]:
50 for condition
in config[
"alignments"][
"conditions"]:
53 "conditionsIn{}".
format(condition),
55 connect = cms.string(
str(config[
"alignments"][
"conditions"][condition][
"connect"])),
58 record = cms.string(
str(condition)),
59 tag = cms.string(
str(config[
"alignments"][
"conditions"][condition][
"tag"]))
65 setattr(process,
"prefer_conditionsIn{}".
format(condition), cms.ESPrefer(
"PoolDBESSource",
"conditionsIn{}".
format(condition)))
68 process.source = cms.Source(
"EmptySource",
69 firstRun=cms.untracked.uint32(config[
"validation"][
"IOV"])
72 process.maxEvents = cms.untracked.PSet(
73 input = cms.untracked.int32(1)
75 print(
'Output file: '+config[
"output"]+
'/Ntuples.root')
77 from Alignment.OfflineValidation.trackerGeometryIntoNtuples_cfi
import trackerGeometryIntoNtuples
as _trackerGeometryIntoNtuples
79 process.dump = _trackerGeometryIntoNtuples.clone(
80 outputFile =
str(config[
"output"]+
'/Ntuples.root'),
81 outputTreename =
'alignTree' 84 process.p = cms.Path(process.dump)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)