CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/FWCore/MessageService/interface/MainThreadMLscribe.h

Go to the documentation of this file.
00001 #ifndef FWCore_MessageService_MainThreadMLscribe_h
00002 #define FWCore_MessageService_MainThreadMLscribe_h
00003 
00004 #include "FWCore/MessageLogger/interface/AbstractMLscribe.h"
00005 #include "FWCore/MessageLogger/interface/MessageLoggerQ.h"
00006 
00007 // I believe the below are not needed:
00008 
00009 #include "boost/shared_ptr.hpp"
00010 
00011 #include <iosfwd>
00012 #include <vector>
00013 #include <map>
00014 
00015 #include <iostream>
00016 
00017 namespace edm {
00018 namespace service {       
00019 
00020 // ----------------------------------------------------------------------
00021 //
00022 // MainThreadMLscribe.h
00023 //
00024 // This class is a concrete of AbstractMessageLoggerScribe
00025 // Its purpose exists ONLY if there is a second thread running the workhorse
00026 // scrribe.  In that case, the workhorse will be consuming from a
00027 // SingleConsumerQ, and this class is the one that places the item on said 
00028 // queue.  It does work that used to be the realm of MessageLoggerQ.
00029 //
00030 // Changes:
00031 //
00032 // 0 - 8/7/09   Initial version mf and crj
00033 //
00034 // -----------------------------------------------------------------------
00035 
00036 class ErrorLog;
00037 class ThreadQueue;
00038 
00039 class MainThreadMLscribe : public AbstractMLscribe
00040 {
00041 public:
00042   // ---  birth/death:
00043   MainThreadMLscribe(boost::shared_ptr<ThreadQueue> tqp);
00044   virtual ~MainThreadMLscribe();
00045 
00046   // --- receive and act on messages:
00047   virtual                                                       
00048   void  runCommand(MessageLoggerQ::OpCode  opcode, void * operand);
00049                                                                 
00050 
00051   // --- obtain a pointer to the errorlog 
00052   static ErrorLog * getErrorLog_ptr() {return static_errorlog_p;}
00053   
00054 private:
00055 
00056   static ErrorLog                   * static_errorlog_p;
00057    boost::shared_ptr<ThreadQueue>   m_queue;
00058 };  // MainThreadMLscribe
00059 
00060 
00061 }   // end of namespace service
00062 }  // namespace edm
00063 
00064 
00065 #endif  // FWCore_MessageService_MainThreadMLscribe_h