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:55] decianmgaudi:outputlevel [2010/03/19 10:05] (current) nchiap
Line 19: Line 19:
 ===== Add output statements to your code ===== ===== Add output statements to your code =====
 In your C++-code, you can add these statements the following way, f.ex: In your C++-code, you can add these statements the following way, f.ex:
-<code>+<code c++> 
 +// (A) 
 +warning() << "Could not retrieve tracks. Skipping" << endmsg; 
 + 
 +// (B)
 if ( msgLevel(MSG::WARNING) ) warning() << "Could not retrieve tracks. Skipping" << endmsg; if ( msgLevel(MSG::WARNING) ) warning() << "Could not retrieve tracks. Skipping" << endmsg;
 </code> </code>
 All the other messages are printed by replacing "warning" with the appropriate level. 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 ===== ===== Change the output level in the options file =====
gaudi/outputlevel.1248522940.txt.gz · Last modified: 2009/07/25 13:55 by decianm