All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
std::hash< art::EventID > Struct Template Reference

#include <EventRegistry.h>

Public Member Functions

std::size_t operator() (art::EventID const &ID) const noexcept
 

Detailed Description

template<>
struct std::hash< art::EventID >

Definition at line 37 of file EventRegistry.h.

Member Function Documentation

std::size_t std::hash< art::EventID >::operator() ( art::EventID const &  ID) const
inlinenoexcept

Definition at line 39 of file EventRegistry.h.

40  {
41  return std::hash<std::uint64_t>{}(
42  (std::uint64_t{ ID.run() } << 40U) // run: 24 bits (16M)
43  + (std::uint64_t{ ID.subRun() } << 22U) // subrun: 18 bits (256k)
44  + (std::uint64_t{ ID.event() }) // event: 22 bits (4M)
45  );
46  }

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