Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:43

0001 #ifndef MessageLogger_MessageDrop_h
0002 #define MessageLogger_MessageDrop_h
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:     MessageLogger
0007 // Class  :     MessageDrop
0008 //
0009 /**\class MessageDrop MessageDrop.h 
0010 
0011  Description: <one line class summary>
0012 
0013  Usage:
0014     <usage>
0015 
0016 */
0017 
0018 //
0019 // Original Author:  M. Fischler and Jim Kowalkowski
0020 //         Created:  Tues Feb 14 16:38:19 CST 2006
0021 //
0022 
0023 // Framework include files
0024 
0025 #include "FWCore/Utilities/interface/EDMException.h"  // change log 4
0026 #include "FWCore/Utilities/interface/thread_safety_macros.h"
0027 #include "FWCore/Utilities/interface/propagate_const.h"
0028 
0029 // system include files
0030 
0031 #include <string>
0032 #include <string_view>
0033 
0034 // user include files
0035 
0036 namespace edm {
0037 
0038   namespace messagedrop {
0039     class StringProducer;
0040     class StringProducerWithPhase;
0041     class StringProducerPath;
0042     class StringProducerSinglet;
0043   }  // namespace messagedrop
0044 
0045   struct MessageDrop {
0046   private:
0047     MessageDrop();
0048 
0049   public:
0050     MessageDrop(MessageDrop const&) = delete;
0051     MessageDrop& operator=(MessageDrop const&) = delete;
0052 
0053     ~MessageDrop();
0054     static MessageDrop* instance();
0055     std::string moduleContext();
0056     void setModuleWithPhase(std::string const& name, std::string const& label, unsigned int moduleID, const char* phase);
0057     void setPath(const char* type, std::string const& pathname);
0058     void setSinglet(const char* sing);
0059     void clear();
0060 
0061     std::string_view runEvent;
0062     unsigned int streamID;
0063     bool debugEnabled;
0064     bool infoEnabled;
0065     bool fwkInfoEnabled;
0066     bool warningEnabled;
0067     bool errorEnabled;
0068 
0069     CMS_THREAD_SAFE static std::string jobMode;
0070     CMS_THREAD_SAFE static unsigned char messageLoggerScribeIsRunning;
0071     CMS_THREAD_SAFE static bool debugAlwaysSuppressed;
0072     CMS_THREAD_SAFE static bool infoAlwaysSuppressed;
0073     CMS_THREAD_SAFE static bool fwkInfoAlwaysSuppressed;
0074     CMS_THREAD_SAFE static bool warningAlwaysSuppressed;
0075 
0076   private:
0077     edm::propagate_const<messagedrop::StringProducerWithPhase*> spWithPhase;
0078     edm::propagate_const<messagedrop::StringProducerPath*> spPath;
0079     edm::propagate_const<messagedrop::StringProducerSinglet*> spSinglet;
0080     messagedrop::StringProducer const* moduleNameProducer;
0081   };
0082 
0083   static const unsigned char MLSCRIBE_RUNNING_INDICATOR = 29;
0084 
0085 }  // end of namespace edm
0086 
0087 #endif  // MessageLogger_MessageDrop_h