Skip to content

Commit

Permalink
Make it compile and work
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Jan 31, 2025
1 parent 46729ae commit 7330060
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions k4FWCore/include/k4FWCore/FunctionalUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ namespace k4FWCore {
inputMap.push_back(get(handle, thisClass, Gaudi::Hive::currentContext()).get());
} else {
podio::CollectionBase* in = handle.get()->get();
inputMap.push_back(dynamic_cast<EDM4hepType*>(in));
inputMap.push_back(static_cast<const EDM4hepType*>(in));
}
}
std::get<Index>(inputTuple) = std::move(inputMap);
} else {
using EDM4hepType = std::remove_cvref_t<std::remove_pointer_t<typename TupleType::value_type>>;
using EDM4hepType = std::remove_cvref_t<std::remove_pointer_t<TupleType>>;
try {
podio::CollectionBase* in = std::get<Index>(handles)[0].get()->get();
auto* typedIn = dynamic_cast<EDM4hepType*>(in);
const podio::CollectionBase* in = std::get<Index>(handles)[0].get()->get();
std::get<Index>(inputTuple) = const_cast<EDM4hepType*>(static_cast<const EDM4hepType*>(in));
} catch (GaudiException& e) {
// When the type of the collection is different from the one requested, this can happen because
// 1. a mistake was made in the input types of a functional algorithm
Expand Down

0 comments on commit 7330060

Please sign in to comment.