|
| 1 | +import FWCore.ParameterSet.Config as cms |
| 2 | +from FWCore.ParameterSet.VarParsing import VarParsing |
| 3 | + |
| 4 | +process = cms.Process("reader") |
| 5 | + |
| 6 | +process.load("FWCore.MessageLogger.MessageLogger_cfi") |
| 7 | +process.MessageLogger.cout.threshold = cms.untracked.string('INFO') |
| 8 | +process.MessageLogger.debugModules = cms.untracked.vstring('*') |
| 9 | + |
| 10 | +process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) ) |
| 11 | + |
| 12 | +options = VarParsing ('analysis') |
| 13 | +options.register ("firstRun", 341761, VarParsing.multiplicity.singleton, VarParsing.varType.int) |
| 14 | +options.maxEvents = 10000 |
| 15 | +options.parseArguments() |
| 16 | + |
| 17 | +# Better to know actual number of events in the .raw data file to set maxEvents. |
| 18 | +# Otherwise it doesn't stop automatically at the end of reading of .raw data file |
| 19 | +process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.maxEvents) ) |
| 20 | + |
| 21 | +process.source = cms.Source("EmptySource", |
| 22 | + firstRun= cms.untracked.uint32(options.firstRun), |
| 23 | + numberEventsInLuminosityBlock = cms.untracked.uint32(200), |
| 24 | + numberEventsInRun = cms.untracked.uint32(0) |
| 25 | +) |
| 26 | + |
| 27 | +# For B904 setup ME11 chamber, which corresponds to ME+1/1/02 in the production system mapping |
| 28 | +# changing to FED837 and RUI16 could let to pass data without disabling mapping consistency check unpacking flags |
| 29 | +process.rawDataCollector = cms.EDProducer('CSCFileReader', |
| 30 | + firstEvent = cms.untracked.int32(0), |
| 31 | + FED846 = cms.untracked.vstring('RUI01'), |
| 32 | + RUI01 = cms.untracked.vstring('/afs/cern.ch/user/b/barvic/public/cscgem_tests/csc_00000001_EmuRUI01_Local_000_210422_152923_UTC.raw') |
| 33 | +# FED837 = cms.untracked.vstring('RUI16'), |
| 34 | +# RUI16 = cms.untracked.vstring('/afs/cern.ch/user/b/barvic/public/cscgem_tests/csc_00000001_EmuRUI01_Local_000_210519_162820_UTC.raw') |
| 35 | +) |
| 36 | + |
| 37 | +process.FEVT = cms.OutputModule("PoolOutputModule", |
| 38 | + fileName = cms.untracked.string("/tmp/barvic/csc_00000001_EmuRUI01_Local_000_210422_152923_UTC.root"), |
| 39 | + outputCommands = cms.untracked.vstring("keep *") |
| 40 | +) |
| 41 | + |
| 42 | +process.p = cms.Path( process.rawDataCollector) |
| 43 | + |
| 44 | +process.outpath = cms.EndPath(process.FEVT) |
| 45 | + |
0 commit comments