File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,8 @@ struct LifetimeHelpers {
9090 static ExpirationHandler::Handler dummy (ConcreteDataMatcher const & spec, std::string const & sourceChannel);
9191};
9292
93+ std::ostream& operator <<(std::ostream& oss, Lifetime const & val);
94+
9395} // namespace o2::framework
9496
9597#endif // O2_FRAMEWORK_LIFETIMEHELPERS_H_
Original file line number Diff line number Diff line change @@ -482,4 +482,24 @@ ExpirationHandler::Handler LifetimeHelpers::dummy(ConcreteDataMatcher const& mat
482482 return f;
483483}
484484
485+ // Life is too short. LISP rules.
486+ #define STREAM_ENUM (x ) \
487+ case x: \
488+ oss << #x; \
489+ break ;
490+ std::ostream& operator <<(std::ostream& oss, Lifetime const & val)
491+ {
492+ switch (val) {
493+ STREAM_ENUM (Lifetime::Timeframe)
494+ STREAM_ENUM (Lifetime::Condition)
495+ STREAM_ENUM (Lifetime::QA)
496+ STREAM_ENUM (Lifetime::Transient)
497+ STREAM_ENUM (Lifetime::Timer)
498+ STREAM_ENUM (Lifetime::Enumeration)
499+ STREAM_ENUM (Lifetime::Signal)
500+ STREAM_ENUM (Lifetime::Optional)
501+ };
502+ return oss;
503+ }
504+
485505} // namespace o2::framework
You can’t perform that action at this time.
0 commit comments