3#include "debugtrace.hpp"
9 :
_mgr(mgr), inCallback(cb), reset(resetfcn)
12 main_thread_id(std::this_thread::get_id())
17 assert(mgr->main_thread_id == main_thread_id);
24 handle->addInDataHandler(
this);
26 assert(handle->main_thread_id == main_thread_id);
37 handle->removeInDataHandler(*
this);
47 std::cerr <<
"************ BUG: Stop function not called while arriving at "
48 "InDataHandler's destructor. Fix this by calling "
49 "InDataHandler::stop()."
57 assert(std::this_thread::get_id() == main_thread_id);
std::weak_ptr< StreamMgr > _mgr
InDataHandler(SmgrHandle mgr, InCallbackType cb, InResetType resetfcn)
When constructed, the handler is added to the stream manager, which will call the handlers's inCallba...
void start()
Adds the current InDataHandler to the list of handlers in the StreamMgr. After this happens,...
void checkRightThread() const
void stop()
Removes the currend InDataHandler from the list of handlers in the StreamMgr. From that point on,...
std::weak_ptr< StreamMgr > _mgr
The main global handle to a stream, stored in a weak pointer, if it does not yet exist,...
std::function< void(const Daq *)> InResetType
Function definition for the reset callback.
std::function< void(const DaqData &)> InCallbackType
The function definition of callbacks with incoming DAQ data.
std::shared_ptr< StreamMgr > SmgrHandle