Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:26:09

0001 # Auto generated configuration file
0002 # using: 
0003 # Revision: 1.19 
0004 # Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v 
0005 # with command line options: SingleElectronPt10_cfi.py -s GEN,SIM,DIGI,L1 --pileup=NoPileUp --geometry DB --conditions=auto:startup -n 1 --no_exec
0006 import FWCore.ParameterSet.Config as cms
0007 
0008 # options
0009 import FWCore.ParameterSet.VarParsing as VarParsing
0010 options = VarParsing.VarParsing('analysis')
0011 options.register('skipEvents',
0012                  0,
0013                  VarParsing.VarParsing.multiplicity.singleton,
0014                  VarParsing.VarParsing.varType.int,
0015                  "Number of events to skip")
0016 options.register('streamer',
0017                  False,
0018                  VarParsing.VarParsing.multiplicity.singleton,
0019                  VarParsing.VarParsing.varType.bool,
0020                  "Use streamer file as input")
0021 
0022 options.parseArguments()
0023 
0024 process = cms.Process('Raw2Digi')
0025 
0026 # import of standard configurations
0027 process.load('Configuration.StandardSequences.Services_cff')
0028 process.load('FWCore.MessageService.MessageLogger_cfi')
0029 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0030 process.load('Configuration.Geometry.GeometryDB_cff')
0031 process.load('Configuration.StandardSequences.MagneticField_38T_cff')
0032 process.load('Configuration.StandardSequences.SimL1Emulator_cff')
0033 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0034 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0035 
0036 process.maxEvents = cms.untracked.PSet(
0037     input = cms.untracked.int32(10)
0038 )
0039 
0040 # Input source
0041 if (options.streamer) :
0042     process.source = cms.Source(
0043         "NewEventStreamFileReader",
0044         fileNames = cms.untracked.vstring (options.inputFiles),
0045         skipEvents=cms.untracked.uint32(options.skipEvents)
0046     )
0047 else :
0048     process.source = cms.Source("EmptySource")
0049 
0050 process.options = cms.untracked.PSet(
0051     SkipEvent = cms.untracked.vstring('ProductNotFound')
0052 )
0053 
0054 
0055 # Output definition
0056 
0057 process.output = cms.OutputModule(
0058     "PoolOutputModule",
0059     splitLevel = cms.untracked.int32(0),
0060     eventAutoFlushCompressedSize = cms.untracked.int32(5242880),
0061     outputCommands = cms.untracked.vstring("keep *",
0062                        "drop *_mix_*_*"),
0063     fileName = cms.untracked.string('L1T_EDM.root'),
0064     dataset = cms.untracked.PSet(
0065         filterName = cms.untracked.string(''),
0066         dataTier = cms.untracked.string('')
0067     )
0068 )
0069 
0070 # Additional output definition
0071 
0072 # Other statements
0073 from Configuration.AlCa.GlobalTag import GlobalTag
0074 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:startup', '')
0075 
0076 # enable debug message logging for our modules
0077 process.MessageLogger = cms.Service(
0078     "MessageLogger",
0079     threshold  = cms.untracked.string('DEBUG'),
0080     categories = cms.untracked.vstring('L1T'),
0081 #    l1t   = cms.untracked.PSet(
0082 #   threshold  = cms.untracked.string('DEBUG')
0083 #    ),
0084     debugModules = cms.untracked.vstring('*'),
0085 #        'stage2GMTRaw',
0086 #    ),
0087 #    cout = cms.untracked.PSet(
0088 #    )
0089 )
0090 
0091 # TTree output file
0092 process.load("CommonTools.UtilAlgos.TFileService_cfi")
0093 process.TFileService.fileName = cms.string('l1t.root')
0094 
0095 
0096 # user stuff
0097 
0098 # raw data from MP card
0099 process.load('EventFilter.L1TRawToDigi.stage2GMTMP7BufferRaw_cfi')
0100 process.stage2GMTRaw.nFramesLatency   = cms.untracked.vuint32(1)
0101 process.stage2GMTRaw.nFramesOffset   = cms.untracked.vuint32(5)
0102 process.stage2GMTRaw.rxFile = cms.untracked.string("many_events.txt")
0103 process.stage2GMTRaw.txFile = cms.untracked.string("many_events_out.txt")
0104 
0105 # dump raw data
0106 process.dumpRaw = cms.EDAnalyzer( 
0107     "DumpFEDRawDataProduct",
0108     label = cms.untracked.string("stage2GMTRaw"),
0109     feds = cms.untracked.vint32(1402),
0110     dumpPayload = cms.untracked.bool ( True )
0111 )
0112 
0113 # raw to digi
0114 process.load('EventFilter.L1TRawToDigi.gmtStage2Digis_cfi')
0115 if options.streamer:
0116     process.gmtStage2Digis.InputLabel = cms.InputTag('rawDataCollector')
0117     process.dumpRaw.label = cms.untracked.string('rawDataCollector')
0118 else:
0119     process.gmtStage2Digis.InputLabel = cms.InputTag('stage2GMTRaw')
0120 
0121 #process.gmtStage2Digis.FWOverride = cms.bool(True)
0122 #process.gmtStage2Digis.FWId       = cms.uint32(0xffffffff)
0123 process.gmtStage2Digis.debug      = cms.untracked.bool (True)
0124 
0125 process.load('EventFilter.L1TRawToDigi.gmtStage2Raw_cfi')
0126 
0127 process.dumpRaw2 = process.dumpRaw.clone()
0128 process.dumpRaw2.label = cms.untracked.string("gmtStage2Raw")
0129 
0130 # Path and EndPath definitions
0131 process.path = cms.Path(
0132     process.stage2GMTRaw
0133     +process.dumpRaw
0134     +process.gmtStage2Digis
0135     +process.gmtStage2Raw
0136     +process.dumpRaw2
0137 )
0138 if options.streamer:
0139     process.path.remove(process.stage2GMTRaw)
0140 
0141 process.out = cms.EndPath(
0142     process.output
0143 )