ATLAS Offline Software
Classes | Namespaces
StringPool.h File Reference

Maintain a mapping of strings to 64-bit ints. More...

#include <stdint.h>
#include <string>
#include <memory>
Include dependency graph for StringPool.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SG::StringPool
 

Namespaces

 SG
 Forward declaration.
 

Detailed Description

Maintain a mapping of strings to 64-bit ints.

Author
scott snyder
Date
Mar 2007 We map from strings to integer keys using a hash function. We keep a table of hashed strings so that we can later return the string given the key. We allow registering additional key->string mappings as well, as long as there aren't collisions. We also keep an auxiliary int that gets hashed along with the string.

A string can be marked as ‘transient’ (using SG::transientKey). If we encounter a hash collision while inserting a transient key, we do not fail, but instead use find an alternate hash for it.

Definition in file StringPool.h.