CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Private Attributes | Friends
evf::FastMonitoringThread Class Reference

#include <FastMonitoringThread.h>

Classes

struct  MonitorData
 

Public Types

enum  Macrostate {
  sInit = 0, sJobReady, sRunGiven, sRunning,
  sStopping, sShuttingDown, sDone, sJobEnded,
  sError, sErrorEnded, sEnd, sInvalid,
  MCOUNT
}
 

Public Member Functions

 FastMonitoringThread ()
 
void start (void(FastMonitoringService::*fp)(), FastMonitoringService *cp)
 
void stop ()
 

Private Attributes

boost::mutex lock_
 
MonitorData m_data
 
volatile bool m_stoprequest
 
boost::shared_ptr< boost::thread > m_thread
 
boost::mutex monlock_
 

Friends

class FastMonitoringService
 

Detailed Description

Definition at line 20 of file FastMonitoringThread.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

evf::FastMonitoringThread::FastMonitoringThread ( )
inline

Definition at line 54 of file FastMonitoringThread.h.

54 : m_stoprequest(false){}

Member Function Documentation

void evf::FastMonitoringThread::start ( void(FastMonitoringService::*)()  fp,
FastMonitoringService cp 
)
inline

Definition at line 56 of file FastMonitoringThread.h.

Referenced by progressbar.ProgressBar::__next__(), Types.LuminosityBlockRange::cppID(), Types.EventRange::cppID(), and evf::FastMonitoringService::FastMonitoringService().

56  {
57  assert(!m_thread);
58  m_thread = boost::shared_ptr<boost::thread>(new boost::thread(boost::bind(fp,cp)));
59  }
boost::shared_ptr< boost::thread > m_thread
void evf::FastMonitoringThread::stop ( )
inline

Definition at line 60 of file FastMonitoringThread.h.

Referenced by evf::FastMonitoringService::postEndJob().

60  {
61  assert(m_thread);
62  m_stoprequest=true;
63  m_thread->join();
64  }
boost::shared_ptr< boost::thread > m_thread

Friends And Related Function Documentation

friend class FastMonitoringService
friend

Definition at line 74 of file FastMonitoringThread.h.

Member Data Documentation

boost::mutex evf::FastMonitoringThread::lock_
private

Definition at line 71 of file FastMonitoringThread.h.

MonitorData evf::FastMonitoringThread::m_data
private
volatile bool evf::FastMonitoringThread::m_stoprequest
private

Definition at line 68 of file FastMonitoringThread.h.

Referenced by evf::FastMonitoringService::dowork().

boost::shared_ptr<boost::thread> evf::FastMonitoringThread::m_thread
private

Definition at line 69 of file FastMonitoringThread.h.

boost::mutex evf::FastMonitoringThread::monlock_
private