CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/FWCore/MessageLogger/interface/MessageDrop.h

Go to the documentation of this file.
00001 #ifndef MessageLogger_MessageDrop_h
00002 #define MessageLogger_MessageDrop_h
00003 
00004 // -*- C++ -*-
00005 //
00006 // Package:     MessageLogger
00007 // Class  :     MessageDrop
00008 //
00018 //
00019 // Original Author:  M. Fischler and Jim Kowalkowski
00020 //         Created:  Tues Feb 14 16:38:19 CST 2006
00021 //
00022 
00023 // Framework include files
00024 
00025 #include "FWCore/Utilities/interface/EDMException.h"    // change log 4
00026 
00027 
00028 // system include files
00029 
00030 #include <string>
00031 
00032 // Change log
00033 //
00034 //  1  mf 5/12/06       initialize debugEnabled to true, to avoid unitialized
00035 //                      data detection in memory checks (and to be safe in
00036 //                      getting enabled output independant of timings) 
00037 //
00038 //  4  mf 2/22/07       static ex_p to have a way to convey exceptions to throw
00039 //                      (this is needed when configuring could lead to an 
00040 //                      exception, for example)
00041 //
00042 //  5  mf 2/22/07       jobreport_name to have a way to convey content
00043 //                      of jobreport option from cmsRun to MessageLogger class
00044 //
00045 //  6  mf 6/18/07       jobMode to have a way to convey choice of hardwired
00046 //                      MessageLogger defaults
00047 //
00048 //  7  mf 6/20/08       MessageLoggerScribeIsRunning to let the scribe convey
00049 //                      that it is active.
00050 //
00051 //  8  cdj 2/08/10      Make debugEnabled, infoEnabled, warningEnabled statics
00052 //                      to avoid overhead of thread specific singleton access
00053 //                      when deciding to keep or throw away messages
00054 //
00055 //  9  mf 9/23/10       Support for situations where no thresholds are low
00056 //                      enough to react to LogDebug (or info, or warning)
00057 //
00058 // 10  mf, crj 11/2/10  (see MessageServer/src/MessageLogger.cc change 17)
00059 //                      Support for reducing the string operations done when
00060 //                      moving from one module to the next.
00061 //
00062 // 11  mf 11/29/10      Snapshot method to preare for invalidation of the   
00063 //                      pointers used to hold module context.  Supports 
00064 //                      surviving throws that cause objects to go out of scope.
00065 //
00066 // 12  fwyzard 7/6/11   Add support for discarding LogError-level messages
00067 //                      on a per-module basis (needed at HLT)
00068 //
00069 // 13  wmtan 11/11/11   Make non-copyable to satisfy Coverity. Would otherwise
00070 //                      need special copy ctor and copy assignment operator.
00071 
00072 
00073 // user include files
00074 
00075 namespace edm {
00076 
00077 namespace messagedrop {
00078   class StringProducer;
00079   class StringProducerWithPhase;
00080   class StringProducerPath; 
00081   class StringProducerSinglet;  
00082 }
00083 
00084 struct MessageDrop {
00085 private:
00086   MessageDrop();                                        // change log 10:
00087                                                         // moved to cc file  
00088   MessageDrop( MessageDrop const& );
00089   MessageDrop& operator=( MessageDrop const& );
00090 public:
00091   ~MessageDrop();                                       // change log 10
00092   static MessageDrop * instance ();
00093   std::string moduleName;
00094   std::string moduleContext();
00095   void setModuleWithPhase(std::string const & name,
00096                           std::string const & label,
00097                           const void * moduleID,
00098                           const char* phase);  
00099   void setPath(const char* type, std::string const & pathname);
00100   void setSinglet(const char * sing);
00101   void snapshot();
00102   std::string runEvent;
00103   std::string jobreport_name;                           // change log 5
00104   std::string jobMode;                                  // change log 6
00105   static bool debugEnabled;                             // change log 8
00106   static bool infoEnabled;                              // change log 8
00107   static bool warningEnabled;                           // change log 8
00108   static bool errorEnabled;                             // change log 8, 12
00109   static unsigned char messageLoggerScribeIsRunning;    // change log 7
00110   static edm::Exception * ex_p;                         // change log 4
00111   static bool debugAlwaysSuppressed;                    // change log 9
00112   static bool infoAlwaysSuppressed;                     // change log 9
00113   static bool warningAlwaysSuppressed;                  // change log 9
00114 private:
00115   messagedrop::StringProducerWithPhase * spWithPhase;
00116   messagedrop::StringProducerPath      * spPath;
00117   messagedrop::StringProducerSinglet   * spSinglet;
00118   messagedrop::StringProducer const    * moduleNameProducer;
00119 };
00120 
00121 static const unsigned char  MLSCRIBE_RUNNING_INDICATOR = 29; // change log 7
00122 
00123 } // end of namespace edm
00124 
00125 
00126 #endif // MessageLogger_MessageDrop_h