Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
0002 <BODY bgcolor="FFFFFF">
0003 <title>
0004           CMS MessageLogger: Establishing a Destination to the cout Stream
0005 </title>
0006 
0007 <center>
0008 <h1> <img src="header-public.gif" align="center"> </h1>
0009 
0010 <font color=red>
0011 <h1>CMS MessageLogger Service
0012 <br> 
0013 Establishing a Destination to the <em>cout</em> Stream</h1>
0014 </font>
0015 </center>
0016 
0017 
0018 <pre>
0019 process TEST = {
0020 
0021   service = MessageLogger {
0022     vstring destinations = {   "detailedInfo.txt"
0023                       , "critical.txt"
0024                       , <font color=red>"cout"</font>
0025                       , "cerr"
0026                                              }
0027     PSet critical.txt     = { string threshold = "ERROR"   }
0028     PSet detailedInfo.txt = { string threshold = "INFO"    } 
0029     PSet cerr             = { string threshold = "WARNING" }
0030   }
0031   untracked PSet maxEvents = {untracked int32 input = 5}
0032   path p = { myAnalysisModule }
0033   module myAnalysisModule = ModuleThatIssuesMessages { }
0034   source = EmptySource { }
0035 }
0036 </pre>
0037 
0038 
0039 The <font color=red>{ ..., "cout", ... }</font> 
0040 in the list of destinations refers to message information streamed to 
0041 <em>std::cout</em> rather than to a file named cout.  In this configuration
0042 file, no threshold is set for cout; the destination writing to cout will react
0043 to every message.  Also, this configuration file establishes destinations to 
0044 cout and cerr for illustration purposes, but in practice it would be confusing
0045 to send to both, since unless one or the other of the streams is
0046 re-directed, the output would appear entangled.
0047 <p>
0048 The MessageLogger service provides no way to create a destination writing to
0049 an ordinary file named cout or cerr.
0050 
0051 <p><center>
0052 <img src="bar.gif"></center>
0053 
0054 <p><center>
0055 <a href="http://www.uscms.org/SoftwareComputing/index.html">
0056 USCMS Software and Computing Home Page </a> - 
0057 <a href="MessageLogger.html"> CMS MessageLogger Service Page </a> -
0058 <a href="parameters.html#example"> Configuration File </a>
0059 </center>
0060 
0061 <p>
0062       <hr>
0063       <address><a href="mailto:mf@fnal.gov">Mark Fischler</a></address>
0064 <!-- hhmts start -->
0065 Last modified: November 29, 2005
0066 <!-- hhmts end -->
0067 </body>
0068 
0069