CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
inputsource_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import FWCore.ParameterSet.VarParsing as VarParsing
3 
4 import sys
5 from dqmPythonTypes import *
6 
7 options = VarParsing.VarParsing('analysis')
8 
9 options.register('runNumber',
10  111,
11  VarParsing.VarParsing.multiplicity.singleton,
12  VarParsing.VarParsing.varType.int,
13  "Run number.")
14 
15 options.register('runInputDir',
16  '/tmp',
17  VarParsing.VarParsing.multiplicity.singleton,
18  VarParsing.VarParsing.varType.string,
19  "Directory where the DQM files will appear.")
20 
21 options.register('skipFirstLumis',
22  False, # default value
23  VarParsing.VarParsing.multiplicity.singleton,
24  VarParsing.VarParsing.varType.bool,
25  "Skip (and ignore the minEventsPerLumi parameter) for the files which have been available at the begining of the processing. ")
26 
27 # Parameters for runType
28 
29 options.register ('runkey',
30  'pp_run',
31  VarParsing.VarParsing.multiplicity.singleton,
32  VarParsing.VarParsing.varType.string,
33  "Run Keys of CMS")
34 
35 options.parseArguments()
36 
37 # Fix to allow scram to compile
38 #if len(sys.argv) > 1:
39 # options.parseArguments()
40 
41 runType = RunType()
42 if not options.runkey.strip():
43  options.runkey = 'pp_run'
44 
45 runType.setRunType(options.runkey.strip())
46 
47 # Input source
48 source = cms.Source("DQMStreamerReader",
49  runNumber = cms.untracked.uint32(options.runNumber),
50  runInputDir = cms.untracked.string(options.runInputDir),
51  SelectEvents = cms.untracked.vstring('*'),
52  streamLabel = cms.untracked.string('streamDQM'),
53  minEventsPerLumi = cms.untracked.int32(1),
54  delayMillis = cms.untracked.uint32(500),
55  nextLumiTimeoutMillis = cms.untracked.int32(90000),
56  skipFirstLumis = cms.untracked.bool(options.skipFirstLumis),
57  deleteDatFiles = cms.untracked.bool(False),
58  endOfRunKills = cms.untracked.bool(True),
59 )