Project
Loading...
Searching...
No Matches
o2::framework::DataProcessingDevice Class Reference

#include <DataProcessingDevice.h>

Inherits fair::mq::Device.

Public Member Functions

 DataProcessingDevice (RunningDeviceRef ref, ServiceRegistry &, ProcessingPolicies &policies)
 
void Init () final
 
void InitTask () final
 
void PreRun () final
 
void PostRun () final
 
void Reset () final
 
void ResetTask () final
 
void Run () final
 

Static Public Member Functions

static void doRun (ServiceRegistryRef)
 
static void doPrepare (ServiceRegistryRef)
 
static void handleData (ServiceRegistryRef, InputChannelInfo &)
 
static bool tryDispatchComputation (ServiceRegistryRef ref, std::vector< DataRelayer::RecordAction > &completed)
 

Protected Member Functions

void error (const char *msg)
 
void fillContext (DataProcessorContext &context, DeviceContext &deviceContext)
 

Detailed Description

A device actually carrying out all the DPL Data Processing needs.

Definition at line 77 of file DataProcessingDevice.h.

Constructor & Destructor Documentation

◆ DataProcessingDevice()

o2::framework::DataProcessingDevice::DataProcessingDevice ( RunningDeviceRef  ref,
ServiceRegistry registry,
ProcessingPolicies policies 
)

This should post a message on the queue...

Definition at line 178 of file DataProcessingDevice.cxx.

Member Function Documentation

◆ doPrepare()

void o2::framework::DataProcessingDevice::doPrepare ( ServiceRegistryRef  ref)
static

We drive the state loop ourself so that we will be able to support non-data triggers like those which are time based.

Sort channels by oldest possible timeframe and process them in such order.

Definition at line 1553 of file DataProcessingDevice.cxx.

◆ doRun()

void o2::framework::DataProcessingDevice::doRun ( ServiceRegistryRef  ref)
static

Besides flushing the queues we must make sure we do not have only timers as they do not need to be further processed.

Definition at line 1727 of file DataProcessingDevice.cxx.

◆ error()

void o2::framework::DataProcessingDevice::error ( const char msg)
protected

Definition at line 2607 of file DataProcessingDevice.cxx.

◆ fillContext()

void o2::framework::DataProcessingDevice::fillContext ( DataProcessorContext context,
DeviceContext deviceContext 
)
protected

Callback for the error handling FIXME: move erro handling to a service?

FIXME: we should pass the salt in, so that the message can access information which were stored in the stream.

FIXME: we should pass the salt in, so that the message can access information which were stored in the stream.

We must make sure there is no optional if we want to optimize the forwarding

Definition at line 1126 of file DataProcessingDevice.cxx.

◆ handleData()

void o2::framework::DataProcessingDevice::handleData ( ServiceRegistryRef  ref,
InputChannelInfo info 
)
static

This is the inner loop of our framework. The actual implementation is divided in two parts. In the first one we define a set of lambdas which describe what is actually going to happen, hiding all the state boilerplate which the user does not need to care about at top level.

We have back pressure, therefore we do not process DomainInfo anymore. until the previous message are processed.

The oldest possible timeslice has changed. We can should therefore process it. Notice we do so only if the incoming data has been fully processed.

Definition at line 1874 of file DataProcessingDevice.cxx.

◆ Init()

void o2::framework::DataProcessingDevice::Init ( )
final

This takes care of initialising the device from its specification. In particular it needs to:

  • Fetch parameters from configuration
  • Materialize the correct callbacks for expiring records. We need to do it here because the configuration is available only at this point.
  • Invoke the actual init callback, which returns the processing callback.

Dump the configuration so that we can get it from the driver.

FIXME: we should pass the salt in, so that the message can access information which were stored in the stream.

FIXME: we should pass the salt in, so that the message can access information which were stored in the stream.

Convert a standard exception to a RuntimeErrorRef Notice how this will lose the backtrace information and report the exception coming from here.

Internal channels which will never create an actual message should be considered as in "Pull" mode, since we do not expect them to create any data.

Definition at line 401 of file DataProcessingDevice.cxx.

◆ InitTask()

void o2::framework::DataProcessingDevice::InitTask ( )
final

Initialise the pollers

We now run an event loop also in InitTask. This is needed to:

  • Make sure region registration callbacks are invoked on the main thread.
  • Wait for enough callbacks to be delivered before moving to START

Definition at line 1004 of file DataProcessingDevice.cxx.

◆ PostRun()

void o2::framework::DataProcessingDevice::PostRun ( )
final

Definition at line 1286 of file DataProcessingDevice.cxx.

◆ PreRun()

void o2::framework::DataProcessingDevice::PreRun ( )
final

Definition at line 1231 of file DataProcessingDevice.cxx.

◆ Reset()

void o2::framework::DataProcessingDevice::Reset ( )
final

Definition at line 1304 of file DataProcessingDevice.cxx.

◆ ResetTask()

void o2::framework::DataProcessingDevice::ResetTask ( )
final

Definition at line 1845 of file DataProcessingDevice.cxx.

◆ Run()

void o2::framework::DataProcessingDevice::Run ( )
final

Decide which task to use

Cleanup messages which are still pending on exit.

Definition at line 1310 of file DataProcessingDevice.cxx.

◆ tryDispatchComputation()

bool o2::framework::DataProcessingDevice::tryDispatchComputation ( ServiceRegistryRef  ref,
std::vector< DataRelayer::RecordAction > &  completed 
)
static

Convert a standard exception to a RuntimeErrorRef Notice how this will lose the backtrace information and report the exception coming from here.

Definition at line 2194 of file DataProcessingDevice.cxx.


The documentation for this class was generated from the following files: