LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
AssnsGroupWithData.h
Go to the documentation of this file.
1 #ifndef art_Framework_Principal_AssnsGroupWithData_h
2 #define art_Framework_Principal_AssnsGroupWithData_h
3 
6 #include "art/Utilities/fwd.h"
8 #include "cetlib/exempt_ptr.h"
9 
10 namespace art {
11  class AssnsGroupWithData;
12 }
13 
15 
16  // The operative part of the GroupFactory system.
17  template <typename... ARGS>
18  friend std::unique_ptr<Group> gfactory::detail::make_group(
19  BranchDescription const&,
20  ARGS&&... args);
21 
22 public:
23  AssnsGroupWithData() = default;
24 
25 protected:
27  BranchDescription const& pd,
28  ProductID const& pid,
29  RangeSet&& rs,
30  TypeID const& primary_wrapper_type,
31  TypeID const& partner_wrapper_type,
32  TypeID const& base_wrapper_type,
33  TypeID const& partner_base_wrapper_type,
34  std::unique_ptr<EDProduct>&& edp = nullptr,
35  cet::exempt_ptr<Worker> productProducer = cet::exempt_ptr<Worker>())
36  : AssnsGroup(pd,
37  pid,
38  std::move(rs),
39  primary_wrapper_type,
40  partner_wrapper_type,
41  std::move(edp),
42  productProducer)
43  , baseWrapperType_{base_wrapper_type}
44  , partnerBaseWrapperType_{partner_base_wrapper_type}
45  , baseProduct_{}
47  {}
48 
50  ProductID const& pid,
51  RangeSet&& rs,
52  std::unique_ptr<EDProduct>&& edp,
53  TypeID const& primary_wrapper_type,
54  TypeID const& partner_wrapper_type,
55  TypeID const& base_wrapper_type,
56  TypeID const& partner_base_wrapper_type)
57  : AssnsGroupWithData(pd,
58  pid,
59  std::move(rs),
60  primary_wrapper_type,
61  partner_wrapper_type,
62  base_wrapper_type,
63  partner_base_wrapper_type,
64  std::move(edp))
65  {}
66 
68  ProductID const& pid,
69  RangeSet&& rs,
70  cet::exempt_ptr<Worker> productProducer,
71  TypeID const& primary_wrapper_type,
72  TypeID const& partner_wrapper_type,
73  TypeID const& base_wrapper_type,
74  TypeID const& partner_base_wrapper_type)
75  : AssnsGroupWithData(pd,
76  pid,
77  std::move(rs),
78  primary_wrapper_type,
79  partner_wrapper_type,
80  base_wrapper_type,
81  partner_base_wrapper_type,
82  nullptr,
83  productProducer)
84  {}
85 
86  EDProduct const* anyProduct() const override;
87 
89 
90  EDProduct const* uniqueProduct(
91  TypeID const& wanted_wrapper_type) const override;
92 
93  bool resolveProductIfAvailable(TypeID const&) const override;
94 
95  void removeCachedProduct() const override;
96 
97 private:
100  mutable std::unique_ptr<EDProduct> baseProduct_;
101  mutable std::unique_ptr<EDProduct> partnerBaseProduct_;
102 };
103 
104 #endif /* art_Framework_Principal_AssnsGroupWithData_h */
105 
106 // Local Variables:
107 // mode: c++
108 // End:
EDProduct const * uniqueProduct() const override
Definition: AssnsGroup.cc:23
std::unique_ptr< EDProduct > partnerBaseProduct_
AssnsGroupWithData(BranchDescription const &pd, ProductID const &pid, RangeSet &&rs, cet::exempt_ptr< Worker > productProducer, TypeID const &primary_wrapper_type, TypeID const &partner_wrapper_type, TypeID const &base_wrapper_type, TypeID const &partner_base_wrapper_type)
EDProduct const * anyProduct() const override
std::unique_ptr< Group > make_group(BranchDescription const &pd, ARGS &&...args)
STL namespace.
std::unique_ptr< EDProduct > baseProduct_
bool resolveProductIfAvailable(TypeID const &) const override
void removeCachedProduct() const override
AssnsGroupWithData(BranchDescription const &pd, ProductID const &pid, RangeSet &&rs, std::unique_ptr< EDProduct > &&edp, TypeID const &primary_wrapper_type, TypeID const &partner_wrapper_type, TypeID const &base_wrapper_type, TypeID const &partner_base_wrapper_type)
HLT enums.
AssnsGroupWithData(BranchDescription const &pd, ProductID const &pid, RangeSet &&rs, TypeID const &primary_wrapper_type, TypeID const &partner_wrapper_type, TypeID const &base_wrapper_type, TypeID const &partner_base_wrapper_type, std::unique_ptr< EDProduct > &&edp=nullptr, cet::exempt_ptr< Worker > productProducer=cet::exempt_ptr< Worker >())