File indexing completed on 2024-04-06 12:10:15
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,
0008 VarParsing.VarParsing.multiplicity.singleton,
0009 VarParsing.VarParsing.varType.int,
0010 "Run number.")
0011
0012 options.register('datafnPosition',
0013 3,
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/',
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',
0026 VarParsing.VarParsing.multiplicity.singleton,
0027 VarParsing.VarParsing.varType.string,
0028 "Stream label used in json discovery.")
0029
0030 options.register('scanOnce',
0031 False,
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,
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,
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,
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 beginning of the processing.")
0053
0054 options.register('deleteDatFiles',
0055 False,
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,
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.register('loadFiles',
0067 True,
0068 VarParsing.VarParsing.multiplicity.singleton,
0069 VarParsing.VarParsing.varType.bool,
0070 "Tells the source to load the data files. If set to False, the source will create skeleton lumi transitions.")
0071
0072 options.parseArguments()
0073
0074
0075 DQMProtobufReader = cms.Source("DQMProtobufReader",
0076
0077 runNumber = cms.untracked.uint32(options.runNumber),
0078 runInputDir = cms.untracked.string(options.runInputDir),
0079 streamLabel = cms.untracked.string(options.streamLabel),
0080 scanOnce = cms.untracked.bool(options.scanOnce),
0081 datafnPosition = cms.untracked.uint32(options.datafnPosition),
0082 delayMillis = cms.untracked.uint32(options.delayMillis),
0083 nextLumiTimeoutMillis = cms.untracked.int32(options.nextLumiTimeoutMillis),
0084
0085 skipFirstLumis = cms.untracked.bool(options.skipFirstLumis),
0086 deleteDatFiles = cms.untracked.bool(options.deleteDatFiles),
0087 endOfRunKills = cms.untracked.bool(options.endOfRunKills),
0088 loadFiles = cms.untracked.bool(options.loadFiles),
0089 )