1 #ifndef canvas_Persistency_Common_detail_aggregate_h 2 #define canvas_Persistency_Common_detail_aggregate_h 8 #include "cetlib_except/demangle.h" 24 class HepLorentzVector;
35 template <
typename T,
typename =
void>
50 template <
typename T,
typename Enable =
void>
56 <<
"Products of type \"" << cet::demangle_symbol(
typeid(
T).
name())
57 <<
"\" cannot be aggregated.\n" 58 <<
"Please contact artists@fnal.gov.\n";
89 p.insert(p.cend(), other.cbegin(), other.cend());
98 p.insert(p.cend(), other.cbegin(), other.cend());
102 template <
typename T>
107 p.insert(p.cend(), other.cbegin(), other.cend());
112 template <
typename T,
size_t N>
125 template <std::
size_t>
130 template <
typename Tuple>
136 template <std::
size_t I>
138 template <
typename Tuple>
142 using elem_type = std::tuple_element_t<I, Tuple>;
149 template <
typename... Args>
158 template <
typename K,
typename V>
164 p.insert(other.cbegin(), other.cend());
168 template <
typename K,
typename V>
178 template <
typename K,
typename V>
183 p.insert(other.cbegin(), other.cend());
187 template <
typename T>
193 p.insert(other.cbegin(), other.cend());
197 template <
typename T>
215 <<
"Products of type \"" 217 <<
"\" cannot be aggregated unless their values are the same.\n" 218 <<
"Values presented were: \"" << p <<
"\" and \"" << other
228 static void aggregate(CLHEP::HepVector&
p, CLHEP::HepVector
const&
other);
233 static void aggregate(CLHEP::Hep2Vector&
p, CLHEP::Hep2Vector
const&
other);
238 static void aggregate(CLHEP::Hep3Vector&
p, CLHEP::Hep3Vector
const&
other);
243 static void aggregate(CLHEP::HepLorentzVector&
p,
244 CLHEP::HepLorentzVector
const&
other);
249 static void aggregate(CLHEP::HepMatrix&
p, CLHEP::HepMatrix
const&
other);
254 static void aggregate(CLHEP::HepSymMatrix&
p,
255 CLHEP::HepSymMatrix
const&
other);
272 template <
typename T>
static void aggregate(std::set< T > &p, std::set< T > const &other)
const_iterator cend() const noexcept
static void aggregate(T &p, T const &other)
std::pair< iterator, bool > insert(value_type const &x)
enable_if_same_t< FT, decltype(f), R > enable_if_function_exists_t
static void aggregate(T &p, T const other)
static void aggregate(std::tuple< Args... > &p, std::tuple< Args... > const &other)
static void aggregate(T &, T const &)
static void aggregate(std::string &p, std::string const &other)
static void combine(Tuple &, Tuple const &)
static void aggregate(std::array< T, N > &p, std::array< T, N > const &other)
auto transform_all(Container &, OutputIt, UnaryOp)
static void aggregate(std::deque< T > &p, std::deque< T > const &other)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
auto array(Array const &a)
Returns a manipulator which will print the specified array.
static void aggregate(std::list< T > &p, std::list< T > const &other)
static void combine(Tuple &p, Tuple const &other)
static void aggregate(cet::map_vector< T > &p, cet::map_vector< T > const &other)
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
static void aggregate(std::multimap< K, V > &p, std::multimap< K, V > const &other)
static void aggregate(std::map< K, V > &p, std::map< K, V > const &other)
static void aggregate(T &p, T const &other)
static void aggregate(std::vector< T > &p, std::vector< T > const &other)
const_iterator cbegin() const noexcept
static void aggregate(std::pair< K, V > &p, std::pair< K, V > const &other)