CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
pick_events.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 process = cms.Process("SKIMb")
4 
5 process.load("FWCore.MessageLogger.MessageLogger_cfi")
6 process.load("CondCore.DBCommon.CondDBSetup_cfi")
7 
8 process.source = cms.Source("PoolSource",
9  fileNames = cms.untracked.vstring(
10 # '/store/data/Commissioning09/Cosmics/RAW/v1/000/079/153/025F7681-391A-DE11-9556-0016177CA7A0.root'
11  '/store/data/Commissioning08/Cosmics/RAW-RECO/CRAFT_ALL_V9_SuperPointing_225-v3/0005/B8FB3273-5DFF-DD11-BEAB-00304875A7B5.root',
12  '/store/data/Commissioning08/Cosmics/RAW-RECO/CRAFT_ALL_V9_SuperPointing_225-v3/0005/C0E4F880-5CFF-DD11-B561-0030487624FD.root',
13  '/store/data/Commissioning08/Cosmics/RAW-RECO/CRAFT_ALL_V9_SuperPointing_225-v3/0005/EAA9AE47-5FFF-DD11-A966-001A92810ADE.root'
14  )
15 )
16 process.maxEvents = cms.untracked.PSet(
17  input = cms.untracked.int32(-1)
18 )
19 
20 process.load("Configuration.EventContent.EventContentCosmics_cff")
21 
22 
23 #--------------------------------------------------
24 # Pick a range of events
25 # (includes the first and last ones specified)
26 #--------------------------------------------------
27 process.pickEvents = cms.EDFilter(
28  "PickEvents",
29 
30  # the original format to input run/event -based selection is described in :
31  # DPGAnalysis/Skims/data/listrunev
32  # and kept as default, for historical reasons
33  RunEventList = cms.untracked.string("DPGAnalysis/Skims/data/listrunev"),
34 
35  # run/lumiSection @json -based input of selection can be toggled (but not used in THIS example)
36  IsRunLsBased = cms.bool(False),
37 
38  # json is not used in this example -> list of LS left empty
39  LuminositySectionsBlockRange = cms.untracked.VLuminosityBlockRange( () )
40 
41  )
42 
43 process.PickEventsPath = cms.Path( process.pickEvents )
44 
45 process.out = cms.OutputModule("PoolOutputModule",
46  outputCommands = cms.untracked.vstring('keep *','drop *_MEtoEDMConverter_*_*'),
47  SelectEvents = cms.untracked.PSet(
48  SelectEvents = cms.vstring('PickEventsPath')
49  ),
50  dataset = cms.untracked.PSet(
51  dataTier = cms.untracked.string('RAW-RECO'),
52  filterName = cms.untracked.string('PickEvents')),
53 
54  fileName = cms.untracked.string("PickEvents.root"),
55 )
56 process.this_is_the_end = cms.EndPath(process.out)