CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_6/src/FWCore/MessageService/interface/ELtsErrorLog.h

Go to the documentation of this file.
00001 #ifndef FWCore_MessageService_ELtsErrorLog_h
00002 #define FWCore_MessageService_ELtsErrorLog_h
00003 
00004 
00005 // ----------------------------------------------------------------------
00006 //
00007 // ELtsErrorLog is an implementation class for private derivation by
00008 //              ThreadSafeErrorLog.
00009 //
00010 // 5/31/00 mf   Created file.
00011 //
00012 // ----------------------------------------------------------------------
00013 
00014 #include "FWCore/MessageService/interface/ErrorLog.h"
00015 
00016 #include "FWCore/MessageLogger/interface/ErrorObj.h"
00017 
00018 namespace edm {
00019 namespace service {
00020 
00021 // ----------------------------------------------------------------------
00022 // ELtsErrorLog:
00023 // ----------------------------------------------------------------------
00024 
00025 class ELadministrator;
00026 
00027 class ELtsErrorLog  {
00028 
00029 public:
00030 
00031 // ----------------------------------------------------------------------
00032 // Birth and Death:
00033 // ----------------------------------------------------------------------
00034 
00035   ELtsErrorLog();
00036   ELtsErrorLog( const ELstring & pkgName );
00037   ELtsErrorLog( const ErrorLog & ee );
00038   ELtsErrorLog( const ELtsErrorLog & ee);
00039 
00040   void swap( ELtsErrorLog& );
00041   ELtsErrorLog& operator=( const ELtsErrorLog& );
00042 protected:
00043   virtual ~ELtsErrorLog();
00044 
00045 // ----------------------------------------------------------------------
00046 // Setup for preamble parts
00047 // ----------------------------------------------------------------------
00048 
00049   void setSubroutine( const ELstring & subName );
00050   void setModule( const ELstring & modName );
00051   void setPackage( const ELstring & pkgName );
00052   void setProcess( const ELstring & procName );
00053 
00054 // ----------------------------------------------------------------------
00055 // Setup for advanced control
00056 // ----------------------------------------------------------------------
00057 
00058   int setHexTrigger (int trigger);
00059   ELseverityLevel setDiscardThreshold (ELseverityLevel sev);
00060   void            setDebugVerbosity   (int debugVerbosity);
00061   void            setDebugMessages    (ELseverityLevel sev, ELstring id);
00062 
00063 // ----------------------------------------------------------------------
00064 // recovery of an ELdestControl handle
00065 // ----------------------------------------------------------------------
00066 
00067   bool getELdestControl (const ELstring & name,
00068                                ELdestControl & theDestControl) const;
00069 
00070 // ----------------------------------------------------------------------
00071 // Message Initiation
00072 // ----------------------------------------------------------------------
00073 
00074 void initiateMsg (const ELseverityLevel& sev, const ELstring& id);
00075 void initiateMsg (int debugLevel);
00076 
00077 // ----------------------------------------------------------------------
00078 // Message Continuation:
00079 // ----------------------------------------------------------------------
00080 
00081 public:
00082   void item ( int n );
00083   void item ( unsigned int n );
00084   void item ( long n );
00085   void item ( unsigned long n );
00086   void item ( short n );
00087   void item ( unsigned short n );
00088   void item ( const ELstring & s );
00089 
00090 // ----------------------------------------------------------------------
00091 // Message Completion:
00092 // ----------------------------------------------------------------------
00093 
00094 protected:
00095   bool pokeMsg ( edm::ErrorObj & msg );
00096   void dispatch ( edm::ErrorObj & msg );
00097 
00098   // -----  member data:
00099   //
00100 protected:
00101   ELadministrator  *    a;
00102   ErrorLog              e;
00103   ELstring              process;
00104   bool                  msgIsActive;
00105   edm::ErrorObj         msg;
00106 
00107 };  // ELtsErrorLog
00108 
00109 
00110 // ----------------------------------------------------------------------
00111 // Message Continuation:
00112 //  Global methods for physicists logging errors:
00113 //   Basic streaming for non-integer types:
00114 // ----------------------------------------------------------------------
00115 
00116 template <class T>
00117 inline void ELtsItem ( ELtsErrorLog & e, const T & t );
00118 
00119 // ----------------------------------------------------------------------
00120 // Message Continuation:
00121 //   streaming for char []
00122 // ----------------------------------------------------------------------
00123 
00124 inline void ELtsItem ( ELtsErrorLog & e, const char s[] );
00125 
00126 // ----------------------------------------------------------------------
00127 // Message Continuation:
00128 //   special streaming for integer types
00129 // ----------------------------------------------------------------------
00130 
00131 inline void ELtsItem ( ELtsErrorLog & e, int n );
00132 inline void ELtsItem ( ELtsErrorLog & e, unsigned int n );
00133 inline void ELtsItem ( ELtsErrorLog & e, long n );
00134 inline void ELtsItem ( ELtsErrorLog & e, unsigned long n );
00135 inline void ELtsItem ( ELtsErrorLog & e, short n );
00136 inline void ELtsItem ( ELtsErrorLog & e, unsigned short n );
00137 
00138 inline
00139 void swap(ELtsErrorLog& a, ELtsErrorLog& b) {
00140   a.swap(b);
00141 }
00142 
00143 }        // end of namespace service
00144 }        // end of namespace edm
00145 
00146 #define ELTSERRORLOG_ICC
00147 #include "FWCore/MessageService/interface/ELtsErrorLog.icc"
00148 
00149 #endif  // ELTSERRORLOG_H