CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MessageDrop.h
Go to the documentation of this file.
1 #ifndef MessageLogger_MessageDrop_h
2 #define MessageLogger_MessageDrop_h
3 
4 // -*- C++ -*-
5 //
6 // Package: MessageLogger
7 // Class : MessageDrop
8 //
18 //
19 // Original Author: M. Fischler and Jim Kowalkowski
20 // Created: Tues Feb 14 16:38:19 CST 2006
21 //
22 
23 // Framework include files
24 
25 #include "FWCore/Utilities/interface/EDMException.h" // change log 4
27 
28 // system include files
29 
30 #include <string>
31 
32 // Change log
33 //
34 // 1 mf 5/12/06 initialize debugEnabled to true, to avoid unitialized
35 // data detection in memory checks (and to be safe in
36 // getting enabled output independant of timings)
37 //
38 // 4 mf 2/22/07 static ex_p to have a way to convey exceptions to throw
39 // (this is needed when configuring could lead to an
40 // exception, for example)
41 //
42 // 5 mf 2/22/07 jobreport_name to have a way to convey content
43 // of jobreport option from cmsRun to MessageLogger class
44 //
45 // 6 mf 6/18/07 jobMode to have a way to convey choice of hardwired
46 // MessageLogger defaults
47 //
48 // 7 mf 6/20/08 MessageLoggerScribeIsRunning to let the scribe convey
49 // that it is active.
50 //
51 // 8 cdj 2/08/10 Make debugEnabled, infoEnabled, warningEnabled statics
52 // to avoid overhead of thread specific singleton access
53 // when deciding to keep or throw away messages
54 //
55 // 9 mf 9/23/10 Support for situations where no thresholds are low
56 // enough to react to LogDebug (or info, or warning)
57 //
58 // 10 mf, crj 11/2/10 (see MessageServer/src/MessageLogger.cc change 17)
59 // Support for reducing the string operations done when
60 // moving from one module to the next.
61 //
62 // 11 mf 11/29/10 Snapshot method to preare for invalidation of the
63 // pointers used to hold module context. Supports
64 // surviving throws that cause objects to go out of scope.
65 //
66 // 12 fwyzard 7/6/11 Add support for discarding LogError-level messages
67 // on a per-module basis (needed at HLT)
68 //
69 // 13 wmtan 11/11/11 Make non-copyable to satisfy Coverity. Would otherwise
70 // need special copy ctor and copy assignment operator.
71 
72 
73 // user include files
74 
75 namespace edm {
76 
77 namespace messagedrop {
78  class StringProducer;
80  class StringProducerPath;
81  class StringProducerSinglet;
82 }
83 
84 struct MessageDrop {
85 private:
86  MessageDrop(); // change log 10:
87  // moved to cc file
88  MessageDrop( MessageDrop const& );
90 public:
91  ~MessageDrop(); // change log 10
92  static MessageDrop * instance ();
94  void setModuleWithPhase(std::string const & name,
95  std::string const & label,
96  unsigned int moduleID,
97  const char* phase);
98  void setPath(const char* type, std::string const & pathname);
99  void setSinglet(const char * sing);
100  void clear();
101 
103  unsigned int streamID;
104  bool debugEnabled; // change log 8
105  bool infoEnabled; // change log 8
106  bool warningEnabled; // change log 8
107  bool errorEnabled; // change log 8, 12
108 
109  CMS_THREAD_SAFE static std::string jobMode; // change log 6
110  CMS_THREAD_SAFE static unsigned char messageLoggerScribeIsRunning; // change log 7
111  CMS_THREAD_SAFE static bool debugAlwaysSuppressed; // change log 9
112  CMS_THREAD_SAFE static bool infoAlwaysSuppressed; // change log 9
113  CMS_THREAD_SAFE static bool warningAlwaysSuppressed; // change log 9
114 private:
119 };
120 
121 static const unsigned char MLSCRIBE_RUNNING_INDICATOR = 29; // change log 7
122 
123 } // end of namespace edm
124 
125 
126 #endif // MessageLogger_MessageDrop_h
type
Definition: HCALResponse.h:21
static unsigned char messageLoggerScribeIsRunning
Definition: MessageDrop.h:110
void setModuleWithPhase(std::string const &name, std::string const &label, unsigned int moduleID, const char *phase)
Definition: MessageDrop.cc:191
static MessageDrop * instance()
Definition: MessageDrop.cc:60
static std::string jobMode
Definition: MessageDrop.h:109
messagedrop::StringProducer const * moduleNameProducer
Definition: MessageDrop.h:118
void setSinglet(const char *sing)
Definition: MessageDrop.cc:204
static const unsigned char MLSCRIBE_RUNNING_INDICATOR
Definition: MessageDrop.h:121
static bool debugAlwaysSuppressed
Definition: MessageDrop.h:111
unsigned int streamID
Definition: MessageDrop.h:103
std::string moduleContext()
Definition: MessageDrop.cc:209
static bool warningAlwaysSuppressed
Definition: MessageDrop.h:113
messagedrop::StringProducerSinglet * spSinglet
Definition: MessageDrop.h:117
messagedrop::StringProducerWithPhase * spWithPhase
Definition: MessageDrop.h:115
void setPath(const char *type, std::string const &pathname)
Definition: MessageDrop.cc:199
std::string runEvent
Definition: MessageDrop.h:102
static bool infoAlwaysSuppressed
Definition: MessageDrop.h:112
#define CMS_THREAD_SAFE
MessageDrop & operator=(MessageDrop const &)
messagedrop::StringProducerPath * spPath
Definition: MessageDrop.h:116