LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
lar::util::details::hash< T > Struct Template Reference

Hash functions for art and larsoft objects. More...

#include "FindAllP.h"

Public Types

using result_type = size_t
 
using argument_type = T
 

Public Member Functions

result_type operator() (argument_type const &v) const
 
template<>
auto operator() (argument_type const &id) const -> result_type
 

Detailed Description

template<typename T>
struct lar::util::details::hash< T >

Hash functions for art and larsoft objects.

Definition at line 42 of file FindAllP.h.

Member Typedef Documentation

template<typename T >
using lar::util::details::hash< T >::argument_type = T

Definition at line 44 of file FindAllP.h.

template<typename T >
using lar::util::details::hash< T >::result_type = size_t

Definition at line 43 of file FindAllP.h.

Member Function Documentation

template<typename T >
result_type lar::util::details::hash< T >::operator() ( argument_type const &  v) const
template<>
auto lar::util::details::hash< art::ProductID >::operator() ( argument_type const &  id) const -> result_type

Definition at line 372 of file FindAllP.h.

References fhicl::detail::atom::value().

373  {
374  // make sure we have enough bits in result_type;
375  // if not, we need a more clever algorithm
376  //static_assert(
377  // sizeof(id.processIndex()) + sizeof(id.productIndex())
378  // <= sizeof(result_type),
379  // "hash return type not large enough for hashing art::ProductID"
380  //);
381  // stack the process and product IDs in one integer
382  //return result_type(
383  //(id.processIndex() << sizeof(id.productIndex() * CHAR_BIT))
384  //+ id.productIndex()
385  //);
386  return result_type( id.value() );
387  } // hash<art::ProductID>::operator()
std::string value(boost::any const &)

The documentation for this struct was generated from the following file: