Public Member Functions | List of all members
util::HashFunctions Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-09-23/Utilities/HashFunctions.h"

Public Member Functions

 HashFunctions ()
 Generate unique hashes for reco products. More...
 
 ~HashFunctions ()
 
uint64_t Generate (rawdata::RawDigit h)
 Compute a unique hash value give a rawdata::RawDigit. More...
 
uint64_t Generate (rb::CellHit h)
 Compute a unique hash value give a rb::CellHit. More...
 

Detailed Description

Definition at line 15 of file HashFunctions.h.

Constructor & Destructor Documentation

util::HashFunctions::HashFunctions ( )

Generate unique hashes for reco products.

Author
Justin Vasel justi.nosp@m.n.va.nosp@m.sel@g.nosp@m.mail.nosp@m..com
Date
December 2018

Definition at line 12 of file HashFunctions.cxx.

13 {
14 }
util::HashFunctions::~HashFunctions ( )

Definition at line 17 of file HashFunctions.cxx.

18 {
19 }

Member Function Documentation

uint64_t util::HashFunctions::Generate ( rawdata::RawDigit  h)

Compute a unique hash value give a rawdata::RawDigit.

Parameters
Anyrawdata::RawDigit
Returns
A hash value that uniquely identifies this hit

Definition at line 22 of file HashFunctions.cxx.

References rawdata::RawDigit::DaqChannel(), and rawdata::RawDigit::TDC().

Referenced by sn::HitVetoMap::AddHit(), and sn::HitVetoMap::ContainsHit().

23 {
24  return (uint64_t)h.TDC() + ((uint64_t)h.DaqChannel() << 32);
25 }
int32_t TDC() const
The time of the last baseline sample.
Definition: RawDigit.h:94
uint32_t DaqChannel() const
Definition: RawDigit.h:85
uint64_t util::HashFunctions::Generate ( rb::CellHit  h)

Compute a unique hash value give a rb::CellHit.

Parameters
Anyrb::CellHit
Returns
A hash value that uniquely identifies this hit

Definition at line 28 of file HashFunctions.cxx.

References rawdata::RawDigit::DaqChannel(), and rawdata::RawDigit::TDC().

29 {
30  // First 32 bits are daq channel, second 32 bits are TDC:
31  // TDC ____ ____ xxxx xxxx
32  // DaqChannel xxxx xxxx ____ ____
33  return (uint64_t)h.TDC() + ((uint64_t)h.DaqChannel() << 32);
34 }
int32_t TDC() const
The time of the last baseline sample.
Definition: RawDigit.h:94
uint32_t DaqChannel() const
Definition: RawDigit.h:85

The documentation for this class was generated from the following files: