User Tools

Site Tools


gaudi:outputlevel

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
gaudi:outputlevel [2009/07/25 13:51] decianmgaudi:outputlevel [2010/03/19 10:05] (current) nchiap
Line 16: Line 16:
   * ALWAYS (7)   * ALWAYS (7)
   * NUM_LEVELS (8)   * NUM_LEVELS (8)
 +
 +===== Add output statements to your code =====
 +In your C++-code, you can add these statements the following way, f.ex:
 +<code c++>
 +// (A)
 +warning() << "Could not retrieve tracks. Skipping" << endmsg;
 +
 +// (B)
 +if ( msgLevel(MSG::WARNING) ) warning() << "Could not retrieve tracks. Skipping" << endmsg;
 +</code>
 +All the other messages are printed by replacing "warning" with the appropriate level.
 +
 +Version (B) runs faster when the message level set will not display this message. Therefore version (B) should be used for low-level messages (Debug, Info, Warning) while version (A) is better for Error or Fatal messages.
 +
 +
 +
 +
 +===== Change the output level in the options file =====
 +In the options file, you can change the output level for a given class by setting:
 +<code>
 +myClass.OutputLevel = 4
 +</code>
 +for example for a tool:
 +<code>
 +Tuple.TupleToolEventInfo.OutputLevel = 4
 +</code>
 +
gaudi/outputlevel.1248522683.txt.gz · Last modified: by decianm