File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 26
26
#include < random>
27
27
#include < string>
28
28
29
+ template <typename List1, typename List2>
30
+ struct ConcatTypeLists ;
31
+
32
+ template <template <typename ...> class List , typename ... Ts, typename ... Us>
33
+ struct ConcatTypeLists <List<Ts...>, List<Us...>> {
34
+ using type = List<Ts..., Us...>;
35
+ };
36
+
29
37
struct EfficiencyFilter final : k4FWCore::Transformer<podio::CollectionBase*(const podio::CollectionBase&,
30
38
const edm4hep::EventHeaderCollection&)> {
31
39
EfficiencyFilter (const std::string& name, ISvcLocator* svcLoc)
@@ -60,12 +68,8 @@ struct EfficiencyFilter final : k4FWCore::Transformer<podio::CollectionBase*(con
60
68
61
69
const auto uid = m_uniqueIDSvc->getUniqueID (evtHeader, name ());
62
70
63
- auto ptr = dispatchByType (
64
- coll, uid,
65
- edm4hep::edm4hepDataTypes{}); // Dispatch to the correct createSubsetCollection template function based on type
66
- if (!ptr) {
67
- ptr = dispatchByType (coll, uid, edm4hep::edm4hepLinkTypes{}); // Try link types if not found in data types
68
- }
71
+ using AllTypes = typename ConcatTypeLists<edm4hep::edm4hepDataTypes, edm4hep::edm4hepLinkTypes>::type;
72
+ auto ptr = dispatchByType (coll, uid, AllTypes{});
69
73
if (!ptr) {
70
74
throw std::runtime_error (fmt::format (
71
75
" EfficiencyFilter: No createSubsetCollection function found for collection type '{}'" , coll.getTypeName ()));
You can’t perform that action at this time.
0 commit comments