ATLAS Offline Software
Loading...
Searching...
No Matches
IdHelper.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7#ifndef IDENTIFIER_IDHELPER_H
8#define IDENTIFIER_IDHELPER_H
9
10#include <string>
11
12class Identifier;
13class IdentifierHash;
14class IdContext;
15class IdDictMgr;
16class IMessageSvc;
17
25public:
26
27 virtual ~IdHelper() = default;
28
29 // Create compact id from hash id (return == 0 for OK)
30 virtual int get_id (const IdentifierHash& hash_id,
31 Identifier& id,
32 const IdContext* context = 0) const = 0;
33
34 // Create hash id from compact id (return == 0 for OK)
35 virtual int get_hash (const Identifier& id,
36 IdentifierHash& hash_id,
37 const IdContext* context = 0) const = 0;
38
39 // Initialization from the identifier dictionary
40 virtual int initialize_from_dictionary(const IdDictMgr& dict_mgr) = 0;
41
42 // retrieve version of the dictionary
43 virtual std::string dictionaryVersion (void) const= 0;
44
48 virtual bool do_checks () const = 0;
49 virtual void set_do_checks (bool do_checks) = 0;
53 virtual bool do_neighbours () const = 0;
54 virtual void set_do_neighbours (bool do_neighbours) = 0;
55
56 virtual void setDictVersion (const IdDictMgr& dict_mgr, const std::string& name) = 0;
57};
58
59
60
61#endif // IDENTIFIER_IDCONVERSIONSTRATEGY_H
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition IdContext.h:26
This is an abstract base class for helper classes that know how to convert Identifier <-> IdentifierH...
Definition IdHelper.h:24
virtual void setDictVersion(const IdDictMgr &dict_mgr, const std::string &name)=0
virtual void set_do_neighbours(bool do_neighbours)=0
virtual ~IdHelper()=default
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr)=0
virtual std::string dictionaryVersion(void) const =0
virtual bool do_checks() const =0
Checks are performed by default in debug compilation and NOT in optimized compilation.
virtual void set_do_checks(bool do_checks)=0
virtual bool do_neighbours() const =0
Neighbour initialization is performed by default One can switch or query this mode for any idHelper w...
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const =0
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const =0
This is a "hash" representation of an Identifier.