MessageDrop.h
Go to the documentation of this file.
1 #ifndef messagefacility_MessageService_MessageDrop_h
2 #define messagefacility_MessageService_MessageDrop_h
3 // vim: set sw=2 expandtab :
4 
5 #include "cetlib/exempt_ptr.h"
8 
9 #include <memory>
10 #include <string>
11 
12 namespace mf {
13 
14  struct MessageDrop {
15 
16  public: // TYPES
17  using module_id_t = unsigned int;
18 
19  private: // TYPES
21  public:
22  virtual ~StringProducer() noexcept = default;
23  virtual std::string theContext() const = 0;
24  };
25 
27  class StringProducerPath;
29 
30  public: // MEMBER FUNCTIONS -- Static API
31  static MessageDrop* instance();
32 
33  private: // MEMBER FUNCTIONS -- Special Member Functions
34  ~MessageDrop();
35 
36  MessageDrop();
37 
38  MessageDrop(MessageDrop const&) = delete;
39 
40  MessageDrop(MessageDrop&&) = delete;
41 
42  MessageDrop& operator=(MessageDrop const&) = delete;
43 
44  MessageDrop& operator=(MessageDrop&&) = delete;
45 
46  public: // MEMBER FUNCTIONS -- Public API
47  std::string moduleContext() const;
48 
50  std::string const& label,
51  module_id_t moduleID,
52  std::string const& phase);
53 
54  void setPath(std::string const& path, std::string const& phase);
55 
56  void setSinglet(std::string const& singlet);
57 
58  void clear();
59 
60  public: // MEMBER DATA -- Public!!!
61  // Group messages share a common context.
62  unsigned int messageStreamID;
63 
64  std::string iteration{"pre-events"};
65 
66  bool debugEnabled{true};
67 
68  bool infoEnabled{true};
69 
70  bool warningEnabled{true};
71 
72  public: // MEMBER DATA -- STATIC Public!!!
73  static bool debugAlwaysSuppressed;
74 
75  static bool infoAlwaysSuppressed;
76 
78 
80 
81  static unsigned char messageLoggerScribeIsRunning;
82 
83  private: // MEMBER DATA
85 
87 
89 
91  };
92 
93  static const unsigned char MLSCRIBE_RUNNING_INDICATOR = 29;
94 
95 } // namespace mf
96 
97 #endif /* messagefacility_MessageService_MessageDrop_h */
98 
99 // Local Variables:
100 // mode: c++
101 // End:
cet::propagate_const< std::unique_ptr< StringProducerWithPhase > > spWithPhase_
Definition: MessageDrop.h:84
static std::string jobMode
Definition: MessageDrop.h:79
std::string string
Definition: nybbler.cc:12
static unsigned char messageLoggerScribeIsRunning
Definition: MessageDrop.h:81
unsigned int module_id_t
Definition: MessageDrop.h:17
MessageDrop & operator=(MessageDrop const &)=delete
std::string moduleContext() const
Definition: MessageDrop.cc:175
unsigned int messageStreamID
Definition: MessageDrop.h:62
virtual std::string theContext() const =0
static bool warningAlwaysSuppressed
Definition: MessageDrop.h:77
cet::propagate_const< std::unique_ptr< StringProducerSinglet > > spSinglet_
Definition: MessageDrop.h:88
void setPath(std::string const &path, std::string const &phase)
Definition: MessageDrop.cc:161
cet::exempt_ptr< StringProducer > moduleNameProducer_
Definition: MessageDrop.h:90
static bool debugAlwaysSuppressed
Definition: MessageDrop.h:73
static bool infoAlwaysSuppressed
Definition: MessageDrop.h:75
void setModuleWithPhase(std::string const &name, std::string const &label, module_id_t moduleID, std::string const &phase)
Definition: MessageDrop.cc:151
static const unsigned char MLSCRIBE_RUNNING_INDICATOR
Definition: MessageDrop.h:93
void setSinglet(std::string const &singlet)
Definition: MessageDrop.cc:168
virtual ~StringProducer() noexcept=default
std::string iteration
Definition: MessageDrop.h:64
static MessageDrop * instance()
Definition: MessageDrop.cc:144
cet::propagate_const< std::unique_ptr< StringProducerPath > > spPath_
Definition: MessageDrop.h:86