File indexing completed on 2024-09-07 04:36:25
0001 #ifndef FWCore_MessageLogger_MessageLoggerQ_h
0002 #define FWCore_MessageLogger_MessageLoggerQ_h
0003
0004 #include "FWCore/MessageLogger/interface/ELseverityLevel.h"
0005 #include "FWCore/Utilities/interface/thread_safety_macros.h"
0006
0007 #include <memory>
0008
0009 #include <string>
0010 #include <map>
0011 #include <set>
0012
0013 namespace edm {
0014
0015
0016 class ErrorObj;
0017 class ParameterSet;
0018 class ELdestination;
0019 namespace service {
0020 class AbstractMLscribe;
0021 }
0022
0023 class MessageLoggerQ {
0024 public:
0025 MessageLoggerQ(MessageLoggerQ const&) = delete;
0026 void operator=(MessageLoggerQ const&) = delete;
0027
0028
0029 enum OpCode
0030 {
0031 END_THREAD
0032 ,
0033 LOG_A_MESSAGE
0034 ,
0035 CONFIGURE
0036 ,
0037 EXTERN_DEST
0038 ,
0039 SUMMARIZE
0040 ,
0041 JOBMODE
0042 ,
0043 SHUT_UP
0044 ,
0045 FLUSH_LOG_Q
0046 ,
0047 GROUP_STATS
0048 ,
0049 FJR_SUMMARY
0050 };
0051
0052
0053 static MessageLoggerQ* instance();
0054
0055
0056 static void MLqEND();
0057 static void MLqLOG(ErrorObj* p);
0058 static void MLqCFG(ParameterSet* p);
0059 static void MLqSUM();
0060 static void MLqMOD(std::string* jm);
0061 static void MLqSHT();
0062 static void MLqFLS();
0063 static void MLqGRP(std::string* cat_p);
0064 static void MLqJRS(std::map<std::string, double>* sum_p);
0065
0066
0067 static void setMLscribe_ptr(std::shared_ptr<edm::service::AbstractMLscribe> m);
0068
0069
0070 static bool handshaked(const OpCode& op);
0071
0072
0073 static void standAloneThreshold(edm::messagelogger::ELseverityLevel const& severity);
0074 static void squelch(std::string const& category);
0075 static bool ignore(edm::messagelogger::ELseverityLevel const& severity, std::string const& category);
0076
0077 private:
0078
0079 MessageLoggerQ();
0080 ~MessageLoggerQ();
0081
0082
0083 static void simpleCommand(OpCode opcode, void* operand);
0084 static void handshakedCommand(OpCode opcode, void* operand, std::string const& commandMnemonic);
0085
0086
0087 CMS_THREAD_SAFE static std::shared_ptr<edm::service::AbstractMLscribe> mlscribe_ptr;
0088 CMS_THREAD_SAFE static edm::messagelogger::ELseverityLevel threshold;
0089 CMS_THREAD_SAFE static std::set<std::string> squelchSet;
0090
0091 };
0092
0093 }
0094
0095 #endif