Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 # simplestMLexample -- an example Configuration file for MessageLogger service:
0002 
0003 # This example sets up logging to a file, delivering all messages created by
0004 # LogInfo, LogVerbatim,
0005 # LogWarning, LogPrint,
0006 # LogError, LogProblem, LogImportant
0007 # LogSystem, and LogAbsolute
0008 # but not messages created by LogDebug or LogTrace.
0009 #
0010 # cmsRun simplestMLexample_cfg.py produces simplestML.log.
0011 
0012 import FWCore.ParameterSet.Config as cms
0013 
0014 process = cms.Process("TEST")
0015 
0016 import FWCore.Framework.test.cmsExceptionsFatal_cff
0017 process.options = FWCore.Framework.test.cmsExceptionsFatal_cff.options
0018 
0019 process.load("FWCore.MessageService.test.Services_cff")
0020 
0021 # Here is the configuration of the MessgeLogger Service:
0022 
0023 process.MessageLogger = cms.Service("MessageLogger",
0024     cerr = cms.untracked.PSet(
0025         enable = cms.untracked.bool(False)
0026     ),
0027     files = cms.untracked.PSet(
0028         simplestML = cms.untracked.PSet(
0029             threshold = cms.untracked.string('INFO')
0030         )
0031     )
0032 )
0033 
0034 process.maxEvents = cms.untracked.PSet(
0035     input = cms.untracked.int32(3)
0036 )
0037 
0038 process.source = cms.Source("EmptySource")
0039 
0040 process.sendSomeMessages = cms.EDAnalyzer("MLexampleModule_1")
0041 
0042 process.p = cms.Path(process.sendSomeMessages)