Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 ## Initial script to convert from .dat files to root output with EDMCollections - AWB 29.01.16
0002 
0003 import FWCore.ParameterSet.Config as cms
0004 
0005 process = cms.Process("datFile")
0006 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0007 
0008 process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(1)
0009 process.options = cms.untracked.PSet(wantSummary = cms.untracked.bool(True))
0010 
0011 infiles = [
0012 
0013     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0002_streamA_StorageManager.dat',
0014     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0003_streamA_StorageManager.dat',
0015     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0004_streamA_StorageManager.dat',
0016     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0005_streamA_StorageManager.dat',
0017     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0006_streamA_StorageManager.dat',
0018     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0007_streamA_StorageManager.dat',
0019     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0008_streamA_StorageManager.dat',
0020     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0009_streamA_StorageManager.dat',
0021     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0010_streamA_StorageManager.dat',
0022     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0011_streamA_StorageManager.dat',
0023     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0012_streamA_StorageManager.dat',
0024     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0013_streamA_StorageManager.dat',
0025     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0014_streamA_StorageManager.dat',
0026     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0015_streamA_StorageManager.dat',
0027     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0016_streamA_StorageManager.dat',
0028     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0017_streamA_StorageManager.dat',
0029     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0018_streamA_StorageManager.dat',
0030     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0019_streamA_StorageManager.dat',
0031     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0020_streamA_StorageManager.dat',
0032     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0021_streamA_StorageManager.dat',
0033     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0022_streamA_StorageManager.dat',
0034     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0023_streamA_StorageManager.dat',
0035     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0024_streamA_StorageManager.dat',
0036     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0025_streamA_StorageManager.dat',
0037     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0026_streamA_StorageManager.dat',
0038     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0027_streamA_StorageManager.dat',
0039     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0028_streamA_StorageManager.dat',
0040     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0029_streamA_StorageManager.dat',
0041     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0030_streamA_StorageManager.dat',
0042     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0031_streamA_StorageManager.dat',
0043     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0032_streamA_StorageManager.dat',
0044     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0033_streamA_StorageManager.dat',
0045     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0034_streamA_StorageManager.dat',
0046     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0035_streamA_StorageManager.dat',
0047     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0036_streamA_StorageManager.dat',
0048     'file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0037_streamA_StorageManager.dat',
0049 
0050 ]
0051 
0052 fNames = cms.untracked.vstring('file:/afs/cern.ch/work/a/abrinke1/public/EMTF/miniDAQ/dat_dumps/2015_12_13/263758/run263758_ls0025_streamA_StorageManager.dat')
0053 
0054 process.source = cms.Source(
0055     "NewEventStreamFileReader",
0056     # fileNames = fNames,
0057     fileNames = cms.untracked.vstring(infiles),
0058     skipEvents=cms.untracked.uint32(123)
0059 )
0060 
0061 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1000))
0062 
0063 # PostLS1 geometry used
0064 process.load('Configuration.Geometry.GeometryExtended2015Reco_cff')
0065 process.load('Configuration.Geometry.GeometryExtended2015_cff')
0066 ############################
0067 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0068 from Configuration.AlCa.GlobalTag import GlobalTag
0069 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
0070 
0071 # ## Debug / error / warning message output
0072 # process.MessageLogger = cms.Service(
0073 #     "MessageLogger",
0074 #     threshold  = cms.untracked.string('DEBUG'),
0075 #     categories = cms.untracked.vstring('L1T'),
0076 #     debugModules = cms.untracked.vstring('*'),
0077 #     )
0078 
0079 
0080 # dump raw data
0081 process.dump = cms.EDAnalyzer( 
0082     "DumpFEDRawDataProduct",
0083     label = cms.untracked.string("rawDataCollector"),
0084     # feds = cms.untracked.vint32(1402,813),
0085     # feds = cms.untracked.vint32(1402),
0086     dumpPayload = cms.untracked.bool ( True )
0087 )
0088 
0089 process.unpack = cms.EDProducer("L1TRawToDigi",
0090         Setup           = cms.string("stage2::EMTFSetup"),
0091         InputLabel      = cms.InputTag("rawDataCollector"),
0092         FedIds          = cms.vint32( 1384, 1385 ),
0093         FWId            = cms.uint32(0),
0094         debug = cms.untracked.bool(False), ## More debugging output
0095         MTF7 = cms.untracked.bool(True)
0096 )
0097 
0098 
0099 process.out = cms.OutputModule("PoolOutputModule", 
0100    outputCommands=cms.untracked.vstring(
0101        'keep *'
0102    ),
0103    fileName = cms.untracked.string("EMTF_DatToRoot_v0.root")
0104 )
0105 
0106 process.p = cms.Path(process.dump * process.unpack)
0107 process.end = cms.EndPath(process.out)