![]() |
Project
|
A helper class to iteratate over all parts of all input routes. More...
#include <InputRecordWalker.h>
Classes | |
class | Iterator |
Public Types | |
using | const_iterator = Iterator< DataRef const > |
Public Member Functions | |
InputRecordWalker ()=delete | |
InputRecordWalker (InputRecord &record, std::vector< InputSpec > filterSpecs={}) | |
const_iterator | begin () const |
const_iterator | end () const |
A helper class to iteratate over all parts of all input routes.
Each input route can have multiple parts per input route and computation. This class allows simple iteration over all parts available in the computation. Optionally, a filter can be used to define valid parts and ignore all parts not matching the filter.
The iterator has DataRef as value type.
Usage: // 'inputs' refers to the DPL InputRecord instance returned by // ProcessingContext::inputs()
// iterate over all parts for (auto const& ref : InputRecordWalker(inputs)) { // do something with the data described by the DataRef object, e.g. auto data = inputs.get<TYPE>(ref) }
// iterate with a filter std::vector<InputSpec> filter{ {"tpc", "TPC", "SOMEDATA", 0, Lifetime::Timeframe}, {"its", ConcreteDataTypeMatcher{"ITS", "SOMEDATA"}, Lifetime::Timeframe}, }; for (auto const& ref : InputRecordWalker(inputs, filter)) { // do something with the data }
Definition at line 52 of file InputRecordWalker.h.
using o2::framework::InputRecordWalker::const_iterator = Iterator<DataRef const> |
Definition at line 158 of file InputRecordWalker.h.
|
delete |
|
inline |
Definition at line 56 of file InputRecordWalker.h.
|
inline |
Definition at line 160 of file InputRecordWalker.h.
|
inline |
Definition at line 165 of file InputRecordWalker.h.