File indexing completed on 2025-01-18 10:01:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef HEPMC3_ERRORS_H
0012 #define HEPMC3_ERRORS_H
0013
0014 #include <iostream>
0015 #include <stdexcept>
0016 #include <HepMC3/Setup.h>
0017 namespace HepMC3 {
0018
0019
0020
0021
0022
0023
0024 #define HEPMC3_ERROR(MESSAGE) if ( Setup::print_errors() ) { std::cerr << "ERROR::" << MESSAGE << std::endl; }
0025
0026
0027 #define HEPMC3_ERROR_LEVEL(LEVEL,MESSAGE) if ( Setup::errors_level()>=(LEVEL) && Setup::print_errors() ) { std::cerr << "ERROR::" << MESSAGE << std::endl; }
0028
0029
0030
0031 #define HEPMC3_WARNING(MESSAGE) if ( Setup::print_warnings() ) { std::cout << "WARNING::" << MESSAGE << std::endl; }
0032
0033
0034 #define HEPMC3_WARNING_LEVEL(LEVEL,MESSAGE) if ( Setup::warnings_level()>=(LEVEL) && Setup::print_warnings() ) { std::cout << "WARNING::" << MESSAGE << std::endl; }
0035
0036
0037
0038 #ifndef HEPMC3_RELEASE_VERSION
0039
0040
0041 #define HEPMC3_DEBUG(LEVEL,MESSAGE) if ( Setup::debug_level()>=(LEVEL) ) { std::cout << "DEBUG(" << LEVEL <<")::" << MESSAGE << std::endl; }
0042
0043 #define HEPMC3_DEBUG_CODE_BLOCK( x ) x
0044
0045 #else
0046
0047 #define HEPMC3_DEBUG( x,y )
0048 #define HEPMC3_DEBUG_CODE_BLOCK( x )
0049
0050 #endif
0051
0052
0053
0054 }
0055
0056 #endif