![]() |
Project
|
#include <AlgorithmSpec.h>
Public Types | |
using | ProcessCallback = std::function< void(ProcessingContext &)> |
using | InitCallback = std::function< ProcessCallback(InitContext &)> |
using | ErrorCallback = std::function< void(ErrorContext &)> |
using | InitErrorCallback = std::function< void(InitErrorContext &)> |
Public Member Functions | |
AlgorithmSpec ()=default | |
AlgorithmSpec (AlgorithmSpec &&)=default | |
AlgorithmSpec (const AlgorithmSpec &)=default | |
AlgorithmSpec (AlgorithmSpec &)=default | |
AlgorithmSpec & | operator= (const AlgorithmSpec &)=default |
AlgorithmSpec (ProcessCallback process, ErrorCallback &error=emptyErrorCallback()) | |
AlgorithmSpec (InitCallback init, ErrorCallback &error=emptyErrorCallback(), InitErrorCallback &initError=emptyInitErrorCallback()) | |
Static Public Member Functions | |
static AlgorithmSpec | dummyAlgorithm () |
static ErrorCallback & | emptyErrorCallback () |
static InitErrorCallback & | emptyInitErrorCallback () |
Public Attributes | |
InitCallback | onInit = nullptr |
ProcessCallback | onProcess = nullptr |
ErrorCallback | onError = nullptr |
InitErrorCallback | onInitError = nullptr |
This is the class holding the actual algorithm to be used. Notice that the InitCallback can be used to define stateful data as it returns a ProcessCallback which will be invoked to do the data processing. For example if you want to have some geometry available at process time, but of course you do not want to initialise it at every creation, you can do:
AlgorithmSpec{InitCallback{ static Geometry geo; // this will last like the whole job return [&geo] { /// Do something with the geometry /// } } }
FIXME: we should probably return also a function to handle EXIT transition...
Definition at line 43 of file AlgorithmSpec.h.
using o2::framework::AlgorithmSpec::ErrorCallback = std::function<void(ErrorContext&)> |
Definition at line 46 of file AlgorithmSpec.h.
using o2::framework::AlgorithmSpec::InitCallback = std::function<ProcessCallback(InitContext&)> |
Definition at line 45 of file AlgorithmSpec.h.
using o2::framework::AlgorithmSpec::InitErrorCallback = std::function<void(InitErrorContext&)> |
Definition at line 47 of file AlgorithmSpec.h.
using o2::framework::AlgorithmSpec::ProcessCallback = std::function<void(ProcessingContext&)> |
Definition at line 44 of file AlgorithmSpec.h.
|
default |
|
default |
|
default |
|
default |
|
inline |
Definition at line 60 of file AlgorithmSpec.h.
|
inline |
Definition at line 68 of file AlgorithmSpec.h.
|
static |
Definition at line 16 of file AlgorithmSpec.cxx.
|
static |
Definition at line 21 of file AlgorithmSpec.cxx.
|
static |
Definition at line 27 of file AlgorithmSpec.cxx.
|
default |
ErrorCallback o2::framework::AlgorithmSpec::onError = nullptr |
Definition at line 78 of file AlgorithmSpec.h.
InitCallback o2::framework::AlgorithmSpec::onInit = nullptr |
Definition at line 76 of file AlgorithmSpec.h.
InitErrorCallback o2::framework::AlgorithmSpec::onInitError = nullptr |
Definition at line 79 of file AlgorithmSpec.h.
ProcessCallback o2::framework::AlgorithmSpec::onProcess = nullptr |
Definition at line 77 of file AlgorithmSpec.h.