29std::string
getString(std::string_view baseName, std::string_view suffix)
31 return std::string(baseName) + std::string(suffix);
56 std::string sbind(bind.data());
59 sbind += fmt::format(
"_{}", subSpec);
60 suffix += fmt::format(
"/{}", subSpec);
62 return fmt::format(
"{}:MID/{}{}", sbind,
description, suffix);
65std::string
buildSelectors(std::string_view dataBind, std::string_view dataDesc, std::string_view rofDesc, std::string_view labelsDesc,
bool useMC,
int subSpec = -1)
68 if (!dataDesc.empty()) {
71 if (!rofDesc.empty()) {
72 if (!selector.empty()) {
77 if (useMC && !labelsDesc.empty()) {
78 if (!selector.empty()) {
86std::vector<framework::InputSpec>
buildInputSpecs(std::string_view dataBind, std::string_view dataDesc, std::string_view rofDesc)
89 for (
size_t ievt = 0; ievt <
NEvTypes; ++ievt) {
90 if (!selector.empty()) {
93 selector +=
buildSelectors(dataBind, dataDesc, rofDesc,
"",
false, ievt);
98std::vector<framework::InputSpec>
buildStandardInputSpecs(std::string_view dataBind, std::string_view dataDesc,
bool useMC)
103std::vector<framework::InputSpec>
buildStandardInputSpecs(std::string_view dataBind, std::string_view dataDesc, std::string_view rofDesc, std::string_view labelsDesc,
bool useMC)
105 std::string selector =
buildSelectors(dataBind, dataDesc, rofDesc, labelsDesc, useMC, 0);
111 std::string selector;
112 for (
size_t ievt = 0; ievt <
NEvTypes; ++ievt) {
113 if (!selector.empty()) {
119 std::vector<framework::OutputSpec> outputSpecs;
130 std::vector<framework::OutputSpec> outputSpecs;
137std::vector<framework::Output>
buildOutputs(std::vector<framework::OutputSpec> outputSpecs)
139 std::vector<framework::Output> outputs;
140 for (
auto& outSpec : outputSpecs) {
149 std::array<gsl::span<const ColumnData>, 3>
data;
150 for (
size_t ievt = 0; ievt <
NEvTypes; ++ievt) {
151 data[ievt] = getInput<ColumnData>(pc, dataBind, ievt);
159 return getInput<ColumnData>(pc, dataBind.data(),
static_cast<int>(eventType));
164 std::array<gsl::span<const ROFRecord>, 3>
data;
165 for (
size_t ievt = 0; ievt <
NEvTypes; ++ievt) {
174 return getInput<ROFRecord>(pc,
getROFBind(dataBind).
data(),
static_cast<int>(eventType));
std::vector< framework::ConcreteDataMatcher > matchers
header::DataDescription description
Utilities for MID Column Data Specs.
InputRecord & inputs()
The inputs associated with this processing context.
std::vector< InputSpec > select(char const *matcher="")
std::vector< framework::InputSpec > buildStandardInputSpecs(std::string_view dataBind, std::string_view dataDesc, bool useMC)
std::string getROFDescription(std::string_view description)
std::string getLabelsBind(std::string_view baseName)
std::string getLabelsDescription(std::string_view description)
std::string getString(std::string_view baseName, std::string_view suffix)
std::unique_ptr< const o2::dataformats::MCTruthContainer< MCLabel > > getLabels(framework::ProcessingContext &pc, std::string_view dataBind, EventType eventType=EventType::Standard)
std::vector< framework::OutputSpec > buildStandardOutputSpecs(std::string_view dataBind, std::string_view dataDesc, bool useMC)
std::vector< framework::Output > buildOutputs(std::vector< framework::OutputSpec > outputSpecs)
std::string buildSelectors(std::string_view dataBind, std::string_view dataDesc, std::string_view rofDesc, std::string_view labelsDesc, bool useMC, int subSpec=-1)
std::vector< framework::InputSpec > buildInputSpecs(std::string_view dataBind, std::string_view dataDesc, std::string_view rofDesc)
std::vector< framework::OutputSpec > buildOutputSpecs(std::string_view bind, std::string_view description)
std::string getROFBind(std::string_view baseName)
std::string buildSelector(std::string_view bind, std::string_view description, int subSpec=-1)
std::array< gsl::span< const ROFRecord >, NEvTypes > getRofs(framework::ProcessingContext &pc, std::string_view dataBind)
constexpr uint32_t NEvTypes
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
header::DataDescription description
header::DataHeader::SubSpecificationType subSpec
header::DataOrigin origin
static ConcreteDataMatcher asConcreteDataMatcher(InputSpec const &input)
static OutputSpec asOutputSpec(InputSpec const &spec)