Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:17

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # This is to write a single payload of L1RPCConeDefinition to the DB using the L1 O2O.
0004 # CondTools/L1Trigger/test/init_cfg.py must be run first to initialize the
0005 # L1TriggerKeyList in the DB, then L1RPCConeDefinition payloads can be written one by one.
0006 
0007 process = cms.Process("L1ConfigWritePayloadDummy")
0008 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0009 process.MessageLogger.cout.enable = cms.untracked.bool(True)
0010 process.MessageLogger.cout.threshold = cms.untracked.string('DEBUG')
0011 process.MessageLogger.debugModules = cms.untracked.vstring('*')
0012 
0013 # Generate L1TriggerKey - here define the RPC key
0014 process.load("CondTools.L1Trigger.L1TriggerKeyDummy_cff")
0015 process.L1TriggerKeyDummy.objectKeys = cms.VPSet(cms.PSet(
0016     record = cms.string('L1RPCConeDefinitionRcd'),
0017     type = cms.string('L1RPCConeDefinition'),
0018     key = cms.string('DEFAULT')
0019 #    key = cms.string('COSMIC')
0020 ))
0021 
0022 # Get L1TriggerKeyList from DB
0023 process.load("CondCore.DBCommon.CondDBCommon_cfi")
0024 process.orcon = cms.ESSource("PoolDBESSource",
0025     process.CondDBCommon,
0026     toGet = cms.VPSet(cms.PSet(
0027         record = cms.string('L1TriggerKeyListRcd'),
0028         tag = cms.string('L1TriggerKeyList_IDEAL')
0029     ))
0030 )
0031 process.es_prefer_orcon = cms.ESPrefer("PoolDBESSource","orcon")
0032 process.orcon.connect = cms.string('sqlite_file:l1config.db')
0033 process.orcon.DBParameters.authenticationPath = cms.untracked.string('.')
0034 
0035 # Generate L1RPCConeDefinition object - here define the payload associated to the RPC key
0036 process.RPCConeDefi = cms.ESProducer("L1RPCConeDefinitionProducer",
0037     rollConnT_14_4 = cms.vint32(-1, -1, -1),
0038     rollConnT_14_5 = cms.vint32(-1, -1, -1),
0039     rollConnT_14_0 = cms.vint32(13, 14, -1),
0040     rollConnT_14_1 = cms.vint32(13, -1, -1),
0041     rollConnT_14_2 = cms.vint32(14, 15, -1),
0042     rollConnT_14_3 = cms.vint32(15, 16, -1),
0043     rollConnT_12_4 = cms.vint32(-1, -1, -1),
0044     rollConnT_12_5 = cms.vint32(-1, -1, -1),
0045     rollConnT_12_2 = cms.vint32(12, 13, -1),
0046     rollConnT_12_3 = cms.vint32(13, 14, -1),
0047     rollConnT_12_0 = cms.vint32(10, 11, -1),
0048     rollConnT_12_1 = cms.vint32(11, -1, -1),
0049     lpSizeTower0 = cms.vint32(72, 56, 8, 40, 40, 
0050         24),
0051     rollConnLP_8_2 = cms.vint32(3, -5, 0),
0052     # HwPlane 5
0053     rollConnT_0_4 = cms.vint32(-1, -1, -1),
0054     rollConnT_9_4 = cms.vint32(-1, -1, -1),
0055     rollConnLP_13_4 = cms.vint32(0, 0, 0),
0056     #
0057     #
0058     #
0059     # m_mrtow table
0060     # rollConn_[RollNo]_[hwPlane]
0061     # HwPlane 1
0062     rollConnT_0_0 = cms.vint32(-1, -1, -1),
0063     rollConnLP_10_1 = cms.vint32(2, 0, 0),
0064     rollConnT_9_0 = cms.vint32(7, 8, -1),
0065     lpSizeTower14 = cms.vint32(72, 8, 40, 24, 0, 
0066         0),
0067     lpSizeTower15 = cms.vint32(72, 8, 40, 24, 0, 
0068         0),
0069     lpSizeTower16 = cms.vint32(72, 8, 40, 24, 0, 
0070         0),
0071     lpSizeTower10 = cms.vint32(72, 8, 40, 24, 0, 
0072         0),
0073     lpSizeTower11 = cms.vint32(72, 8, 40, 24, 0, 
0074         0),
0075     lpSizeTower12 = cms.vint32(72, 8, 40, 24, 0, 
0076         0),
0077     lpSizeTower13 = cms.vint32(72, 8, 40, 24, 0, 
0078         0),
0079     rollConnT_9_2 = cms.vint32(9, -9, 10),
0080     rollConnT_6_2 = cms.vint32(-1, -1, -1),
0081     towerBeg = cms.int32(0),
0082     rollConnT_6_3 = cms.vint32(-1, -1, -1),
0083     rollConnT_6_0 = cms.vint32(-1, -1, -1),
0084     rollConnT_16_2 = cms.vint32(-1, -1, -1),
0085     rollConnT_16_3 = cms.vint32(-1, -1, -1),
0086     rollConnT_16_0 = cms.vint32(15, 16, -1),
0087     rollConnT_16_1 = cms.vint32(15, -1, -1),
0088     rollConnLP_3_0 = cms.vint32(0, 0, 0),
0089     rollConnT_16_4 = cms.vint32(-1, -1, -1),
0090     rollConnT_16_5 = cms.vint32(-1, -1, -1),
0091     rollConnT_8_4 = cms.vint32(-1, -1, -1),
0092     rollConnT_15_4 = cms.vint32(-1, -1, -1),
0093     rollConnLP_6_5 = cms.vint32(4, 0, 0),
0094     rollConnLP_6_4 = cms.vint32(0, 0, 0),
0095     rollConnLP_6_3 = cms.vint32(0, 0, 0),
0096     rollConnLP_6_2 = cms.vint32(0, 0, 0),
0097     rollConnT_8_2 = cms.vint32(9, -9, -1),
0098     rollConnLP_6_0 = cms.vint32(0, 0, 0),
0099     # HwPlane 4
0100     rollConnT_0_3 = cms.vint32(-1, -1, -1),
0101     rollConnT_13_5 = cms.vint32(-1, -1, -1),
0102     rollConnT_13_4 = cms.vint32(-1, -1, -1),
0103     rollConnT_13_3 = cms.vint32(14, 15, -1),
0104     rollConnT_13_2 = cms.vint32(13, 14, -1),
0105     rollConnT_13_1 = cms.vint32(12, -1, -1),
0106     rollConnT_13_0 = cms.vint32(11, 12, -1),
0107     rollConnLP_4_1 = cms.vint32(3, 0, 0),
0108     rollConnLP_4_0 = cms.vint32(1, 1, -5),
0109     rollConnLP_4_3 = cms.vint32(6, 6, 0),
0110     rollConnLP_4_2 = cms.vint32(5, 5, 5),
0111     rollConnLP_4_5 = cms.vint32(4, 4, 0),
0112     rollConnLP_4_4 = cms.vint32(2, 2, 0),
0113     hwPlaneBeg = cms.int32(0),
0114     rollConnLP_12_5 = cms.vint32(0, 0, 0),
0115     rollConnT_10_1 = cms.vint32(9, -1, -1),
0116     rollConnT_4_0 = cms.vint32(4, 5, -6),
0117     rollConnT_4_1 = cms.vint32(4, -1, -1),
0118     rollConnT_4_2 = cms.vint32(2, 3, 4),
0119     rollConnT_4_3 = cms.vint32(2, 3, -1),
0120     rollConnT_4_4 = cms.vint32(4, 5, -1),
0121     rollConnT_4_5 = cms.vint32(3, 4, -1),
0122     rollConnLP_8_5 = cms.vint32(0, 0, 0),
0123     rollConnLP_8_4 = cms.vint32(0, 0, 0),
0124     rollConnT_6_4 = cms.vint32(-1, -1, -1),
0125     rollConnT_6_5 = cms.vint32(6, -1, -1),
0126     rollConnLP_8_1 = cms.vint32(0, 0, 0),
0127     rollConnLP_8_0 = cms.vint32(0, 5, 0),
0128     rollConnLP_8_3 = cms.vint32(4, 0, 0),
0129     rollConnT_6_1 = cms.vint32(-1, -1, -1),
0130     rollConnT_2_2 = cms.vint32(1, 2, -1),
0131     rollConnT_2_3 = cms.vint32(1, 2, -1),
0132     rollConnLP_16_0 = cms.vint32(1, 1, 0),
0133     rollConnT_2_0 = cms.vint32(2, 3, 4),
0134     rollConnT_15_3 = cms.vint32(16, -1, -1),
0135     rollConnT_2_1 = cms.vint32(2, -1, -1),
0136     rollConnT_8_5 = cms.vint32(-1, -1, -1),
0137     rollConnT_7_2 = cms.vint32(5, 6, -1),
0138     rollConnLP_2_3 = cms.vint32(6, 6, 0),
0139     rollConnLP_2_2 = cms.vint32(5, 5, 0),
0140     rollConnLP_2_1 = cms.vint32(3, 0, 0),
0141     rollConnLP_2_0 = cms.vint32(1, 1, 1),
0142     rollConnLP_2_5 = cms.vint32(4, 4, 0),
0143     rollConnLP_2_4 = cms.vint32(2, 2, 2),
0144     rollConnT_11_1 = cms.vint32(10, -1, -1),
0145     rollConnT_11_0 = cms.vint32(10, -1, -1),
0146     rollConnT_11_3 = cms.vint32(12, 13, -1),
0147     rollConnT_11_2 = cms.vint32(11, 12, -1),
0148     rollConnT_11_5 = cms.vint32(-1, -1, -1),
0149     rollConnT_11_4 = cms.vint32(-1, -1, -1),
0150     rollConnT_17_3 = cms.vint32(-1, -1, -1),
0151     rollConnT_17_2 = cms.vint32(-1, -1, -1),
0152     rollConnT_17_1 = cms.vint32(16, -1, -1),
0153     rollConnT_17_0 = cms.vint32(16, -1, -1),
0154     # HwPlane 2
0155     rollConnLP_0_1 = cms.vint32(3, 0, 0),
0156     #
0157     #
0158     #
0159     #m_mrlogp table
0160     # HwPlane 1
0161     rollConnLP_0_0 = cms.vint32(0, 0, 0),
0162     rollConnT_17_5 = cms.vint32(-1, -1, -1),
0163     rollConnT_17_4 = cms.vint32(-1, -1, -1),
0164     rollConnT_15_5 = cms.vint32(-1, -1, -1),
0165     rollConnLP_14_5 = cms.vint32(0, 0, 0),
0166     rollConnLP_14_4 = cms.vint32(0, 0, 0),
0167     rollConnLP_14_3 = cms.vint32(4, 4, 0),
0168     rollConnLP_14_2 = cms.vint32(3, 3, 0),
0169     rollConnLP_14_1 = cms.vint32(2, 0, 0),
0170     rollConnLP_14_0 = cms.vint32(1, 1, 0),
0171     rollConnT_9_5 = cms.vint32(-1, -1, -1),
0172     # HwPlane 6
0173     rollConnT_0_5 = cms.vint32(-1, -1, -1),
0174     rollConnLP_7_4 = cms.vint32(2, 2, 0),
0175     rollConnLP_7_5 = cms.vint32(4, 0, 0),
0176     rollConnT_9_1 = cms.vint32(8, -1, -1),
0177     # HwPlane 2
0178     rollConnT_0_1 = cms.vint32(0, -1, -1),
0179     # HwPlane 3
0180     rollConnT_0_2 = cms.vint32(-1, -1, -1),
0181     rollConnLP_7_1 = cms.vint32(3, -3, 0),
0182     lpSizeTower7 = cms.vint32(72, 56, 40, 8, 24, 
0183         0),
0184     rollConnT_7_1 = cms.vint32(7, -7, -1),
0185     rollConnLP_16_1 = cms.vint32(2, 0, 0),
0186     rollConnT_15_1 = cms.vint32(14, -1, -1),
0187     rollConnLP_16_3 = cms.vint32(0, 0, 0),
0188     rollConnLP_16_2 = cms.vint32(0, 0, 0),
0189     rollConnLP_16_5 = cms.vint32(0, 0, 0),
0190     rollConnLP_16_4 = cms.vint32(0, 0, 0),
0191     rollConnT_15_0 = cms.vint32(14, 15, -1),
0192     rollConnLP_5_0 = cms.vint32(1, 1, 1),
0193     rollConnLP_5_1 = cms.vint32(3, -3, 3),
0194     rollConnLP_5_2 = cms.vint32(5, 5, 0),
0195     rollConnLP_5_3 = cms.vint32(6, 0, 0),
0196     rollConnLP_5_4 = cms.vint32(2, 2, 2),
0197     rollConnLP_5_5 = cms.vint32(4, 0, 0),
0198     rollConnT_2_4 = cms.vint32(2, 3, 4),
0199     rollConnT_2_5 = cms.vint32(2, 3, -1),
0200     rollConnT_8_3 = cms.vint32(10, -1, -1),
0201     rollConnT_3_1 = cms.vint32(3, -1, -1),
0202     rollConnT_5_1 = cms.vint32(5, -6, 6),
0203     rollConnT_5_0 = cms.vint32(6, 7, 8),
0204     rollConnT_5_3 = cms.vint32(4, -1, -1),
0205     rollConnT_5_2 = cms.vint32(4, 5, -1),
0206     rollConnT_5_5 = cms.vint32(5, -1, -1),
0207     rollConnT_5_4 = cms.vint32(5, 6, 7),
0208     rollConnT_1_4 = cms.vint32(0, 1, -2),
0209     rollEnd = cms.int32(17),
0210     hwPlaneEnd = cms.int32(5),
0211     rollConnLP_10_3 = cms.vint32(4, 4, 0),
0212     rollConnLP_10_2 = cms.vint32(3, 3, 0),
0213     rollConnT_9_3 = cms.vint32(10, 11, -1),
0214     rollConnLP_10_0 = cms.vint32(3, 0, 0),
0215     rollConnLP_10_5 = cms.vint32(0, 0, 0),
0216     rollConnLP_10_4 = cms.vint32(0, 0, 0),
0217     rollConnLP_3_2 = cms.vint32(0, 0, 0),
0218     rollConnLP_3_3 = cms.vint32(0, 0, 0),
0219     rollConnT_15_2 = cms.vint32(15, 16, -1),
0220     rollConnLP_3_1 = cms.vint32(3, 0, 0),
0221     rollConnLP_6_1 = cms.vint32(0, 0, 0),
0222     rollConnLP_3_4 = cms.vint32(0, 0, 0),
0223     rollConnLP_3_5 = cms.vint32(0, 0, 0),
0224     rollConnT_10_0 = cms.vint32(8, -1, -1),
0225     rollConnLP_12_4 = cms.vint32(0, 0, 0),
0226     rollConnT_10_2 = cms.vint32(10, 11, -1),
0227     rollConnT_10_3 = cms.vint32(11, 12, -1),
0228     rollConnLP_12_1 = cms.vint32(2, 0, 0),
0229     rollConnLP_12_0 = cms.vint32(1, 1, 0),
0230     rollConnLP_12_3 = cms.vint32(4, 4, 0),
0231     rollConnLP_12_2 = cms.vint32(3, 3, 0),
0232     rollConnLP_1_4 = cms.vint32(2, 2, -2),
0233     rollConnLP_1_5 = cms.vint32(4, 4, 0),
0234     rollBeg = cms.int32(0),
0235     rollConnLP_1_0 = cms.vint32(1, 1, -1),
0236     rollConnLP_1_1 = cms.vint32(3, 0, 0),
0237     rollConnLP_1_2 = cms.vint32(5, 5, 0),
0238     rollConnLP_1_3 = cms.vint32(6, 6, 0),
0239     rollConnLP_9_4 = cms.vint32(0, 0, 0),
0240     rollConnLP_9_5 = cms.vint32(0, 0, 0),
0241     rollConnT_7_5 = cms.vint32(7, -1, -1),
0242     rollConnT_7_4 = cms.vint32(7, 8, -1),
0243     rollConnLP_9_0 = cms.vint32(5, 3, 0),
0244     rollConnLP_9_1 = cms.vint32(4, 0, 0),
0245     rollConnLP_9_2 = cms.vint32(3, -5, 3),
0246     rollConnT_7_0 = cms.vint32(8, 9, -1),
0247     rollConnLP_13_0 = cms.vint32(1, 1, 0),
0248     lpSizeTower3 = cms.vint32(72, 56, 8, 40, 40, 
0249         24),
0250     rollConnT_1_5 = cms.vint32(0, 1, -1),
0251     rollConnLP_17_1 = cms.vint32(2, 0, 0),
0252     rollConnLP_17_2 = cms.vint32(0, 0, 0),
0253     rollConnLP_17_3 = cms.vint32(0, 0, 0),
0254     rollConnLP_9_3 = cms.vint32(4, 4, 0),
0255     rollConnT_1_0 = cms.vint32(0, 1, -2),
0256     rollConnT_1_3 = cms.vint32(0, 1, -1),
0257     rollConnT_1_2 = cms.vint32(0, 1, -1),
0258     rollConnT_1_1 = cms.vint32(1, -1, -1),
0259     lpSizeTower1 = cms.vint32(72, 56, 8, 40, 40, 
0260         24),
0261     rollConnT_7_3 = cms.vint32(4, 5, -1),
0262     # HwPlane 6
0263     rollConnLP_0_5 = cms.vint32(0, 0, 0),
0264     rollConnLP_7_2 = cms.vint32(5, 5, 0),
0265     # HwPlane 5
0266     rollConnLP_0_4 = cms.vint32(0, 0, 0),
0267     rollConnT_3_3 = cms.vint32(-1, -1, -1),
0268     rollConnT_3_2 = cms.vint32(-1, -1, -1),
0269     rollConnLP_17_4 = cms.vint32(0, 0, 0),
0270     rollConnT_3_0 = cms.vint32(-1, -1, -1),
0271     rollConnLP_17_0 = cms.vint32(1, 0, 0),
0272     rollConnT_3_5 = cms.vint32(-1, -1, -1),
0273     rollConnT_3_4 = cms.vint32(-1, -1, -1),
0274     rollConnT_10_4 = cms.vint32(-1, -1, -1),
0275     rollConnT_8_0 = cms.vint32(-1, 7, -1),
0276     rollConnLP_7_3 = cms.vint32(6, 6, 0),
0277     # HwPlane 4
0278     rollConnLP_0_3 = cms.vint32(0, 0, 0),
0279     rollConnLP_17_5 = cms.vint32(0, 0, 0),
0280     # HwPlane 3
0281     rollConnLP_0_2 = cms.vint32(0, 0, 0),
0282     rollConnT_10_5 = cms.vint32(-1, -1, -1),
0283     rollConnLP_11_2 = cms.vint32(3, 3, 0),
0284     rollConnLP_11_3 = cms.vint32(4, 4, 0),
0285     rollConnLP_11_0 = cms.vint32(1, 0, 0),
0286     rollConnLP_11_1 = cms.vint32(2, 0, 0),
0287     rollConnLP_11_4 = cms.vint32(0, 0, 0),
0288     rollConnLP_11_5 = cms.vint32(0, 0, 0),
0289     rollConnT_8_1 = cms.vint32(-1, -1, -1),
0290     rollConnLP_7_0 = cms.vint32(1, 1, 0),
0291     lpSizeTower8 = cms.vint32(72, 24, 40, 8, 0, 
0292         0),
0293     lpSizeTower9 = cms.vint32(72, 8, 40, 0, 0, 
0294         0),
0295     #vint32 lpSizeTower5 = {72, 56,  8, 8, 40, 24}  // old CMSSW bug compatible
0296     lpSizeTower6 = cms.vint32(56, 72, 40, 8, 24, 
0297         0),
0298     rollConnLP_13_5 = cms.vint32(0, 0, 0),
0299     lpSizeTower4 = cms.vint32(72, 56, 8, 40, 40, 
0300         24),
0301     #vint32 lpSizeTower5 = {72, 56,  8, 40, 40, 24} // Bug
0302     lpSizeTower5 = cms.vint32(72, 56, 40, 8, 40, 
0303         24),
0304     lpSizeTower2 = cms.vint32(72, 56, 8, 40, 40, 
0305         24),
0306     rollConnLP_13_1 = cms.vint32(2, 0, 0),
0307     rollConnLP_13_2 = cms.vint32(3, 3, 0),
0308     rollConnLP_13_3 = cms.vint32(4, 4, 0),
0309     towerEnd = cms.int32(16),
0310     rollConnLP_15_4 = cms.vint32(0, 0, 0),
0311     rollConnLP_15_5 = cms.vint32(0, 0, 0),
0312     rollConnLP_15_2 = cms.vint32(3, 3, 0),
0313     rollConnLP_15_3 = cms.vint32(4, 0, 0),
0314     rollConnLP_15_0 = cms.vint32(1, 1, 0),
0315     rollConnLP_15_1 = cms.vint32(2, 0, 0)
0316 )
0317 RPCConeDefSrc = cms.ESSource("EmptyESSource",
0318     recordName = cms.string('L1RPCConeDefinitionRcd'),
0319     iovIsRunNotTime = cms.bool(True),
0320     firstValid = cms.vuint32(1)
0321 )
0322 
0323 # writer modules
0324 process.load("CondTools.L1Trigger.L1CondDBPayloadWriter_cff")
0325 process.L1CondDBPayloadWriter.writeL1TriggerKey = cms.bool(False)
0326 process.L1CondDBPayloadWriter.L1TriggerKeyListTag = cms.string('L1TriggerKeyList_IDEAL')
0327 process.L1CondDBPayloadWriter.offlineDB = cms.string('sqlite_file:l1config.db')
0328 process.L1CondDBPayloadWriter.offlineAuthentication = cms.string('.')
0329 
0330 # Use highest possible run number so we always get the latest version
0331 # of L1TriggerKeyList.
0332 process.maxEvents = cms.untracked.PSet(
0333     input = cms.untracked.int32(1)
0334 )
0335 process.source = cms.Source("EmptyIOVSource",
0336     timetype = cms.string('runnumber'),
0337     firstValue = cms.uint64(4294967295),
0338     lastValue = cms.uint64(4294967295),
0339     interval = cms.uint64(1)
0340 )
0341 
0342 process.p = cms.Path(process.L1CondDBPayloadWriter)
0343