Updated about 11 years ago by Knödlseder Jürgen

Printing

Introduction

Every GammaLib class should implement a print() method so that information about the object can be obtained by the user. The print() method will return a string that can be dumped on a terminal or into a log file. The print() method will taken an integer argument that specified the chattiness of information that should be put into the string. The following chatter level are defined: The chattiness is implemented using the GChatter type, which is an enumeration that can take the following values:

Guidelines

Here some guidelines for the implementation of each chatter level.

SILENT

At this level the print() method should in general return an empty string, unless that some error information is to be printed.

TERSE

At this level, the print() method should only provide a couple of lines. In particular, the content of a class (i.e. observations, events, photons, ...) should not be displayed.

NORMAL

This is the normal information level. The print() method should provide all information relevant that is relevant for a gamma-ray analysis. For example, the observation container will display summary information for each observation.

EXPLICIT

At this level, the print() method should provide also information about the detailed content of an object. For example, the GPhotons class will print all photons it contains.

VERBOSE

At this level, the print() method should also display information that is useful for debugging, such as internal cache states, etc.