diff --git a/Framework/Core/include/Framework/OutputSpec.h b/Framework/Core/include/Framework/OutputSpec.h index 0f4974ef88702..da1e5df5a2bad 100644 --- a/Framework/Core/include/Framework/OutputSpec.h +++ b/Framework/Core/include/Framework/OutputSpec.h @@ -73,6 +73,8 @@ struct OutputSpec { return origin == that.origin && description == that.description && subSpec == that.subSpec && lifetime == that.lifetime; }; + + friend std::ostream& operator<<(std::ostream& stream, OutputSpec const& arg); }; } // namespace framework diff --git a/Framework/Core/src/StreamOperators.cxx b/Framework/Core/src/StreamOperators.cxx index 3d4a0793a8122..cd3cb88c67934 100644 --- a/Framework/Core/src/StreamOperators.cxx +++ b/Framework/Core/src/StreamOperators.cxx @@ -8,8 +8,11 @@ // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -#include #include "Framework/InputSpec.h" +#include "Framework/OutputSpec.h" + +#include +#include namespace o2 { @@ -23,5 +26,12 @@ std::ostream& operator<<(std::ostream& stream, o2::framework::InputSpec const& a return stream; } +std::ostream& operator<<(std::ostream& stream, o2::framework::OutputSpec const& arg) +{ + // FIXME: should have stream operators for the header fields + stream << arg.binding.value << " {" << arg.origin.as() << ":" << arg.description.as() << ":" << arg.subSpec << "}"; + return stream; +} + } // namespace framework } // namespace o2