CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

edm::service::MessageServicePresence Class Reference

#include <MessageServicePresence.h>

Inheritance diagram for edm::service::MessageServicePresence:
edm::Presence

List of all members.

Public Member Functions

 MessageServicePresence ()
 ~MessageServicePresence ()

Private Member Functions

 MessageServicePresence (MessageServicePresence const &)
void operator= (MessageServicePresence const &)

Private Attributes

boost::shared_ptr< ThreadQueuem_queue
boost::thread m_scribeThread

Detailed Description

Definition at line 16 of file MessageServicePresence.h.


Constructor & Destructor Documentation

edm::service::MessageServicePresence::MessageServicePresence ( )

Definition at line 52 of file MessageServicePresence.cc.

References m_queue, and edm::MessageLoggerQ::setMLscribe_ptr().

  : Presence()
  , m_queue (new ThreadQueue)
  , m_scribeThread
         ( ( (void) MessageLoggerQ::instance() // ensure Q's static data init'd
            , boost::bind(&runMessageLoggerScribe, m_queue)
                                // start a new thread, run rMLS(m_queue)
                                // ChangeLog 2
          ) ) 
          // Note that m_scribeThread, which is a boost::thread, has a single-argument ctor - 
          // just the function to be run.  But we need to do something first, namely,
          // ensure that the MessageLoggerQ is in a valid state - and that requires
          // a statement.  So we bundle that statement in parenthesis, separated by 
          // a comma, with the argument we really want (runMessageLoggerScribe).  This
          // creates a single argument, wheich evaluates to runMessageLoggerScribe after
          // first executing the before-the-comma statement. 
{
  MessageLoggerQ::setMLscribe_ptr(
    boost::shared_ptr<edm::service::AbstractMLscribe>
        (new MainThreadMLscribe(m_queue))); 
                                                                // change log 3
  //std::cout << "MessageServicePresence ctor\n";
}
edm::service::MessageServicePresence::~MessageServicePresence ( )

Definition at line 77 of file MessageServicePresence.cc.

References m_scribeThread, edm::MessageLoggerQ::MLqEND(), and edm::MessageLoggerQ::setMLscribe_ptr().

{
  MessageLoggerQ::MLqEND();
  m_scribeThread.join();
  MessageLoggerQ::setMLscribe_ptr
    (boost::shared_ptr<edm::service::AbstractMLscribe>());   // change log 3
}
edm::service::MessageServicePresence::MessageServicePresence ( MessageServicePresence const &  ) [private]

Member Function Documentation

void edm::service::MessageServicePresence::operator= ( MessageServicePresence const &  ) [private]

Member Data Documentation

Definition at line 29 of file MessageServicePresence.h.

Referenced by MessageServicePresence().

Definition at line 30 of file MessageServicePresence.h.

Referenced by ~MessageServicePresence().