ATLAS Offline Software
IStringPool.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
15 #ifndef ATHENAKERNEL_ISTRINGPOOL_H
16 #define ATHENAKERNEL_ISTRINGPOOL_H
17 
18 
19 #include "CxxUtils/sgkey_t.h"
20 #include "GaudiKernel/ClassID.h"
21 #include <string>
22 
23 
28 {
29 public:
31  virtual ~IStringPool() {}
32 
35 
36 
45  virtual
46  sgkey_t stringToKey (const std::string& str, CLID clid) = 0;
47 
55  virtual
56  const std::string* keyToString (sgkey_t key) const = 0;
57 
66  virtual
67  const std::string* keyToString (sgkey_t key,
68  CLID& clid) const = 0;
69 
82  virtual
84  const std::string& str,
85  CLID clid) = 0;
86 };
87 
88 
89 #endif // not ATHENAKERNEL_ISTRINGPOOL_H
IStringPool
Abstract interface for looking up strings/CLIDs in a pool.
Definition: IStringPool.h:28
IStringPool::stringToKey
virtual sgkey_t stringToKey(const std::string &str, CLID clid)=0
Find the key for a string/CLID pair.
IStringPool::~IStringPool
virtual ~IStringPool()
Destructor.
Definition: IStringPool.h:31
IStringPool::sgkey_t
SG::sgkey_t sgkey_t
Type of the keys.
Definition: IStringPool.h:34
IStringPool::registerKey
virtual void registerKey(sgkey_t key, const std::string &str, CLID clid)=0
Remember an additional mapping from key to string/CLID.
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition: CxxUtils/CxxUtils/sgkey_t.h:32
sgkey_t.h
Define the type used for hashed StoreGate key+CLID pairs.
IStringPool::keyToString
virtual const std::string * keyToString(sgkey_t key) const =0
Find the string corresponding to a given key.
str
Definition: BTagTrackIpAccessor.cxx:11
IStringPool::keyToString
virtual const std::string * keyToString(sgkey_t key, CLID &clid) const =0
Find the string and CLID corresponding to a given key.
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37