Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:13:55

0001 import FWCore.ParameterSet.Config as cms
0002 import FWCore.ParameterSet.VarParsing as VarParsing
0003 
0004 options = VarParsing.VarParsing('analysis')
0005 
0006 options.register('runNumber',
0007                  100, # default value
0008                  VarParsing.VarParsing.multiplicity.singleton,
0009                  VarParsing.VarParsing.varType.int,
0010                  "Run number.")
0011 
0012 options.register('datafnPosition',
0013                  3, # default value
0014                  VarParsing.VarParsing.multiplicity.singleton,
0015                  VarParsing.VarParsing.varType.int,
0016                  "Data filename position in the positional arguments array 'data' in json file.")
0017 
0018 options.register('runInputDir',
0019                  '/build1/micius/OnlineDQM_sample/', # default value
0020                  VarParsing.VarParsing.multiplicity.singleton,
0021                  VarParsing.VarParsing.varType.string,
0022                  "Directory where the DQM files will appear.")
0023 
0024 options.register('streamLabel',
0025                  '_streamA', # default value
0026                  VarParsing.VarParsing.multiplicity.singleton,
0027                  VarParsing.VarParsing.varType.string,
0028                  "Stream label used in json discovery.")
0029 
0030 options.register('scanOnce',
0031                  False, # default value
0032                  VarParsing.VarParsing.multiplicity.singleton,
0033                  VarParsing.VarParsing.varType.bool,
0034                  "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'.")
0035 
0036 options.register('minEventsPerLumi',
0037                  1, # default value
0038                  VarParsing.VarParsing.multiplicity.singleton,
0039                  VarParsing.VarParsing.varType.int,
0040                  "Minimum number of events to process per lumisection.")
0041 
0042 options.register('delayMillis',
0043                  500, # default value
0044                  VarParsing.VarParsing.multiplicity.singleton,
0045                  VarParsing.VarParsing.varType.int,
0046                  "Number of milliseconds to wait between file checks.")
0047 
0048 options.register('nextLumiTimeoutMillis',
0049                  -1, # default value
0050                  VarParsing.VarParsing.multiplicity.singleton,
0051                  VarParsing.VarParsing.varType.int,
0052                  "Number of milliseconds to wait before switching to the next lumi section if the current is missing, -1 to disable.")
0053 
0054 options.register('skipFirstLumis',
0055                  False, # default value
0056                  VarParsing.VarParsing.multiplicity.singleton,
0057                  VarParsing.VarParsing.varType.bool,
0058                  "Skip (and ignore the minEventsPerLumi parameter) for the files which have been available at the begining of the processing. ")
0059 
0060 options.register('deleteDatFiles',
0061                  False, # default value
0062                  VarParsing.VarParsing.multiplicity.singleton,
0063                  VarParsing.VarParsing.varType.bool,
0064                  "Delete data files after they have been closed, in order to save disk space.")
0065 
0066 options.register('endOfRunKills',
0067                  False, # default value
0068                  VarParsing.VarParsing.multiplicity.singleton,
0069                  VarParsing.VarParsing.varType.bool,
0070                  "Kill the processing as soon as the end-of-run file appears, even if there are/will be unprocessed lumisections.")
0071 
0072 options.register('endOfRunKills',
0073                  False, # default value
0074                  VarParsing.VarParsing.multiplicity.singleton,
0075                  VarParsing.VarParsing.varType.bool,
0076                  "Kill the processing as soon as the end-of-run file appears, even if there are/will be unprocessed lumisections.")
0077 
0078 
0079 
0080 options.parseArguments()
0081 
0082 # Input source
0083 DQMStreamerReader = cms.Source("DQMStreamerReader",
0084     SelectEvents = cms.untracked.vstring("*"),
0085     runNumber = cms.untracked.uint32(options.runNumber),
0086     runInputDir = cms.untracked.string(options.runInputDir),
0087     streamLabel = cms.untracked.string(options.streamLabel),
0088     scanOnce = cms.untracked.bool(options.scanOnce),
0089     datafnPosition = cms.untracked.uint32(options.datafnPosition),
0090 
0091     minEventsPerLumi = cms.untracked.int32(options.minEventsPerLumi),
0092     delayMillis = cms.untracked.uint32(options.delayMillis),
0093     nextLumiTimeoutMillis = cms.untracked.int32(options.nextLumiTimeoutMillis),
0094     skipFirstLumis = cms.untracked.bool(options.skipFirstLumis),
0095     deleteDatFiles = cms.untracked.bool(options.deleteDatFiles),
0096     endOfRunKills  = cms.untracked.bool(options.endOfRunKills),
0097 )