LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
SumSecondFunction.h
Go to the documentation of this file.
1 
23 #ifndef Utilities_SumSecondFunction_h
24 #define Utilities_SumSecondFunction_h
25 
26 #include <functional>
27 
28 namespace util {
29 
30  template <typename _Key, typename _Value, typename _BinaryOperation = std::plus<_Value>>
32  _Value operator()(const _Value& value, const std::pair<_Key, _Value>& entry) const
33  {
34  return _BinaryOperation{}(value, entry.second);
35  }
36  };
37 
38 } // namespace util
39 
40 #endif // Utilities_SumSecondFunction_h
Namespace for general, non-LArSoft-specific utilities.
Definition: PIDAAlg.h:26
double value
Definition: spectrum.C:18
_Value operator()(const _Value &value, const std::pair< _Key, _Value > &entry) const