3434#include " DataFormatsMID/ColumnData.h"
3535#include " DataFormatsMID/ROFRecord.h"
3636#include " DataFormatsMID/MCLabel.h"
37+ #include " Framework/Logger.h"
3738
3839namespace o2
3940{
@@ -42,21 +43,28 @@ namespace mid
4243namespace specs
4344{
4445
45- // / Returns the input specs for MID Column Data and corresponding ROFs and labels
46+ // / Returns the input specs for MID Column Data and corresponding ROFs and labels for EventType Standard
4647// / \param dataBind Data binding name
4748// / \param dataDesc Input data description
4849// / \param useMC Builds output specs for labels
4950// / \return Vector of input specs
50- std::vector<framework::InputSpec> buildInputSpecs (std::string_view dataBind, std::string_view dataDesc, bool useMC);
51+ std::vector<framework::InputSpec> buildStandardInputSpecs (std::string_view dataBind, std::string_view dataDesc, bool useMC);
5152
52- // / Returns the input specs for MID Column Data and corresponding ROFs and labels
53+ // / Returns the input specs for MID Column Data and corresponding ROFs and labels for EventType Standard
5354// / \param dataBind Data binding name
5455// / \param dataDesc Input data description
5556// / \param rofDesc Input ROF record description
5657// / \param labelsDesc Input MC labels description
5758// / \param useMC Builds output specs for labels
5859// / \return Vector of input specs
59- std::vector<framework::InputSpec> buildInputSpecs (std::string_view dataBind, std::string_view dataDesc, std::string_view rofDesc, std::string_view labelsDesc, bool useMC);
60+ std::vector<framework::InputSpec> buildStandardInputSpecs (std::string_view dataBind, std::string_view dataDesc, std::string_view rofDesc, std::string_view labelsDesc, bool useMC);
61+
62+ // / Returns the input specs for MID Column Data and corresponding ROFs and labels for all three EventTypes
63+ // / \param dataBind Data binding name
64+ // / \param dataDesc Input data description
65+ // / \param rofDesc Input ROF record description
66+ // / \return Vector of input specs
67+ std::vector<framework::InputSpec> buildInputSpecs (std::string_view dataBind, std::string_view dataDesc, std::string_view rofDesc);
6068
6169// / Returns the output specs for the different event types
6270// / \param bind Binding name
@@ -71,30 +79,27 @@ std::vector<framework::OutputSpec> buildOutputSpecs(std::string_view bind, std::
7179// / \return Vector of Output specs
7280std::vector<framework::OutputSpec> buildStandardOutputSpecs (std::string_view dataBind, std::string_view dataDesc, bool useMC);
7381
74- // / Returns the inputs for the different event types
82+ // / Returns the input matching a specific binding
7583// / \param pc Processing context
7684// / \param bind Binding name
7785// / \return Array of spans
7886template <typename T>
79- std::array< gsl::span<const T>, NEvTypes > getInput (framework::ProcessingContext& pc, std::string_view bind)
87+ gsl::span<const T> getInput (framework::ProcessingContext& pc, std::string_view bind)
8088{
81- std::array<gsl::span<const T>, 3 > data;
8289 for (auto const & inputRef : framework::InputRecordWalker (pc.inputs ())) {
83- auto const * dh = framework::DataRefUtils::getHeader<o2::header::DataHeader*>(inputRef);
84- auto subSpecIdx = static_cast <size_t >(dh->subSpecification );
8590 if (framework::DataRefUtils::match (inputRef, bind.data ())) {
86- data[subSpecIdx] = pc.inputs ().get <gsl::span<T>>(inputRef);
91+ return pc.inputs ().get <gsl::span<T>>(inputRef);
8792 }
8893 }
89- return data ;
94+ return gsl::span< const T>() ;
9095}
9196
9297// / Gets the outputs
9398// / \param outputSpecs Vector of output specs
9499// / \return vector of outputs
95100std::vector<framework::Output> buildOutputs (std::vector<framework::OutputSpec> outputSpecs);
96101
97- // / Returns the array of Column Data
102+ // / Returns the array of Column Data for all three EventTypes
98103// / \param pc Processing context
99104// / \param dataBind Data binding name
100105// / \return Array of Column Data spans
@@ -105,9 +110,9 @@ std::array<gsl::span<const ColumnData>, NEvTypes> getData(framework::ProcessingC
105110// / \param dataBind Data binding name
106111// / \param eventType Event type
107112// / \return Span of ColumnData
108- gsl::span<const ColumnData> getData (framework::ProcessingContext& pc, std::string_view dataBind, EventType eventType);
113+ gsl::span<const ColumnData> getDataEventType (framework::ProcessingContext& pc, std::string_view dataBind, EventType eventType);
109114
110- // / Returns the array of ROF records
115+ // / Returns the array of ROF records for all three EventTypes
111116// / \param pc Processing context
112117// / \param dataBind Data binding name
113118// / \return Array of ROF Records spans
@@ -118,7 +123,7 @@ std::array<gsl::span<const ROFRecord>, NEvTypes> getRofs(framework::ProcessingCo
118123// / \param dataBind Data binding name
119124// / \param eventType Event type
120125// / \return Span of ROF records
121- gsl::span<const ROFRecord> getRofs (framework::ProcessingContext& pc, std::string_view dataBind, EventType eventType);
126+ gsl::span<const ROFRecord> getRofsEventType (framework::ProcessingContext& pc, std::string_view dataBind, EventType eventType);
122127
123128// / Returns the MC labels
124129// / \param pc Processing context
0 commit comments