LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 41 of file FindAllP.h.

Member Typedef Documentation

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

Definition at line 43 of file FindAllP.h.

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

Definition at line 42 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 342 of file FindAllP.h.

References value.

343  {
344  // make sure we have enough bits in result_type;
345  // if not, we need a more clever algorithm
346  //static_assert(
347  // sizeof(id.processIndex()) + sizeof(id.productIndex())
348  // <= sizeof(result_type),
349  // "hash return type not large enough for hashing art::ProductID"
350  //);
351  // stack the process and product IDs in one integer
352  //return result_type(
353  //(id.processIndex() << sizeof(id.productIndex() * CHAR_BIT))
354  //+ id.productIndex()
355  //);
356  return result_type(id.value());
357  } // hash<art::ProductID>::operator()
double value
Definition: spectrum.C:18

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