ATLAS Offline Software
Trigger
TrigConfiguration
TrigConfHLTUtils
python
HLTUtils.py
Go to the documentation of this file.
1
#
2
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
#
4
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
Generated on Sun Dec 22 2024 21:11:19 for ATLAS Offline Software by
1.8.18