Using a GAMOS verbosity manager in your code

If you write some new code, for example a new generator distribution, you may use one of the GAMOS verbosity managers following the instructions below.

Each of the GAMOS verbosity managers instantiates an object of the type GmVerbosity. If you want that your code is only printed when the corresponding verbosity level is set, you have to write this verbosity with the value of the level in parenthesis. For example, if you write one new generator position distribution and you want that a message is printed when somebody chooses it in the input file, you can write a message like the following one in the constructor of your class:

G4cout << GenerVerb(infoVerb) 
      << ``MyPositionGeneratorDistribution created'' << G4endl;

This message will only be printed if the generator verbosity is set to info or a level above (debug or test).

If you want for example that your distribution prints a message with the calculated position at each event, you may write

G4cout << GenerVerb(debugVerb) 
      << ``MyPositionGeneratorDistribution position = '' 
      << position << G4endl;

This message will only be printed if the generator verbosity is set to debug or a level above (test).

As you may have deduced the rules for using each of the GAMOS verbosity managers are that the name of the verbosity is the same as the name of the verbosity manager simplified: no Gm at the beginning and Verb instead of Verbosity (e.g. from GmAnaVerbosity, you use AnaVerb). And the name of the level in C++ code is the same as the one in the input command file adding Verb (e.g. for warning, you use warningVerb).