Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-01-30 06:07:45

0001 import FWCore.ParameterSet.Config as cms
0002 import argparse
0003 import sys
0004 
0005 parser = argparse.ArgumentParser(prog=sys.argv[0], description='Test GlobalObjectMapRecord')
0006 
0007 parser.add_argument('--outputFileName', type=str, help='Output file name (default: testGlobalObjectMapRecord.root)', default='testGlobalObjectMapRecord.root')
0008 parser.add_argument('--splitLevel', type=int, help='Split level of ROOT branches in EDM output file (default: 99)', default=99)
0009 args = parser.parse_args()
0010 
0011 process = cms.Process("PROD")
0012 
0013 process.load("FWCore.MessageService.MessageLogger_cfi")
0014 
0015 process.source = cms.Source("EmptySource")
0016 process.maxEvents.input = 1
0017 
0018 process.globalObjectMapRecordProducer = cms.EDProducer("TestWriteGlobalObjectMapRecord",
0019     # Test values below are meaningless. We just make sure when we read
0020     # we get the same values.
0021     nGlobalObjectMaps = cms.uint32(2),
0022     algoNames = cms.vstring('muonAlgo', 'electronAlgo'),
0023     algoBitNumbers = cms.vint32(11, 21),
0024     algoResults = cms.vint32(1, 0),
0025     tokenNames0     = cms.vstring('testnameA', 'testNameB'),
0026     tokenNumbers0 = cms.vint32(101, 102),
0027     tokenResults0 = cms.vint32(1, 0),
0028     tokenNames3 = cms.vstring('testNameC', 'testNameD'),
0029     tokenNumbers3 = cms.vint32(1001, 1002),
0030     tokenResults3 = cms.vint32(0, 1),
0031     nElements1 = cms.uint32(3),
0032     nElements2 = cms.uint32(4),
0033     nElements3 = cms.uint32(5),
0034     firstElement = cms.int32(11),
0035     elementDelta = cms.int32(3),
0036     bxIndexModulus = cms.uint32(3),
0037 )
0038 
0039 process.out = cms.OutputModule("PoolOutputModule",
0040     fileName = cms.untracked.string(f'{args.outputFileName}'),
0041     splitLevel = cms.untracked.int32(args.splitLevel)
0042 )
0043 
0044 process.path = cms.Path(process.globalObjectMapRecordProducer)
0045 process.endPath = cms.EndPath(process.out)