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