#include <MessageContext.h>
|
| MessageContext (FairMQDeviceProxy &proxy) |
|
| MessageContext (FairMQDeviceProxy &proxy, DispatchControl &&dispatcher) |
|
void | init (DispatchControl &&dispatcher) |
|
template<typename T , typename... Args> |
auto & | add (Args &&... args) |
|
template<typename T , typename... Args> |
Messages::value_type | make (Args &&... args) |
|
template<typename T , typename... Args> |
ContextObjectScope< T > | make_scoped (Args &&... args) |
|
void | schedule (Messages::value_type &&message) |
|
Messages | getMessagesForSending () |
|
size_t | size () |
|
void | clear () |
|
FairMQDeviceProxy & | proxy () |
|
int64_t | addToCache (std::unique_ptr< fair::mq::Message > &message) |
|
std::unique_ptr< fair::mq::Message > | cloneFromCache (int64_t id) const |
|
void | pruneFromCache (int64_t id) |
|
fair::mq::MessagePtr | createMessage (RouteIndex routeIndex, int index, size_t size) |
|
fair::mq::MessagePtr | createMessage (RouteIndex routeIndex, int index, void *data, size_t size, fair::mq::FreeFn *ffn, void *hint) |
|
o2::header::DataHeader * | findMessageHeader (const Output &spec) |
| return the headers of the 1st (from the end) matching message checking first in mMessages then in mScheduledMessages
|
|
o2::header::Stack * | findMessageHeaderStack (const Output &spec) |
|
int | countDeviceOutputs (bool excludeDPLOrigin=false) const |
|
void | fakeDispatch () |
|
bool | didDispatch () |
|
o2::framework::DataProcessingHeader * | findMessageDataProcessingHeader (const Output &spec) |
|
std::pair< o2::header::DataHeader *, o2::framework::DataProcessingHeader * > | findMessageHeaders (const Output &spec) |
|
Definition at line 53 of file MessageContext.h.
◆ ContextObjectScope
◆ Messages
◆ MessageContext() [1/2]
◆ MessageContext() [2/2]
◆ add()
template<typename T , typename... Args>
auto & o2::framework::MessageContext::add |
( |
Args &&... |
args | ) |
|
|
inline |
Create the specified context object from the variadic arguments and add to message list. The context object is owned be the context and returned by reference. The context object type is specified as template argument, each context object implementation must derive from the ContextObject interface. TODO: rename to make_ref
Definition at line 415 of file MessageContext.h.
◆ addToCache()
int64_t o2::framework::MessageContext::addToCache |
( |
std::unique_ptr< fair::mq::Message > & |
message | ) |
|
◆ clear()
void o2::framework::MessageContext::clear |
( |
| ) |
|
Prepares the context to create messages for the given timeslice. This expects that the previous context was already sent and can be completely discarded.
Definition at line 102 of file MessageContext.cxx.
◆ cloneFromCache()
std::unique_ptr< fair::mq::Message > o2::framework::MessageContext::cloneFromCache |
( |
int64_t |
id | ) |
const |
◆ countDeviceOutputs()
int o2::framework::MessageContext::countDeviceOutputs |
( |
bool |
excludeDPLOrigin = false | ) |
const |
◆ createMessage() [1/2]
fair::mq::MessagePtr o2::framework::MessageContext::createMessage |
( |
RouteIndex |
routeIndex, |
|
|
int |
index, |
|
|
size_t |
size |
|
) |
| |
call the proxy to create a message of the specified size we don't implement in the header to avoid including the fair::mq::Device header here that's why the different versions need to be implemented as individual functions
Definition at line 20 of file MessageContext.cxx.
◆ createMessage() [2/2]
fair::mq::MessagePtr o2::framework::MessageContext::createMessage |
( |
RouteIndex |
routeIndex, |
|
|
int |
index, |
|
|
void * |
data, |
|
|
size_t |
size, |
|
|
fair::mq::FreeFn * |
ffn, |
|
|
void * |
hint |
|
) |
| |
◆ didDispatch()
bool o2::framework::MessageContext::didDispatch |
( |
| ) |
|
|
inline |
◆ fakeDispatch()
void o2::framework::MessageContext::fakeDispatch |
( |
| ) |
|
|
inline |
◆ findMessageDataProcessingHeader()
◆ findMessageHeader()
return the headers of the 1st (from the end) matching message checking first in mMessages then in mScheduledMessages
Definition at line 32 of file MessageContext.cxx.
◆ findMessageHeaders()
◆ findMessageHeaderStack()
◆ getMessagesForSending()
Messages o2::framework::MessageContext::getMessagesForSending |
( |
| ) |
|
|
inline |
◆ init()
◆ make()
template<typename T , typename... Args>
Messages::value_type o2::framework::MessageContext::make |
( |
Args &&... |
args | ) |
|
|
inline |
Create the specified context object from the variadic arguments as a unique pointer of the context object base class. The context object type is specified as template argument, each context object implementation must derive from the ContextObject interface.
Definition at line 427 of file MessageContext.h.
◆ make_scoped()
template<typename T , typename... Args>
Create scope handler managing the specified context object. The context object is created from the variadic arguments and is owned by the scope handler. If the handler goes out of scope, the object is scheduled in the context, either added to the list of messages or directly sent via the optional callback.
Definition at line 438 of file MessageContext.h.
◆ proxy()
◆ pruneFromCache()
void o2::framework::MessageContext::pruneFromCache |
( |
int64_t |
id | ) |
|
◆ schedule()
void o2::framework::MessageContext::schedule |
( |
Messages::value_type && |
message | ) |
|
Schedule a context object for sending. The object is considered complete at this point and is sent directly through the dispatcher callback of the context if initialized.
Definition at line 133 of file MessageContext.cxx.
◆ size()
size_t o2::framework::MessageContext::size |
( |
| ) |
|
|
inline |
◆ DefaultChannelIndex
constexpr int o2::framework::MessageContext::DefaultChannelIndex = 0 |
|
staticconstexpr |
◆ service_kind
The documentation for this class was generated from the following files: