11#ifndef FRAMEWORK_ALGORITHMSPEC_H
12#define FRAMEWORK_ALGORITHMSPEC_H
87template <StringLiteral lit,
typename T>
90 static constexpr auto size =
sizeof(lit.value);
97 operator T
const&()
const
99 return ctx.
inputs().template get<T>(lit.value);
103template <
typename T,
typename S = std::
void_t<>>
107 return ctx.services().get<T>();
111 return ctx.services().get<T>();
119 return ctx.options();
127 static_assert(always_static_assert_v<S>,
"Should be ConfigParamRegistry const&");
128 return ctx.options();
144 return ctx.outputs();
164template <StringLiteral L,
typename T>
172template <StringLiteral L,
typename T>
176 static_assert(always_static_assert_v<Input<L, T>>,
"Should be Input<L, T> const&");
180template <
typename... CONTEXTELEMENT>
188template <
typename... CONTEXTELEMENT>
196template <
typename R,
typename... ARGS>
199 std::function<
R(ARGS...)>
f = callback;
228template <
typename LAMBDA>
235template <
typename LAMBDA>
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to process
char error[CURL_ERROR_SIZE]
InputRecord & inputs()
The inputs associated with this processing context.
typedef void(APIENTRYP PFNGLCULLFACEPROC)(GLenum mode)
Defining ITS Vertex explicitly as messageable.
AlgorithmSpec::InitCallback adaptStatefulF(std::function< AlgorithmSpec::ProcessCallback(CONTEXTELEMENT &...)> callback)
AlgorithmSpec::ProcessCallback adaptStatelessP(R(*callback)(ARGS...))
AlgorithmSpec::ProcessCallback adaptStateless(LAMBDA l)
AlgorithmSpec::ProcessCallback adaptStatelessF(std::function< void(CONTEXTELEMENT &...)> callback)
memfun_type< decltype(&F::operator())>::type FFL(F const &func)
AlgorithmSpec::InitCallback adaptStateful(LAMBDA l)
Helper class for an algorithm which is loaded as a plugin.
virtual AlgorithmSpec create(ConfigContext const &)=0
std::function< ProcessCallback(InitContext &)> InitCallback
AlgorithmSpec(AlgorithmSpec &)=default
static AlgorithmSpec dummyAlgorithm()
std::function< void(InitErrorContext &)> InitErrorCallback
AlgorithmSpec(InitCallback init, ErrorCallback &error=emptyErrorCallback(), InitErrorCallback &initError=emptyInitErrorCallback())
AlgorithmSpec & operator=(const AlgorithmSpec &)=default
std::function< void(ProcessingContext &)> ProcessCallback
static ErrorCallback & emptyErrorCallback()
AlgorithmSpec(const AlgorithmSpec &)=default
static InitErrorCallback & emptyInitErrorCallback()
std::function< void(ErrorContext &)> ErrorCallback
AlgorithmSpec(ProcessCallback process, ErrorCallback &error=emptyErrorCallback())
InitErrorCallback onInitError
AlgorithmSpec(AlgorithmSpec &&)=default
ProcessCallback onProcess
static ConfigParamRegistry const & get(InitContext &ctx)
static ConfigParamRegistry const & get(InitContext &ctx)
static DataAllocator & get(ProcessingContext &ctx)
static InitContext & get(InitContext &ctx)
static InputRecord & get(ProcessingContext &ctx)
static Input< L, T > get(ProcessingContext &ctx)
static Input< L, T > get(ProcessingContext &ctx)
static ProcessingContext & get(ProcessingContext &ctx)
static decltype(auto) get(ProcessingContext &ctx)
static decltype(auto) get(InitContext &ctx)