Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:46

0001 # Test of a feature of PSet validation:
0002 #   The vstring debugModules and suppressDebug
0003 
0004 import FWCore.ParameterSet.Config as cms
0005 
0006 process = cms.Process("TEST")
0007 
0008 import FWCore.Framework.test.cmsExceptionsFatal_cff
0009 process.options = FWCore.Framework.test.cmsExceptionsFatal_cff.options
0010 
0011 process.load("FWCore.MessageService.test.Services_cff")
0012 
0013 process.MessageLogger = cms.Service("MessageLogger",
0014 
0015     destinations = cms.untracked.vstring( 'u1_warnings',  'u1_errors',
0016                    'u1_infos',  'u1_debugs', 'u1_default', 'u1_x'), 
0017     categories = cms.untracked.vstring('preEventProcessing','FwkTest',
0018                                        'cat_A','cat_B'),
0019         
0020 #enable one of the following -- the first THREE should pass, the rest fail
0021 
0022    debugModules = cms.untracked.vstring('*'),
0023 #   debugModules = cms.untracked.vstring('A', 'B'),
0024 #   debugModules = cms.untracked.vstring('*'),suppressDebug = cms.untracked.vstring('A'),
0025 
0026 #   debugModules = cms.untracked.vstring('*'),suppressDebug = cms.untracked.vstring('*'),
0027 #   suppressDebug = cms.untracked.vstring('A'),
0028 #   debugModules = cms.untracked.vstring('A','B'),suppressDebug = cms.untracked.vstring('A'),
0029 #   debugModules = cms.vstring('A'),
0030 #   debugModules = cms.untracked.int32(2),
0031    
0032     u1_infos = cms.untracked.PSet(
0033         threshold = cms.untracked.string('INFO'),
0034         noTimeStamps = cms.untracked.bool(True),
0035         FwkTest = cms.untracked.PSet(
0036             limit = cms.untracked.int32(0)
0037         ),
0038         preEventProcessing = cms.untracked.PSet(
0039             limit = cms.untracked.int32(0)
0040         )
0041     ),
0042     u1_warnings = cms.untracked.PSet(
0043         threshold = cms.untracked.string('WARNING'),
0044         noTimeStamps = cms.untracked.bool(True),
0045         enableStatistics = cms.untracked.bool(True)
0046     ),
0047     u1_debugs = cms.untracked.PSet(
0048         threshold = cms.untracked.string('DEBUG'),
0049         noTimeStamps = cms.untracked.bool(True),
0050         FwkTest = cms.untracked.PSet(
0051             limit = cms.untracked.int32(0)
0052         ),
0053         preEventProcessing = cms.untracked.PSet(
0054             limit = cms.untracked.int32(0)
0055         )
0056     ),
0057     u1_default = cms.untracked.PSet(
0058         noTimeStamps = cms.untracked.bool(True),
0059         enableStatistics = cms.untracked.bool(True)
0060         FwkTest = cms.untracked.PSet(
0061             limit = cms.untracked.int32(0)
0062         ),
0063         preEventProcessing = cms.untracked.PSet(
0064             limit = cms.untracked.int32(0)
0065         )
0066     ),
0067     u1_errors = cms.untracked.PSet(
0068         threshold = cms.untracked.string('ERROR'),
0069         noTimeStamps = cms.untracked.bool(True)
0070     ),
0071 )
0072 
0073 process.maxEvents = cms.untracked.PSet(
0074     input = cms.untracked.int32(2)
0075 )
0076 
0077 process.source = cms.Source("EmptySource")
0078 
0079 process.sendSomeMessages = cms.EDAnalyzer("UnitTestClient_A")
0080 
0081 process.p = cms.Path(process.sendSomeMessages)