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                  'streamDQMHistograms', # 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('delayMillis',
0037                  500, # default value
0038                  VarParsing.VarParsing.multiplicity.singleton,
0039                  VarParsing.VarParsing.varType.int,
0040                  "Number of milliseconds to wait between file checks.")
0041 
0042 options.register('nextLumiTimeoutMillis',
0043                  30000, # default value
0044                  VarParsing.VarParsing.multiplicity.singleton,
0045                  VarParsing.VarParsing.varType.int,
0046                  "Number of milliseconds to wait before switching to the next lumi section if the current is missing, -1 to disable.")
0047 
0048 options.register('skipFirstLumis',
0049                  False, # default value
0050                  VarParsing.VarParsing.multiplicity.singleton,
0051                  VarParsing.VarParsing.varType.bool,
0052                  "Skip (and ignore the minEventsPerLumi parameter) for the files which have been available at the begining of the processing. ")
0053 
0054 options.register('deleteDatFiles',
0055                  False, # default value
0056                  VarParsing.VarParsing.multiplicity.singleton,
0057                  VarParsing.VarParsing.varType.bool,
0058                  "Delete data files after they have been closed, in order to save disk space.")
0059 
0060 options.register('endOfRunKills',
0061                  False, # default value
0062                  VarParsing.VarParsing.multiplicity.singleton,
0063                  VarParsing.VarParsing.varType.bool,
0064                  "Kill the processing as soon as the end-of-run file appears, even if there are/will be unprocessed lumisections.")
0065 
0066 options.parseArguments()
0067 
0068 # Input source
0069 DQMProtobufReader = cms.Source("DQMProtobufReader",
0070     runNumber = cms.untracked.uint32(options.runNumber),
0071     runInputDir = cms.untracked.string(options.runInputDir),
0072     streamLabel = cms.untracked.string(options.streamLabel),
0073     scanOnce = cms.untracked.bool(options.scanOnce),
0074     datafnPosition = cms.untracked.uint32(options.datafnPosition),
0075 
0076     delayMillis = cms.untracked.uint32(options.delayMillis),
0077     nextLumiTimeoutMillis = cms.untracked.int32(options.nextLumiTimeoutMillis),
0078     skipFirstLumis = cms.untracked.bool(options.skipFirstLumis),
0079     deleteDatFiles = cms.untracked.bool(options.deleteDatFiles),
0080     endOfRunKills  = cms.untracked.bool(options.endOfRunKills),
0081 )