12 #include <QtCore/QMutex>
29 class ProcessorManager;
113 static shared_pointer::element_type&
reference();
Ratemeter & _ratemeter
the ratemeter to measure the analysis rate
void rethrowException()
rethrow the exceptions thrown in the workers
declaration of a pausable QThread
class calculating a rate in Hz.
Workers(RingBuffer< CASSEvent > &rb, Ratemeter &ratemeter, QObject *parent=0)
constructor.
file contains declaration of the CASSEvent
ProcessorManager & _process
the processors
std::tr1::shared_ptr< Worker > shared_pointer
a shared pointer of this
QMutex lock
a lock to be used by functions that are using this worker
std::tr1::shared_ptr< Workers > shared_pointer
a shared pointer of this class
container and call handler for all registered processors.
static shared_pointer _instance
the instance of this class
void pause()
pause the threads.
A Ringbuffer, handles communication between Input and Worker Threads.
RingBuffer< CASSEvent > & _ringbuffer
the ringbuffer
static shared_pointer::element_type & reference()
return a reference to the instance itselve if it exists
Worker(RingBuffer< CASSEvent > &rb, Ratemeter &ratemeter, QObject *parent=0)
constructor.
void resume()
resumes the threads
file contains the ringbuffer class
file contains global definitions for project cass
std::vector< Worker::shared_pointer > _workers
container of workers
RingBuffer< CASSEvent > & _rb
the ringbuffer
static QMutex _mutex
mutex to protect the creation of the signelton
void end()
will set the flags to end the threads
void start()
starts the threads
static shared_pointer instance(RingBuffer< CASSEvent > &rb, Ratemeter &ratemeter, QObject *parent=0)
create and return an instance of this singleton
bool running() const
check if all workers are still running
void runthis()
start the thread.
A QThread that has the ability to be paused and resumed.