This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| gaudi:outputlevel [2009/01/28 12:16] – created nchiap | gaudi:outputlevel [2010/03/19 10:05] (current) – nchiap | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | === Output Levels === | + | ====== Output Levels |
| - | Any message with the given level or higher will be printed. | + | ===== Idea ===== |
| + | In the Gaudi-framework, | ||
| - | == Normal Output Levels == | + | ===== Normal Output Levels |
| * DEBUG (2) | * DEBUG (2) | ||
| * INFO (3) | * INFO (3) | ||
| Line 8: | Line 9: | ||
| * ERROR (5) | * ERROR (5) | ||
| * FATAL (6) | * FATAL (6) | ||
| - | == Additional == | + | |
| - | additionally | + | ===== Additional |
| + | Additionally | ||
| * NIL (0) | * NIL (0) | ||
| * VERBOSE (1) | * VERBOSE (1) | ||
| * 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" | ||
| + | |||
| + | // (B) | ||
| + | if ( msgLevel(MSG:: | ||
| + | </ | ||
| + | All the other messages are printed by replacing " | ||
| + | |||
| + | 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: | ||
| + | < | ||
| + | myClass.OutputLevel = 4 | ||
| + | </ | ||
| + | for example for a tool: | ||
| + | < | ||
| + | Tuple.TupleToolEventInfo.OutputLevel = 4 | ||
| + | </ | ||
| + | |||