#include <DQMServices/XdaqCollector/interface/Updater.h>
Public Member Functions | |
bool | checkRunning () const |
void | registerObserver (dqm::UpdateObserver *) |
void | request_update () |
void | setRunning () |
void | setStopped () |
Updater (DQMOldReceiver *the_mui) | |
~Updater () | |
Static Public Member Functions | |
static void * | start (void *pthis) |
this is the function the thread will execute | |
Private Types | |
typedef olist::const_iterator | obi |
typedef std::list < dqm::UpdateObserver * > | olist |
Private Attributes | |
DQMOldReceiver * | mui |
olist | obs_ |
bool | observed |
bool | running |
pthread_t | worker |
Definition at line 12 of file Updater.h.
typedef olist::const_iterator dqm::Updater::obi [private] |
typedef std::list<dqm::UpdateObserver *> dqm::Updater::olist [private] |
Updater::Updater | ( | DQMOldReceiver * | the_mui | ) |
Definition at line 7 of file Updater.cc.
References NULL, pthread_create, start(), and worker.
00007 : mui(the_mui), observed(false), 00008 running(false) 00009 { 00010 // create a thread and pass a pointer to the static function start 00011 pthread_create(&worker, NULL, start, (void *)this); 00012 }
dqm::Updater::~Updater | ( | ) | [inline] |
bool dqm::Updater::checkRunning | ( | ) | const [inline] |
void Updater::registerObserver | ( | dqm::UpdateObserver * | obs | ) |
void Updater::request_update | ( | ) |
void dqm::Updater::setRunning | ( | ) | [inline] |
void dqm::Updater::setStopped | ( | ) | [inline] |
Definition at line 51 of file Updater.h.
References running.
Referenced by DQMBaseClient::haltAction().
00052 { 00053 running=false; 00054 }
this is the function the thread will execute
Definition at line 14 of file Updater.cc.
References checkRunning(), request_update(), and setRunning().
Referenced by Updater().
00015 { 00016 // We receive a pointer to the parent Updater object 00017 Updater *updater_pt = (Updater *)pthis; 00018 updater_pt->setRunning(); 00019 while(1) 00020 { 00021 // call the updater request_update method 00022 updater_pt->request_update(); 00023 if(!updater_pt->checkRunning()) break; 00024 } 00025 00026 return (void *)updater_pt; 00027 }
DQMOldReceiver* dqm::Updater::mui [private] |
olist dqm::Updater::obs_ [private] |
bool dqm::Updater::observed [private] |
bool dqm::Updater::running [private] |
Definition at line 21 of file Updater.h.
Referenced by checkRunning(), setRunning(), and setStopped().
pthread_t dqm::Updater::worker [private] |