CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/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 // $Id: MessageDrop.h,v 1.15 2010/11/30 23:12:52 fischler Exp $
00022 //
00023 
00024 // Framework include files
00025 
00026 #include "FWCore/Utilities/interface/EDMException.h"    // change log 4
00027 
00028 
00029 // system include files
00030 
00031 #include <string>
00032 
00033 // Change log
00034 //
00035 //  1  mf 5/12/06       initialize debugEnabled to true, to avoid unitialized
00036 //                      data detection in memory checks (and to be safe in
00037 //                      getting enabled output independant of timings) 
00038 //
00039 //  4  mf 2/22/07       static ex_p to have a way to convey exceptions to throw
00040 //                      (this is needed when configuring could lead to an 
00041 //                      exception, for example)
00042 //
00043 //  5  mf 2/22/07       jobreport_name to have a way to convey content
00044 //                      of jobreport option from cmsRun to MessageLogger class
00045 //
00046 //  6  mf 6/18/07       jobMode to have a way to convey choice of hardwired
00047 //                      MessageLogger defaults
00048 //
00049 //  7  mf 6/20/08       MessageLoggerScribeIsRunning to let the scribe convey
00050 //                      that it is active.
00051 //
00052 //  8  cdj 2/08/10      Make debugEnabled, infoEnabled, warningEnabled statics
00053 //                      to avoid overhead of thread specific singleton access
00054 //                      when deciding to keep or throw away messages
00055 //
00056 //  9  mf 9/23/10       Support for situations where no thresholds are low
00057 //                      enough to react to LogDebug (or info, or warning)
00058 //
00059 // 10  mf, crj 11/2/10  (see MessageServer/src/MessageLogger.cc change 17)
00060 //                      Support for reducing the string operations done when
00061 //                      moving from one module to the next.
00062 //
00063 // 11  mf 11/29/10      Snapshot method to preare for invalidation of the   
00064 //                      pointers used to hold module context.  Supports 
00065 //                      surviving throws that cause objects to go out of scope.
00066 
00067 // user include files
00068 
00069 namespace edm {
00070 
00071 namespace messagedrop {
00072   class StringProducer;
00073   class StringProducerWithPhase;
00074   class StringProducerPath; 
00075   class StringProducerSinglet;  
00076 }
00077 
00078 struct MessageDrop {
00079 private:
00080   MessageDrop();                                        // change log 10:
00081                                                         // moved to cc file  
00082 public:
00083   ~MessageDrop();                                       // change log 10
00084   static MessageDrop * instance ();
00085   std::string moduleName;
00086   std::string moduleContext();
00087   void setModuleWithPhase(std::string const & name,
00088                           std::string const & label,
00089                           const void * moduleID,
00090                           const char* phase);  
00091   void setPath(const char* type, std::string const & pathname);
00092   void setSinglet(const char * sing);
00093   void snapshot();
00094   std::string runEvent;
00095   std::string jobreport_name;                           // change log 5
00096   std::string jobMode;                                  // change log 6
00097   static bool debugEnabled;                             // change log 8
00098   static bool infoEnabled;                              // change log 8
00099   static bool warningEnabled;                           // change log 8
00100   static unsigned char messageLoggerScribeIsRunning;    // change log 7
00101   static edm::Exception * ex_p;                         // change log 4
00102   static bool debugAlwaysSuppressed;                    // change log 9
00103   static bool infoAlwaysSuppressed;                     // change log 9
00104   static bool warningAlwaysSuppressed;                  // change log 9
00105 private:
00106   messagedrop::StringProducerWithPhase * spWithPhase;
00107   messagedrop::StringProducerPath      * spPath;
00108   messagedrop::StringProducerSinglet   * spSinglet;
00109   messagedrop::StringProducer const    * moduleNameProducer;
00110 };
00111 
00112 static const unsigned char  MLSCRIBE_RUNNING_INDICATOR = 29; // change log 7
00113 
00114 } // end of namespace edm
00115 
00116 
00117 #endif // MessageLogger_MessageDrop_h