11#ifndef o2_framework_DataDescriptorMatcher_H_INCLUDED
12#define o2_framework_DataDescriptorMatcher_H_INCLUDED
63 using Value = std::variant<uint32_t, uint64_t, std::string, None>;
113 std::array<ContextElement, MAX_MATCHING_VARIABLE> mElements;
114 std::array<ContextUpdate, MAX_UPDATES_PER_QUERY> mUpdates;
115 int mPerformedUpdates;
132 template <
typename V>
135 template <
typename VISITOR>
136 decltype(
auto)
visit(VISITOR visitor)
const
138#if !defined(__CLING__) && !defined(__ROOTCLING__)
139 return std::visit(visitor,
mValue);
146#if !defined(__CLING__) && !defined(__ROOTCLING__)
157 template <std::
size_t L>
169 template <std::
size_t L>
230template <
typename DESCRIPTOR>
249#if !defined(__CLING__) && !defined(__ROOTCLING__)
298 friend std::ostream&
operator<<(std::ostream& os,
Op const& matcher);
318#include "DataDescriptorMatcher.inc"
bool operator==(ConstantValueMatcher const &other) const
ConstantValueMatcher(bool value)
bool match(ConcreteDataMatcher const &matcher, VariableContext &context) const
bool operator==(DataDescriptorMatcher const &other) const
friend std::ostream & operator<<(std::ostream &os, DataDescriptorMatcher const &matcher)
DataDescriptorMatcher(DataDescriptorMatcher &&other)=default
DataDescriptorMatcher & operator=(DataDescriptorMatcher const &other)
DataDescriptorMatcher & operator=(DataDescriptorMatcher &&other)=default
Node const & getRight() const
Node const & getLeft() const
~DataDescriptorMatcher()=default
Something which can be matched against a header::DataDescription.
DescriptionValueMatcher(std::string const &s)
bool match(header::DataHeader const &header, VariableContext &context) const
DescriptionValueMatcher(ContextRef variableId)
constexpr DescriptionValueMatcher(const char(&s)[L])
Something which can be matched against a header::DataOrigin.
OriginValueMatcher(ContextRef variableId)
OriginValueMatcher(std::string const &s)
constexpr OriginValueMatcher(const char(&s)[L])
bool match(header::DataHeader const &header, VariableContext &context) const
Matcher on actual time, as reported in the DataProcessingHeader.
bool match(header::DataHeader const &dh, DataProcessingHeader const &dph, VariableContext &context) const
StartTimeValueMatcher(uint64_t v, uint64_t scale=1)
StartTimeValueMatcher(ContextRef variableId, uint64_t scale=1)
StartTimeValueMatcher(std::string const &s, uint64_t scale=1)
Something which can be matched against a header::SubSpecificationType.
SubSpecificationTypeValueMatcher(std::string const &s)
bool match(header::DataHeader const &header, VariableContext &context) const
SubSpecificationTypeValueMatcher(ContextRef variableId)
SubSpecificationTypeValueMatcher(header::DataHeader::SubSpecificationType v)
This means that the matcher is looking for a constant.
std::variant< T, ContextRef > mValue
ValueHolder(ContextRef variableId)
decltype(auto) visit(VISITOR visitor) const
bool operator==(ValueHolder< T > const &other) const
friend std::ostream & operator<<(std::ostream &os, ValueHolder< V > const &holder)
void publish(void(*callback)(VariableContext const &, TimesliceSlot slot, void *context), void *context, TimesliceSlot slot)
void put(ContextUpdate &&update)
ContextElement::Value const & get(size_t pos) const
GLsizei const GLfloat * value
GLuint GLsizei const GLchar * label
std::variant< OriginValueMatcher, DescriptionValueMatcher, SubSpecificationTypeValueMatcher, std::unique_ptr< DataDescriptorMatcher >, ConstantValueMatcher, StartTimeValueMatcher > Node
ContextPos
Special positions for variables in context.
@ CREATIONTIME_POS
The DataHeader::runNumber associated to the timeslice.
@ FIRSTTFORBIT_POS
The DataHeader::tfCounter associated to the timeslice.
@ TFCOUNTER_POS
The DataProcessingHeader::startTime associated to the timeslice.
@ RUNNUMBER_POS
The DataHeader::firstTForbit associated to the timeslice.
constexpr int MAX_UPDATES_PER_QUERY
constexpr int MAX_MATCHING_VARIABLE
std::variant< uint32_t, uint64_t, std::string, None > Value
size_t publishVersion
The committed version of the element. Every time we commit something to it, we bump the version.
size_t commitVersion
The actual contents of the element.
A typesafe reference to an element of the context.
bool operator==(ContextRef const &other) const
ContextElement::Value newValue
Marks an empty item in the context.
VectorOfTObjectPtrs other