HepMC3 event record library
Namespaces
Errors.h File Reference

Detailed Description

Implementation of error and HEPMC3_HEPMC3_WARNING macros.

Definition in file Errors.h.

#include <iostream>
#include <stdexcept>
#include <HepMC3/Setup.h>
+ Include dependency graph for Errors.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  HepMC3
 HepMC3 main namespace.
 

Macros

Printing macros
#define HEPMC3_ERROR(MESSAGE)   if ( Setup::print_errors() ) { std::cerr << "ERROR::" << MESSAGE << std::endl; }
 Macro for printing error messages.
 
#define HEPMC3_WARNING(MESSAGE)   if ( Setup::print_warnings() ) { std::cout << "WARNING::" << MESSAGE << std::endl; }
 Macro for printing HEPMC3_HEPMC3_WARNING messages.
 
#define HEPMC3_DEBUG(LEVEL, MESSAGE)   if ( Setup::debug_level()>=(LEVEL) ) { std::cout << "DEBUG(" << LEVEL <<")::" << MESSAGE << std::endl; }
 Macro for printing debug messages with appropriate debug level.
 
#define HEPMC3_DEBUG_CODE_BLOCK(x)   x
 Macro for storing code useful for debugging.
 

Macro Definition Documentation

◆ HEPMC3_DEBUG

#define HEPMC3_DEBUG (   LEVEL,
  MESSAGE 
)    if ( Setup::debug_level()>=(LEVEL) ) { std::cout << "DEBUG(" << LEVEL <<")::" << MESSAGE << std::endl; }

Macro for printing debug messages with appropriate debug level.

Definition at line 33 of file Errors.h.

◆ HEPMC3_DEBUG_CODE_BLOCK

#define HEPMC3_DEBUG_CODE_BLOCK (   x)    x

Macro for storing code useful for debugging.

Definition at line 35 of file Errors.h.

◆ HEPMC3_ERROR

#define HEPMC3_ERROR (   MESSAGE)    if ( Setup::print_errors() ) { std::cerr << "ERROR::" << MESSAGE << std::endl; }

Macro for printing error messages.

Definition at line 24 of file Errors.h.

◆ HEPMC3_WARNING

#define HEPMC3_WARNING (   MESSAGE)    if ( Setup::print_warnings() ) { std::cout << "WARNING::" << MESSAGE << std::endl; }

Macro for printing HEPMC3_HEPMC3_WARNING messages.

Definition at line 27 of file Errors.h.