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
26 
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 ();
93  std::string moduleName;
94  std::string moduleContext();
95  void setModuleWithPhase(std::string const & name,
96  std::string const & label,
97  const void * moduleID,
98  const char* phase);
99  void setPath(const char* type, std::string const & pathname);
100  void setSinglet(const char * sing);
101  void snapshot();
102  std::string runEvent;
103  std::string jobreport_name; // change log 5
104  std::string jobMode; // change log 6
105  static bool debugEnabled; // change log 8
106  static bool infoEnabled; // change log 8
107  static bool warningEnabled; // change log 8
108  static bool errorEnabled; // change log 8, 12
109  static unsigned char messageLoggerScribeIsRunning; // change log 7
110  static edm::Exception * ex_p; // change log 4
111  static bool debugAlwaysSuppressed; // change log 9
112  static bool infoAlwaysSuppressed; // change log 9
113  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:22
static unsigned char messageLoggerScribeIsRunning
Definition: MessageDrop.h:109
std::string jobreport_name
Definition: MessageDrop.h:103
static bool warningEnabled
Definition: MessageDrop.h:107
void setModuleWithPhase(std::string const &name, std::string const &label, const void *moduleID, const char *phase)
Definition: MessageDrop.cc:243
static edm::Exception * ex_p
Definition: MessageDrop.h:110
static MessageDrop * instance()
Definition: MessageDrop.cc:65
static bool debugEnabled
Definition: MessageDrop.h:105
messagedrop::StringProducer const * moduleNameProducer
Definition: MessageDrop.h:118
void setSinglet(const char *sing)
Definition: MessageDrop.cc:256
static const unsigned char MLSCRIBE_RUNNING_INDICATOR
Definition: MessageDrop.h:121
static bool debugAlwaysSuppressed
Definition: MessageDrop.h:111
std::string moduleName
Definition: MessageDrop.h:93
static bool infoEnabled
Definition: MessageDrop.h:106
std::string jobMode
Definition: MessageDrop.h:104
std::string moduleContext()
Definition: MessageDrop.cc:261
static bool warningAlwaysSuppressed
Definition: MessageDrop.h:113
messagedrop::StringProducerSinglet * spSinglet
Definition: MessageDrop.h:117
static bool errorEnabled
Definition: MessageDrop.h:108
messagedrop::StringProducerWithPhase * spWithPhase
Definition: MessageDrop.h:115
void setPath(const char *type, std::string const &pathname)
Definition: MessageDrop.cc:251
std::string runEvent
Definition: MessageDrop.h:102
static bool infoAlwaysSuppressed
Definition: MessageDrop.h:112
MessageDrop & operator=(MessageDrop const &)
messagedrop::StringProducerPath * spPath
Definition: MessageDrop.h:116