1 #ifndef art_Framework_Principal_SummedValue_h 2 #define art_Framework_Principal_SummedValue_h 51 #include "cetlib_except/demangle.h" 63 "art error: SummedValue<T>'s only support types that can be aggregated.\n" 64 " Please contact artists@fnal.gov.\n");
67 std::enable_if_t<detail::is_handle_v<H>>
update(H
const& h);
70 std::enable_if_t<detail::is_handle_v<H>>
update(H
const& h, T
const& t);
78 T
const&
value()
const;
89 auto const& newRS = h.provenance()->rangeOfValidity();
96 "SummedValue<T>::update"}
97 <<
"\nThe following ranges corresponding to the type:\n" 98 <<
" '" << cet::demangle_symbol(
typeid(T).name()) <<
"'" 100 <<
" vs. " << newRS.run() <<
") and cannot be aggregated.\n" 101 <<
"Please contact artists@fnal.gov.\n";
114 "SummedValue<T>::update"}
115 <<
"\nThe following ranges corresponding to the type:\n" 116 <<
" '" << cet::demangle_symbol(
typeid(T).name()) <<
"'" 117 <<
"\ncannot be aggregated\n" 119 << newRS <<
"\nPlease contact artists@fnal.gov.\n";
131 template <
typename T>
132 template <
typename H>
133 std::enable_if_t<detail::is_handle_v<H>>
136 std::string
const& errMsg{
"Attempt to update " +
137 cet::demangle_symbol(
typeid(*this).name()) +
138 " from an invalid handle."};
143 template <
typename T>
144 template <
typename H>
145 std::enable_if_t<detail::is_handle_v<H>>
148 std::string
const& errMsg{
"Attempt to update " +
149 cet::demangle_symbol(
typeid(*this).name()) +
150 " from an invalid handle.\n"};
155 template <
typename T>
160 std::swap(*
this,
tmp);
163 template <
typename T>
170 template <
typename T>
177 template <
typename T>
184 template <
class T,
class U>
191 template <
class T,
class U>
198 template <
class T,
class U>
RangeSet rangeOfValidity_
std::enable_if_t< detail::are_handles_v< T, U >, bool > overlapping_ranges(T const &a, U const &b)
std::enable_if_t< detail::are_handles_v< T, U >, bool > disjoint_ranges(T const &a, U const &b)
static void aggregate(T &, T const &)
RangeSet const & rangeOfValidity() const
void throw_if_invalid(std::string const &msg, T const &...t)
std::enable_if_t< detail::is_handle_v< H > > update(H const &h)
void update_impl(H const &h, T const &t)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
std::enable_if_t< detail::are_handles_v< T, U >, bool > same_ranges(T const &a, U const &b)
static RangeSet invalid()
RangeSet & merge(RangeSet const &other)