|
26 | 26 |
|
27 | 27 | #----------------------------- |
28 | 28 | if unitTest: |
29 | | - import FWCore.ParameterSet.VarParsing as VarParsing |
30 | | - options = VarParsing.VarParsing("analysis") |
31 | | - |
32 | | - options.register( |
33 | | - "runkey", |
34 | | - "pp_run", |
35 | | - VarParsing.VarParsing.multiplicity.singleton, |
36 | | - VarParsing.VarParsing.varType.string, |
37 | | - "Run Keys of CMS" |
38 | | - ) |
39 | | - |
40 | | - options.register('runNumber', |
41 | | - 346508, |
42 | | - VarParsing.VarParsing.multiplicity.singleton, |
43 | | - VarParsing.VarParsing.varType.int, |
44 | | - "Run number. This run number has to be present in the dataset configured with the dataset option.") |
45 | | - |
46 | | - options.register('dataset', |
47 | | - '/ExpressPhysics/Commissioning2021-Express-v1/FEVT', |
48 | | - VarParsing.VarParsing.multiplicity.singleton, |
49 | | - VarParsing.VarParsing.varType.string, |
50 | | - "Dataset name like '/ExpressCosmics/Commissioning2019-Express-v1/FEVT'") |
51 | | - |
52 | | - options.register('maxLumi', |
53 | | - 2, |
54 | | - VarParsing.VarParsing.multiplicity.singleton, |
55 | | - VarParsing.VarParsing.varType.int, |
56 | | - "Only lumisections up to maxLumi are processed.") |
57 | | - |
58 | | - options.register('minLumi', |
59 | | - 1, |
60 | | - VarParsing.VarParsing.multiplicity.singleton, |
61 | | - VarParsing.VarParsing.varType.int, |
62 | | - "Only lumisections starting from minLumi are processed.") |
63 | | - |
64 | | - options.register('lumiPattern', |
65 | | - '*', |
66 | | - VarParsing.VarParsing.multiplicity.singleton, |
67 | | - VarParsing.VarParsing.varType.string, |
68 | | - "Only lumisections with numbers matching lumiPattern are processed.") |
69 | | - |
70 | | - options.register('eventsPerLumi', |
71 | | - 100, |
72 | | - VarParsing.VarParsing.multiplicity.singleton, |
73 | | - VarParsing.VarParsing.varType.int, |
74 | | - "This number of last events in each lumisection will be processed.") |
75 | | - |
76 | | - # This is used only by the online clients themselves. |
77 | | - # We need to register it here because otherwise an error occurs saying that there is an unidentified option. |
78 | | - options.register('unitTest', |
79 | | - True, |
80 | | - VarParsing.VarParsing.multiplicity.singleton, |
81 | | - VarParsing.VarParsing.varType.bool, |
82 | | - "Required to avoid the error.") |
83 | | - |
84 | | - options.register('noDB', |
85 | | - True, # default value |
86 | | - VarParsing.VarParsing.multiplicity.singleton, |
87 | | - VarParsing.VarParsing.varType.bool, |
88 | | - "Don't upload the BeamSpot conditions to the DB") |
89 | | - |
90 | | - options.parseArguments() |
91 | | - |
92 | | - process.source = cms.Source("EmptySource") |
93 | | - process.source.numberEventsInRun=cms.untracked.uint32(100) |
94 | | - process.source.firstRun = cms.untracked.uint32(options.runNumber) |
95 | | - process.source.firstLuminosityBlock = cms.untracked.uint32(1) |
96 | | - process.source.numberEventsInLuminosityBlock = cms.untracked.uint32(2) |
97 | | - process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(100)) |
98 | | - |
| 29 | + process.load("DQM.Integration.config.unitteststreamerinputsource_cfi") |
| 30 | + from DQM.Integration.config.unitteststreamerinputsource_cfi import options |
99 | 31 | else: |
100 | 32 | process.load("DQM.Integration.config.inputsource_cfi") |
101 | 33 | from DQM.Integration.config.inputsource_cfi import options |
|
0 commit comments