Class which processes events in asyncronous batches for real-time daq monitoring. More...
#include <AsyncEventHandler.hh>
Public Member Functions | |
void | Reset () |
Clear all registered modules and receivers. | |
int | AddModule (BaseModule *mod, bool register_to_eventhandler=true, bool register_parameters=true) |
Add a module to be handled by this process. | |
int | AddReceiver (AsyncEventHandler *receiver) |
Register another handler to receive processed events from this batch. | |
int | Process (EventPtr evt) |
Process one event. | |
int | StartRunning () |
Start running in a new thread. | |
int | StopRunning () |
Stop running in a separate thread. | |
bool | IsRunning () |
Are we running right now? | |
void | SetSleepMillisec (int sleeptime) |
Set the time to sleep in between event processing. | |
int | GetSleepMillisec () const |
Get the time to sleep between event processing. | |
void | SetBlockingStatus (bool blocking) |
Set the blocking status. | |
bool | GetBlockingStatus () |
Get the blocking status. | |
void | operator() () |
Should not be called directly; necessary for threading. | |
Private Attributes | |
bool | _running |
is our thread going? | |
int | _sleeptime |
time to sleep in ms between events | |
bool | _blocking |
Do we block new process requests if busy? | |
std::vector< BaseModule * > | _modules |
modules to process with | |
std::vector< AsyncEventHandler * > | _receivers |
processors to receive events | |
EventPtr | _next_event |
next event ready for processing | |
boost::condition_variable | _event_ready |
signal wakeup | |
boost::mutex | _event_mutex |
control access to next_event | |
boost::shared_ptr< boost::thread > | _threadptr |
manage our own thread |
Class which processes events in asyncronous batches for real-time daq monitoring.
Definition at line 26 of file AsyncEventHandler.hh.