ATLAS Offline Software
Functions
HLTUtils Namespace Reference

Functions

def string2hash (string)
 

Function Documentation

◆ string2hash()

def HLTUtils.string2hash (   string)
Hashes a string using the HLT's HLTUtils::string2hash hashing function. Python implementation. 

Definition at line 5 of file HLTUtils.py.

5 def string2hash(string):
6  """Hashes a string using the HLT's HLTUtils::string2hash hashing function. Python implementation. """
7  hash = 0xd2d84a61
8  mask = 0xffffffff
9  for character in reversed(string):
10  hash ^= (( (((hash >> 5) & mask) + ord(character)) & mask) + ((hash << 7) & mask)) & mask
11  for character in string:
12  hash ^= (( (((hash >> 5) & mask) + ord(character)) & mask) + ((hash << 7) & mask)) & mask
13  return hash
HLTUtils.string2hash
def string2hash(string)
Definition: HLTUtils.py:5