LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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  : public std::binary_function< _Value,
33  std::pair<_Key, _Value>,
34  _Value >
35  {
36  public:
37  const _Value operator() ( const _Value& value,
38  const std::pair<_Key, _Value>& entry ) const
39  {
40  return _BinaryOperation()( value, entry.second );
41  }
42  };
43 
44 } // namespace util
45 
46 #endif // Utilities_SumSecondFunction_h
47 
48 
Namespace for general, non-LArSoft-specific utilities.
Definition: PIDAAlg.h:17
const _Value operator()(const _Value &value, const std::pair< _Key, _Value > &entry) const
std::string value(boost::any const &)