|
||||
File indexing completed on 2025-01-30 09:17:43
0001 //========================================================================== 0002 // AIDA Detector description implementation 0003 //-------------------------------------------------------------------------- 0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) 0005 // All rights reserved. 0006 // 0007 // For the licensing terms see $DD4hepINSTALL/LICENSE. 0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS. 0009 // 0010 // Author : M.Frank 0011 // 0012 //========================================================================== 0013 #ifndef ETC_EXTERNALIZE_PRINTOUT_H 0014 #define ETC_EXTERNALIZE_PRINTOUT_H 0015 0016 // C/C++ include files 0017 #include <cstdarg> 0018 #include <string> 0019 0020 /// Namespace for the AIDA detector description toolkit 0021 namespace dd4hep { 0022 enum PrintLevel { 0023 NOLOG = 0, 0024 VERBOSE = 1, 0025 DEBUG = 2, 0026 INFO = 3, 0027 WARNING = 4, 0028 ERROR = 5, 0029 FATAL = 6, 0030 ALWAYS = 7 0031 }; 0032 /// Access the current printer level 0033 PrintLevel printLevel(); 0034 0035 /// Set new print level. Returns the old print level 0036 PrintLevel setPrintLevel(PrintLevel new_level); 0037 0038 /// Calls the display action with a given severity level 0039 /** 0040 * @arg severity [int,read-only] Display severity flag (see enum) 0041 * @arg src [string,read-only] Information source (component, etc.) 0042 * @arg fmt [string,read-only] Format string for ellipsis args 0043 * @return Status code indicating success or failure 0044 */ 0045 int printout(PrintLevel severity, const char* src, const char* fmt, ...); 0046 0047 /// Calls the display action with a given severity level 0048 /** 0049 * @arg severity [int,read-only] Display severity flag (see enum) 0050 * @arg src [string,read-only] Information source (component, etc.) 0051 * @arg fmt [string,read-only] Format string for ellipsis args 0052 * @return Status code indicating success or failure 0053 */ 0054 int printout(PrintLevel severity, const std::string& src, const char* fmt, ...); 0055 /// Calls the display action with ERROR and throws an std::runtime_error exception 0056 /** 0057 * @arg src [string,read-only] Information source (component, etc.) 0058 * @arg fmt [string,read-only] Format string for ellipsis args 0059 * @return Status code indicating success or failure 0060 */ 0061 int except(const char* src, const char* fmt, ...); 0062 } 0063 0064 #endif // ETC_EXTERNALIZE_PRINTOUT_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |