![]() |
Project
|
#include <DataSpecUtils.h>
Static Public Member Functions | |
static bool | match (InputSpec const &spec, ConcreteDataMatcher const &target) |
static bool | match (InputSpec const &spec, ConcreteDataTypeMatcher const &target) |
static bool | match (OutputSpec const &left, OutputSpec const &right) |
static bool | match (OutputSpec const &spec, ConcreteDataMatcher const &target) |
static bool | match (InputSpec const &input, OutputSpec const &output) |
static bool | match (const InputSpec &spec, const o2::header::DataOrigin &origin, const o2::header::DataDescription &description, const o2::header::DataHeader::SubSpecificationType &subSpec) |
static bool | match (const OutputSpec &spec, const o2::header::DataOrigin &origin, const o2::header::DataDescription &description, const o2::header::DataHeader::SubSpecificationType &subSpec) |
static bool | match (const InputSpec &spec, o2::header::DataHeader const &dh) |
static bool | match (const OutputSpec &spec, o2::header::DataHeader const &dh) |
template<typename ContainerT > | |
static std::optional< typename ContainerT::value_type > | find (ContainerT const &container, const o2::header::DataOrigin &origin, const o2::header::DataDescription &description, const o2::header::DataHeader::SubSpecificationType &subSpec) |
static bool | partialMatch (InputSpec const &spec, o2::header::DataOrigin const &origin) |
template<size_t N> | |
static bool | partialMatch (InputSpec const &spec, std::array< header::DataOrigin, N > const &origins) |
static bool | partialMatch (OutputSpec const &spec, o2::header::DataOrigin const &origin) |
template<size_t N> | |
static bool | partialMatch (OutputSpec const &spec, std::array< header::DataOrigin, N > const &origins) |
static bool | partialMatch (InputSpec const &spec, o2::header::DataDescription const &description) |
static bool | partialMatch (OutputSpec const &spec, o2::header::DataDescription const &description) |
template<typename T > | |
static bool | match (const T &spec, const o2::header::DataHeader &header) |
static std::string | describe (InputSpec const &spec) |
static std::string | describe (OutputSpec const &spec) |
static std::string | label (InputSpec const &spec) |
static std::string | label (OutputSpec const &spec) |
static std::string | restEndpoint (InputSpec const &spec) |
static void | updateMatchingSubspec (InputSpec &in, header::DataHeader::SubSpecificationType subSpec) |
static void | updateMatchingSubspec (OutputSpec &in, header::DataHeader::SubSpecificationType subSpec) |
static bool | validate (InputSpec const &input) |
static bool | validate (OutputSpec const &output) |
static void | describe (char *buffer, size_t size, InputSpec const &spec) |
Same as the other describe, but uses a buffer to reduce memory churn. | |
static void | describe (char *buffer, size_t size, OutputSpec const &spec) |
Same as the other describe, but uses a buffer to reduce memory churn. | |
static ConcreteDataMatcher | asConcreteDataMatcher (InputSpec const &input) |
static ConcreteDataMatcher | asConcreteDataMatcher (OutputSpec const &spec) |
static std::optional< ConcreteDataMatcher > | asOptionalConcreteDataMatcher (OutputSpec const &spec) |
static ConcreteDataTypeMatcher | asConcreteDataTypeMatcher (OutputSpec const &spec) |
static ConcreteDataTypeMatcher | asConcreteDataTypeMatcher (InputSpec const &spec) |
static header::DataOrigin | asConcreteOrigin (InputSpec const &spec) |
static header::DataDescription | asConcreteDataDescription (InputSpec const &spec) |
static OutputSpec | asOutputSpec (InputSpec const &spec) |
static InputSpec | matchingInput (OutputSpec const &spec) |
static InputSpec | fromMetadataString (std::string s) |
Create an InputSpec from metadata string. | |
static std::optional< header::DataOrigin > | getOptionalOrigin (InputSpec const &spec) |
Get the origin, if available. | |
static std::optional< header::DataDescription > | getOptionalDescription (InputSpec const &spec) |
Get the description, if available. | |
static std::optional< header::DataHeader::SubSpecificationType > | getOptionalSubSpec (OutputSpec const &spec) |
Get the subspec, if available. | |
static std::optional< header::DataHeader::SubSpecificationType > | getOptionalSubSpec (InputSpec const &spec) |
Get the subspec, if available. | |
static data_matcher::DataDescriptorMatcher | dataDescriptorMatcherFrom (ConcreteDataMatcher const &concrete) |
Build a DataDescriptMatcher which does not care about the subSpec. | |
static data_matcher::DataDescriptorMatcher | dataDescriptorMatcherFrom (ConcreteDataTypeMatcher const &dataType) |
Build a DataDescriptMatcher which does not care about the subSpec. | |
static data_matcher::DataDescriptorMatcher | dataDescriptorMatcherFrom (header::DataOrigin const &origin) |
Build a DataDescriptMatcher which does not care about the subSpec and description. | |
static data_matcher::DataDescriptorMatcher | dataDescriptorMatcherFrom (header::DataDescription const &origin) |
Build a DataDescriptMatcher which does not care about the subSpec and origin. | |
static std::optional< framework::ConcreteDataMatcher > | optionalConcreteDataMatcherFrom (data_matcher::DataDescriptorMatcher const &matcher) |
static bool | includes (const InputSpec &left, const InputSpec &right) |
Checks if left includes right (or is equal to) | |
static void | updateInputList (std::vector< InputSpec > &list, InputSpec &&input) |
Updates list of InputSpecs by merging metadata. | |
static void | updateOutputList (std::vector< OutputSpec > &list, OutputSpec &&input) |
Updates list of OutputSpecs by merging metadata (or adding output). | |
Definition at line 26 of file DataSpecUtils.h.
|
static |
If possible extract the DataDescription from an InputSpec. This will not always be possible, depending on how complex of a query the InputSpec does, however in most cases it should be ok and we can add corner cases as we go.
Definition at line 472 of file DataSpecUtils.cxx.
|
static |
If possible extract the ConcreteDataMatcher from an InputSpec. This can be done either if the InputSpec is defined in terms for a ConcreteDataMatcher or if the query can be uniquely assigned to a ConcreteDataMatcher.
Definition at line 397 of file DataSpecUtils.cxx.
|
static |
If possible extract the ConcreteDataMatcher from an OutputSpec. For the moment this is trivial as the OutputSpec does not allow for wildcards.
std::runtime_error | if the OutputSpec contains wildcards. |
Definition at line 414 of file DataSpecUtils.cxx.
|
static |
If possible extract the ConcreteTypeDataMatcher from an InputSpec. This will not always be possible, depending on how complex of a query the InputSpec does, however in most cases it should be ok and we can add corner cases as we go.
Definition at line 440 of file DataSpecUtils.cxx.
|
static |
If possible extract the ConcreteTypeDataMatcher from an OutputSpec. This will always be possible, but implementation will have to take into account the fact that the OutputSpec might have a wildcard on the subSpec.
Definition at line 432 of file DataSpecUtils.cxx.
|
static |
If possible extract the DataOrigin from an InputSpec. This will not always be possible, depending on how complex of a query the InputSpec does, however in most cases it should be ok and we can add corner cases as we go.
Definition at line 456 of file DataSpecUtils.cxx.
|
static |
As the other asConcreteDataMatcher, but returns a std::optional and does its best to handle the case where the OutputSpec contains a wildcard.
Definition at line 419 of file DataSpecUtils.cxx.
|
static |
If possible extract either ConcreteTypeDataMatcher or ConcreteDataMatcher from an InputSpec and assign it to the matcher of the OutputSpec together with binding and lifetime If InputSpec holds a ConcreteDataMatcher, this will be used directly, if it is a DataDescriptorMatcher, depending on its complexity the ConcreteDataMatcher or ConcreteTypeDataMatcher will be created
Definition at line 488 of file DataSpecUtils.cxx.
|
static |
Build a DataDescriptMatcher which does not care about the subSpec.
Definition at line 507 of file DataSpecUtils.cxx.
|
static |
Build a DataDescriptMatcher which does not care about the subSpec.
Definition at line 523 of file DataSpecUtils.cxx.
|
static |
Build a DataDescriptMatcher which does not care about the subSpec and origin.
Definition at line 554 of file DataSpecUtils.cxx.
|
static |
Build a DataDescriptMatcher which does not care about the subSpec and description.
Definition at line 536 of file DataSpecUtils.cxx.
|
static |
Same as the other describe, but uses a buffer to reduce memory churn.
Definition at line 90 of file DataSpecUtils.cxx.
|
static |
Same as the other describe, but uses a buffer to reduce memory churn.
Definition at line 108 of file DataSpecUtils.cxx.
|
static |
Describes an InputSpec. Use this to get some human readable version of the contents of the InputSpec. Notice this is not part of the InputSpec API, because there is no unique way a description should be done, so we keep this outside.
Definition at line 70 of file DataSpecUtils.cxx.
|
static |
Describes an OutputSpec. Use this to get some human readable version of the contents of the OutputSpec.
Definition at line 82 of file DataSpecUtils.cxx.
|
inlinestatic |
find a matching spec in the container
Definition at line 67 of file DataSpecUtils.h.
|
static |
Create an InputSpec from metadata string.
Definition at line 668 of file DataSpecUtils.cxx.
|
static |
Get the description, if available.
Definition at line 706 of file DataSpecUtils.cxx.
|
static |
Get the origin, if available.
Definition at line 687 of file DataSpecUtils.cxx.
|
static |
Get the subspec, if available.
Definition at line 737 of file DataSpecUtils.cxx.
|
static |
Get the subspec, if available.
Definition at line 725 of file DataSpecUtils.cxx.
|
static |
Checks if left includes right (or is equal to)
Definition at line 756 of file DataSpecUtils.cxx.
|
static |
Provide a unique label for the input spec. Again this is outside because there is no standard way of doing it, so better not to pollute the API.
Definition at line 124 of file DataSpecUtils.cxx.
|
static |
Provide a unique label for the input spec. Again this is outside because there is no standard way of doing it, so better not to pollute the API.
Definition at line 140 of file DataSpecUtils.cxx.
|
static |
Definition at line 42 of file DataSpecUtils.cxx.
|
inlinestatic |
Definition at line 54 of file DataSpecUtils.h.
|
static |
Definition at line 51 of file DataSpecUtils.cxx.
|
inlinestatic |
Definition at line 59 of file DataSpecUtils.h.
|
inlinestatic |
Definition at line 108 of file DataSpecUtils.h.
|
static |
Definition at line 271 of file DataSpecUtils.cxx.
|
static |
Definition at line 232 of file DataSpecUtils.cxx.
|
static |
Definition at line 210 of file DataSpecUtils.cxx.
|
static |
Definition at line 257 of file DataSpecUtils.cxx.
|
static |
Definition at line 244 of file DataSpecUtils.cxx.
|
static |
Create an InputSpec which is able to match all the outputs of the given OutputSpec
Definition at line 647 of file DataSpecUtils.cxx.
|
static |
return fully qualified ConcreteDataMatcher if DataMatcher is connecting unique properties via 'and' operation
Definition at line 572 of file DataSpecUtils.cxx.
|
static |
Definition at line 290 of file DataSpecUtils.cxx.
|
static |
Definition at line 285 of file DataSpecUtils.cxx.
|
inlinestatic |
Definition at line 85 of file DataSpecUtils.h.
|
static |
Definition at line 299 of file DataSpecUtils.cxx.
|
static |
Definition at line 279 of file DataSpecUtils.cxx.
|
inlinestatic |
Definition at line 95 of file DataSpecUtils.h.
|
static |
Provides the to be used as suffix for any REST endpoint related to the spec.
Definition at line 149 of file DataSpecUtils.cxx.
|
static |
Updates list of InputSpecs by merging metadata.
Definition at line 783 of file DataSpecUtils.cxx.
|
static |
Given an InputSpec, manipulate it so that it will match only the given subSpec.
Definition at line 158 of file DataSpecUtils.cxx.
|
static |
Given an OutputSpec, manipulate it so that it will match only the given subSpec.
Definition at line 169 of file DataSpecUtils.cxx.
|
static |
Updates list of OutputSpecs by merging metadata (or adding output).
Definition at line 799 of file DataSpecUtils.cxx.
|
static |
Definition at line 185 of file DataSpecUtils.cxx.
|
static |
Definition at line 200 of file DataSpecUtils.cxx.