1 #ifndef art_Framework_Principal_GroupFactory_h 2 #define art_Framework_Principal_GroupFactory_h 10 #include "canvas_root_io/Utilities/getWrapperTIDs.h" 11 #include "cetlib/exempt_ptr.h" 18 class BranchDescription;
25 std::unique_ptr<Group>
make_group(BranchDescription
const&,
29 std::unique_ptr<Group>
make_group(BranchDescription
const&,
32 cet::exempt_ptr<Worker> productProducer);
34 std::unique_ptr<Group>
make_group(BranchDescription
const&,
37 std::unique_ptr<EDProduct>&&);
43 inline std::unique_ptr<art::Group>
51 inline std::unique_ptr<art::Group>
55 cet::exempt_ptr<Worker> productProducer)
60 inline std::unique_ptr<art::Group>
64 std::unique_ptr<EDProduct>&& edp)
70 template <
typename... ARGS>
71 std::unique_ptr<art::Group>
74 std::unique_ptr<Group> result;
75 auto tids = art::root::getWrapperTIDs(pd);
76 switch (tids.size()) {
80 result = std::unique_ptr<Group>(
81 new Group(pd, std::forward<ARGS>(args)..., tids[0]));
86 result = std::unique_ptr<AssnsGroup>(
87 new AssnsGroup(pd, std::forward<ARGS>(args)..., tids[0], tids[1]));
93 pd, std::forward<ARGS>(args)..., tids[0], tids[1], tids[2], tids[3]));
98 <<
"While making groups, internal function getWrapperTIDs() returned " 99 "an unexpected answer of size " 100 << tids.size() <<
".\n";
std::unique_ptr< Group > make_group(BranchDescription const &pd, ARGS &&...args)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
std::unique_ptr< Group > make_group(BranchDescription const &, ProductID const &, RangeSet &&)