CMS 3D CMS Logo

DQMProtobufReader_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import FWCore.ParameterSet.VarParsing as VarParsing
3 
4 options = VarParsing.VarParsing('analysis')
5 
6 options.register('runNumber',
7  100, # default value
8  VarParsing.VarParsing.multiplicity.singleton,
9  VarParsing.VarParsing.varType.int,
10  "Run number.")
11 
12 options.register('datafnPosition',
13  3, # default value
14  VarParsing.VarParsing.multiplicity.singleton,
15  VarParsing.VarParsing.varType.int,
16  "Data filename position in the positional arguments array 'data' in json file.")
17 
18 options.register('runInputDir',
19  '/build1/micius/OnlineDQM_sample/', # default value
20  VarParsing.VarParsing.multiplicity.singleton,
21  VarParsing.VarParsing.varType.string,
22  "Directory where the DQM files will appear.")
23 
24 options.register('streamLabel',
25  'streamDQMHistograms', # default value
26  VarParsing.VarParsing.multiplicity.singleton,
27  VarParsing.VarParsing.varType.string,
28  "Stream label used in json discovery.")
29 
30 options.register('scanOnce',
31  False, # default value
32  VarParsing.VarParsing.multiplicity.singleton,
33  VarParsing.VarParsing.varType.bool,
34  "Don't repeat file scans: use what was found during the initial scan. EOR file is ignored and the state is set to 'past end of run'.")
35 
36 options.register('delayMillis',
37  500, # default value
38  VarParsing.VarParsing.multiplicity.singleton,
39  VarParsing.VarParsing.varType.int,
40  "Number of milliseconds to wait between file checks.")
41 
42 options.register('nextLumiTimeoutMillis',
43  30000, # default value
44  VarParsing.VarParsing.multiplicity.singleton,
45  VarParsing.VarParsing.varType.int,
46  "Number of milliseconds to wait before switching to the next lumi section if the current is missing, -1 to disable.")
47 
48 options.register('skipFirstLumis',
49  False, # default value
50  VarParsing.VarParsing.multiplicity.singleton,
51  VarParsing.VarParsing.varType.bool,
52  "Skip (and ignore the minEventsPerLumi parameter) for the files which have been available at the begining of the processing. ")
53 
54 options.register('deleteDatFiles',
55  False, # default value
56  VarParsing.VarParsing.multiplicity.singleton,
57  VarParsing.VarParsing.varType.bool,
58  "Delete data files after they have been closed, in order to save disk space.")
59 
60 options.register('endOfRunKills',
61  False, # default value
62  VarParsing.VarParsing.multiplicity.singleton,
63  VarParsing.VarParsing.varType.bool,
64  "Kill the processing as soon as the end-of-run file appears, even if there are/will be unprocessed lumisections.")
65 
66 options.parseArguments()
67 
68 # Input source
69 DQMProtobufReader = cms.Source("DQMProtobufReader",
70  runNumber = cms.untracked.uint32(options.runNumber),
71  runInputDir = cms.untracked.string(options.runInputDir),
72  streamLabel = cms.untracked.string(options.streamLabel),
73  scanOnce = cms.untracked.bool(options.scanOnce),
74  datafnPosition = cms.untracked.uint32(options.datafnPosition),
75 
76  delayMillis = cms.untracked.uint32(options.delayMillis),
77  nextLumiTimeoutMillis = cms.untracked.int32(options.nextLumiTimeoutMillis),
78  skipFirstLumis = cms.untracked.bool(options.skipFirstLumis),
79  deleteDatFiles = cms.untracked.bool(options.deleteDatFiles),
80  endOfRunKills = cms.untracked.bool(options.endOfRunKills),
81 )