CMS 3D CMS Logo

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 // user include files
74 
75 namespace edm {
76 
77  namespace messagedrop {
78  class StringProducer;
80  class StringProducerPath;
82  } // namespace messagedrop
83 
84  struct MessageDrop {
85  private:
86  MessageDrop(); // change log 10:
87  // moved to cc file
88  MessageDrop(MessageDrop const&) = delete;
89  MessageDrop& operator=(MessageDrop const&) = delete;
90 
91  public:
92  ~MessageDrop(); // change log 10
93  static MessageDrop* instance();
94  std::string moduleContext();
95  void setModuleWithPhase(std::string const& name, std::string const& label, unsigned int moduleID, const char* phase);
96  void setPath(const char* type, std::string const& pathname);
97  void setSinglet(const char* sing);
98  void clear();
99 
101  unsigned int streamID;
102  bool debugEnabled; // change log 8
103  bool infoEnabled; // change log 8
104  bool warningEnabled; // change log 8
105  bool errorEnabled; // change log 8, 12
106 
107  CMS_THREAD_SAFE static std::string jobMode; // change log 6
108  CMS_THREAD_SAFE static unsigned char messageLoggerScribeIsRunning; // change log 7
109  CMS_THREAD_SAFE static bool debugAlwaysSuppressed; // change log 9
110  CMS_THREAD_SAFE static bool infoAlwaysSuppressed; // change log 9
111  CMS_THREAD_SAFE static bool warningAlwaysSuppressed; // change log 9
112  private:
117  };
118 
119  static const unsigned char MLSCRIBE_RUNNING_INDICATOR = 29; // change log 7
120 
121 } // end of namespace edm
122 
123 #endif // MessageLogger_MessageDrop_h
type
Definition: HCALResponse.h:21
static unsigned char messageLoggerScribeIsRunning
Definition: MessageDrop.h:108
static PFTauRenderPlugin instance
static std::string jobMode
Definition: MessageDrop.h:107
messagedrop::StringProducer const * moduleNameProducer
Definition: MessageDrop.h:116
static const unsigned char MLSCRIBE_RUNNING_INDICATOR
Definition: MessageDrop.h:119
static bool debugAlwaysSuppressed
Definition: MessageDrop.h:109
char const * label
edm::propagate_const< messagedrop::StringProducerWithPhase * > spWithPhase
Definition: MessageDrop.h:113
edm::propagate_const< messagedrop::StringProducerSinglet * > spSinglet
Definition: MessageDrop.h:115
unsigned int streamID
Definition: MessageDrop.h:101
void clear(CLHEP::HepGenMatrix &m)
Helper function: Reset all elements of a matrix to 0.
Definition: matutil.cc:167
#define CMS_THREAD_SAFE
static bool warningAlwaysSuppressed
Definition: MessageDrop.h:111
edm::propagate_const< messagedrop::StringProducerPath * > spPath
Definition: MessageDrop.h:114
HLT enums.
std::string runEvent
Definition: MessageDrop.h:100
static bool infoAlwaysSuppressed
Definition: MessageDrop.h:110
void setPath(TString &v)
Definition: fwPaths.cc:15