Skip to content

Commit

Permalink
UseLHCInfoFile fix; failing attempt to update scrpts to use the new r…
Browse files Browse the repository at this point in the history
…ecords
  • Loading branch information
JanChyczynski committed Sep 21, 2022
1 parent 85fa0fe commit d6e1316
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 6 deletions.
46 changes: 43 additions & 3 deletions conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,62 @@ def UseLHCInfoFile(process, connection, tag):
global lhcInfoDefined
lhcInfoDefined = True

del process.ctppsRPLHCInfoCorrectionsDataESSourceXML
del process.esPreferLocalLHCInfo
# del process.ctppsRPLHCInfoCorrectionsDataESSourceXML
# del process.esPreferLocalLHCInfo

process.ctppsInterpolatedOpticalFunctionsESSource.lhcInfoLabel = ""
process.ctppsProtons.lhcInfoLabel = ""

process.CondDBALHCInfo = CondDB.clone( connect = connection )
process.PoolDBESSource = cms.ESSource("PoolDBESSource",
CondDBLHCInfo,
process.CondDBALHCInfo,
DumpStat = cms.untracked.bool(False),
toGet = cms.VPSet(cms.PSet(
record = cms.string('LHCInfoRcd'),
tag = cms.string(tag)
)),
)

def UseLHCInfoPerLSFile(process, connection, tag):
global lHCInfoPerLSDefined
lHCInfoPerLSDefined = True

# del process.ctppsRPLHCInfoPerLSCorrectionsDataESSourceXML
# del process.esPreferLocalLHCInfoPerLS

# process.ctppsInterpolatedOpticalFunctionsESSource.lHCInfoPerLSLabel = ""
process.ctppsProtons.lhcInfoPerLSLabel = ""

process.CondDBALHCInfoPerLS = CondDB.clone( connect = connection )
process.PoolDBESSource = cms.ESSource("PoolDBESSource",
process.CondDBALHCInfoPerLS,
DumpStat = cms.untracked.bool(False),
toGet = cms.VPSet(cms.PSet(
record = cms.string('LHCInfoPerLSRcd'),
tag = cms.string(tag)
)),
)

def UseLHCInfoPerFillFile(process, connection, tag):
global lHCInfoPerFillDefined
lHCInfoPerFillDefined = True

# del process.ctppsRPLHCInfoPerFillCorrectionsDataESSourceXML
# del process.esPreferLocalLHCInfoPerFill

# process.ctppsInterpolatedOpticalFunctionsESSource.lHCInfoPerFillLabel = ""
process.ctppsProtons.lhcInfoPerFillLabel = ""

process.CondDBALHCInfoPerFill = CondDB.clone( connect = connection )
process.PoolDBESSource = cms.ESSource("PoolDBESSource",
process.CondDBALHCInfoPerFill,
DumpStat = cms.untracked.bool(False),
toGet = cms.VPSet(cms.PSet(
record = cms.string('LHCInfoPerFillRcd'),
tag = cms.string(tag)
)),
)

#----------------------------------------------------------------------------------------------------

alignmentDefined = False
Expand Down
8 changes: 5 additions & 3 deletions templates/reco_cfg.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import FWCore.ParameterSet.Config as cms

from Configuration.StandardSequences.Eras import eras
process = cms.Process('TEST', eras.Run2_$year)
process = cms.Process('TEST', eras.Run3)
#process = cms.Process('TEST', eras.Run2_$year, eras.run2_miniAOD_devel)

from conditions import *
Expand All @@ -12,9 +12,11 @@ def SetConditions(process):
process.GlobalTag = GlobalTag(process.GlobalTag, "auto:run3_data")

# chose LHCInfo source
UseLHCInfoGT(process)
# UseLHCInfoGT(process)
#UseLHCInfoLocal(process)
#UseLHCInfoDB(process, "frontier://FrontierProd/CMS_CONDITIONS", "LHCInfoEndFill_prompt_v2")
UseLHCInfoFile(process, "sqlite_file:/eos/home-j/jchyczyn/new/CMSSW_12_5_0_pre3/src/CondTools/RunInfo/python/lhcinfo_pop_test.db", "LHCInfo_end_1")
UseLHCInfoPerFillFile(process, "sqlite_file:/eos/home-j/jchyczyn/new/CMSSW_12_5_0_pre3/src/CondTools/RunInfo/python/lhcinfo_pop_test.db", "LHCInfoPerFill_end_1")
UseLHCInfoPerLSFile(process, "sqlite_file:/eos/home-j/jchyczyn/new/CMSSW_12_5_0_pre3/src/CondTools/RunInfo/python/lhcinfo_pop_test.db", "LHCInfoPerLS_end_1")

# chose alignment source
UseAlignmentGT(process)
Expand Down

0 comments on commit d6e1316

Please sign in to comment.