CMS 3D CMS Logo

CreateSqliteForCondDB_cfg.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 process = cms.Process( "CREATE" )
4 
5 Triggers = cms.VPSet(
6  cms.PSet(
7  listName = cms.string( 'TauTriggerForMuDataset' ),
8  hltPaths = cms.vstring('HLT_IsoMu24_eta2p1_v*'),
9  dataTypeToInclude = cms.vstring('RealData','RealMuonsData'),
10  ),
11 
16  cms.PSet(
17  listName = cms.string( 'TauTriggerForJetDataset' ),
18  hltPaths = cms.vstring('HLT_Jet30_L1FastJet_v*'),
19  dataTypeToInclude = cms.vstring('RealData'),
20  ),
21  cms.PSet(
22  listName = cms.string( 'TauTriggerForMultiJetDataset' ),
23  hltPaths = cms.vstring('HLT_Jet30_L1FastJet_v*'),
24  dataTypeToInclude = cms.vstring('RealData'),
25  ),
26  cms.PSet(
27  listName = cms.string( 'TauTriggerForDoubleElectronDataset' ),
28  hltPaths = cms.vstring('HLT_Ele20_CaloIdVT_CaloIsoVT_TrkIdT_TrkIsoVT_SC4_Mass50_v*'),
29  dataTypeToInclude = cms.vstring('RealElectronsData'),
30  ),
31  cms.PSet(
32  listName = cms.string( 'TauTriggerForTauPlusXDataset' ),
33  hltPaths = cms.vstring('HLT_Ele20_CaloIdVT_CaloIsoRhoT_TrkIdT_TrkIsoT_LooseIsoPFTau20_v*'),
34  dataTypeToInclude = cms.vstring('RealElectronsData'),
35  ),
36  )
37 
38 usedQCDTriggers = []
39 usedMuTriggers = []
40 usedEleTriggers = []
41 for trigger in Triggers:
42  if 'RealData' in trigger.dataTypeToInclude.value():
43  usedQCDTriggers.extend(trigger.hltPaths.value())
44  if 'RealMuonsData' in trigger.dataTypeToInclude.value():
45  usedMuTriggers.extend(trigger.hltPaths.value())
46  if 'RealElectronsData' in trigger.dataTypeToInclude.value():
47  usedEleTriggers.extend(trigger.hltPaths.value())
48 
49 Triggers.append(
50  cms.PSet(
51  listName = cms.string( 'TauTriggerForALLQCDDataset' ),
52  hltPaths = cms.vstring(list(set(usedQCDTriggers))),
53  )
54  )
55 
56 Triggers.append(
57  cms.PSet(
58  listName = cms.string( 'TauTriggerForALLMuDataset' ),
59  hltPaths = cms.vstring(list(set(usedMuTriggers))),
60  )
61  )
62 
63 Triggers.append(
64  cms.PSet(
65  listName = cms.string( 'TauTriggerForALLEleDataset' ),
66  hltPaths = cms.vstring(list(set(usedEleTriggers))),
67  )
68  )
69 
70 process.load( "FWCore.MessageLogger.MessageLogger_cfi" )
71 process.MessageLogger.cerr.enable = False
72 process.MessageLogger.cout = cms.untracked.PSet(
73  enable = cms.untracked.bool(True),
74  INFO = cms.untracked.PSet(
75  reportEvery = cms.untracked.int32( 1 )
76  )
77 )
78 
79 process.source = cms.Source( "EmptySource")
80 process.maxEvents = cms.untracked.PSet(
81  input = cms.untracked.int32( 1 )
82 )
83 
84 process.AlCaRecoTriggerBitsRcdCreate = cms.EDAnalyzer(
85  "AlCaRecoTriggerBitsRcdUpdate",
86  firstRunIOV = cms.uint32( 1 ),
87  lastRunIOV = cms.int32( -1 ),
88  startEmpty = cms.bool( True ),
89  listNamesRemove = cms.vstring(),
90  # parameter sets to define lists of logical expressions
91  triggerListsAdd = Triggers,
92 )
93 
95 process.PoolDBOutputService = cms.Service(
96  "PoolDBOutputService",
97  CondCore.DBCommon.CondDBSetup_cfi.CondDBSetup,
98  timetype = cms.untracked.string( 'runnumber' ),
99  connect = cms.string( 'sqlite_file:GenericTriggerEventFlag_AlCaRecoTriggerBits.db' ),
100  toPut = cms.VPSet(
101  cms.PSet(
102  record = cms.string( 'AlCaRecoTriggerBitsRcd' ),
103  tag = cms.string( 'PFTauDQMTrigger_v0' ),
104  label = cms.untracked.string("PFTauDQMTrigger")
105  ),
106  ),
107  )
108 
109 process.p = cms.Path(
110  process.AlCaRecoTriggerBitsRcdCreate
111 )