Skip to content

Commit

Permalink
Fix wrong error message when using std::map as input or output with t…
Browse files Browse the repository at this point in the history
…ransformers (#221)
  • Loading branch information
jmcarcell authored Aug 9, 2024
1 parent bcb3f15 commit f80abc4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions k4FWCore/include/k4FWCore/Transformer.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ namespace k4FWCore {
using Gaudi::Functional::details::DataHandleMixin<std::tuple<>, std::tuple<>, Traits_>::DataHandleMixin;

static_assert(((std::is_base_of_v<podio::CollectionBase, In> || isVectorLike_v<In>)&&...),
"Transformer and Producer input types must be EDM4hep collections or maps to collections");
"Transformer and Producer input types must be EDM4hep collections or vectors of collections");
static_assert((std::is_base_of_v<podio::CollectionBase, Out> || isVectorLike_v<Out> ||
std::is_same_v<std::shared_ptr<podio::CollectionBase>, Out>),
"Transformer and Producer output types must be EDM4hep collections or maps to collections");
"Transformer and Producer output types must be EDM4hep collections or vectors of collections");

template <typename T>
using InputHandle_t = Gaudi::Functional::details::InputHandle_t<Traits_, std::remove_pointer_t<T>>;
Expand Down Expand Up @@ -184,9 +184,9 @@ namespace k4FWCore {
using Gaudi::Functional::details::DataHandleMixin<std::tuple<>, std::tuple<>, Traits_>::DataHandleMixin;

static_assert(((std::is_base_of_v<podio::CollectionBase, In> || isVectorLike<In>::value) && ...),
"Transformer and Producer input types must be EDM4hep collections or maps to collections");
"Transformer and Producer input types must be EDM4hep collections or vectors of collections");
static_assert(((std::is_base_of_v<podio::CollectionBase, Out> || isVectorLike<Out>::value) && ...),
"Transformer and Producer output types must be EDM4hep collections or maps to collections");
"Transformer and Producer output types must be EDM4hep collections or vectors of collections");

template <typename T>
using InputHandle_t = Gaudi::Functional::details::InputHandle_t<Traits_, std::remove_pointer_t<T>>;
Expand Down

0 comments on commit f80abc4

Please sign in to comment.