LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
EDProduct.cc
Go to the documentation of this file.
1 // ======================================================================
2 //
3 // EDProduct: The base class of each type that will be inserted into the
4 // Event.
5 //
6 // ======================================================================
7 
9 
10 using art::EDProduct;
11 
12 EDProduct::~EDProduct() = default;
13 
14 std::vector<void const*>
15 EDProduct::getView() const
16 { /* should be called only polymorphically */
17  return {};
18 }
19 
20 std::type_info const*
22 {
23  return typeInfo_();
24 }
25 
26 void const*
27 EDProduct::getElementAddress(std::type_info const& toType,
28  unsigned long const index) const
29 {
30  return do_getElementAddress(toType, index);
31 }
32 
33 std::vector<void const*>
34 EDProduct::getElementAddresses(std::type_info const& toType,
35  std::vector<unsigned long> const& indices) const
36 {
37  return do_getElementAddresses(toType, indices);
38 }
39 
40 // ======================================================================
virtual std::vector< void const * > do_getElementAddresses(std::type_info const &toType, std::vector< unsigned long > const &indices) const =0
constexpr std::array< std::size_t, geo::vect::dimension< Vector >)> indices()
Returns a sequence of indices valid for a vector of the specified type.
virtual std::type_info const * typeInfo() const
Definition: EDProduct.cc:21
virtual void const * do_getElementAddress(std::type_info const &toType, unsigned long index) const =0
virtual std::type_info const * typeInfo_() const =0
std::vector< void const * > getElementAddresses(std::type_info const &toType, std::vector< unsigned long > const &indices) const
Definition: EDProduct.cc:34
void const * getElementAddress(std::type_info const &toType, unsigned long index) const
Definition: EDProduct.cc:27