DUNE-DAQ / fdreadoutlibs

fdreadoutlibs
0 stars 3 forks source link

WIB2TPHandler - use shared pointers instead of references #103

Closed alessandrothea closed 1 year ago

alessandrothea commented 1 year ago

The WIB2TPHandler keeps a reference to SenderConcept to send TPs and TPSets out. In cases where one of these outputs is not connected (e.g. no TP datalink handler connected to tp_out), theWIB2TPHandlercrashes when trying to send objects out. This is easily solvable by moving to use shared pointers to the sameSenderConcepts with little effort, as theSenderConcepts are returned btIOManager` as shared pointers.

The change is applied in this PR, and an additional check added to the try_send method, to proceed with the sending only if the relevant shared pointer is not null