17#include "GaudiKernel/MsgStream.h"
42 const std::set<Identifier>&
ids,
49 log << MSG::ERROR <<
"set size " <<
ids.size()
68 std::vector<Identifier>::const_iterator it = std::lower_bound(
m_id_vec.begin(),
m_id_vec.end(),
id);
97 const std::string&
group)
125 size_t begin = (context) ? context->
begin_index(): 0;
126 size_t end = (context) ? context->
end_index() : 0;
134 if (hash_id < hg->hash_max()) {
135 id = hg->
id (hash_id);
164 size_t begin = (context) ? context->
begin_index(): 0;
165 size_t end = (context) ? context->
end_index() : 0;
232 const std::string& dict_name)
242 ATH_MSG_ERROR(
"cannot access " << dict_name <<
"dictionary");
Base class to factor out code common among Calo ID helpers.
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
int register_dict_tag(const IdDictMgr &dict_mgr, const std::string &dict_name)
Register the file and tag names for a particular IdDict dictionary.
const std::string & group() const
Group name for this helper.
AtlasDetectorID(const std::string &name, const std::string &group)
Manage a list of identifiers.
IdContext context() const
Return the context for this group.
Identifier id(IdentifierHash hashId) const
Return the identifier for a given hash code (no checking).
const std::vector< Identifier > & ids() const
Return a vector of all Identifiers for this group.
size_type m_end_index
Ending index for this group's context.
size_type end_index() const
Return the ending index of the context for this group.
std::vector< Identifier > m_id_vec
List of Identifiers for this group.
int init(T &parent, const std::string &type, const MultiRange &full_range, Identifier(T::*idfunc)(const ExpandedIdentifier &) const, size_type end_index)
Initialize.
int get_hash(Identifier id, IdentifierHash &hash_id) const
Look up the hash code corresponding to an Identifier.
float phi0(const IdentifierHash regHash) const
Return the minimum phi of region, or NOT_VALID.
const HashGroup & regions() const
Return the HashGroup for regions.
float eta0(const IdentifierHash regHash) const
Return the minimum eta of region, or NOT_VALID.
float etaGranularity(const IdentifierHash regHash) const
Return the eta granularity of a region, or NOT_VALID.
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const
Convert a hash code to an Identifier for either channels or regions, depending on the context.
virtual int get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const =0
Create an expanded Identifier from an Identifier.
int initialize_base_from_dictionary(const IdDictMgr &dict_mgr, const std::string &dict_name)
Do basic initialization of the helper.
IdContext region_context() const
Return the context for regions.
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const
Convert an Identifier to a hash code for either channels or regions, depending on the context.
std::vector< const IdDictRegion * > m_vecOfDictRegions
List of IdDictRegion objects.
HashGroup m_regions
Group of region Identifiers.
CaloIDHelper(const std::string &name, const std::string &group)
Constructor.
Identifier::size_type size_type
const IdDictDictionary * m_dict
The dictionary for this helper.
int fill_vec_of_dict_regions(const std::string &group_name="")
Initialize the list of detector regions.
float phiGranularity(const IdentifierHash regHash) const
Return the phi granularity of a region, or NOT_VALID.
HashGroup m_channels
Group of channel (cell) Identifiers.
std::string m_name
Name of this helper.
const std::string & name() const
Return the name for this helper.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
size_type begin_index() const
size_type end_index() const
const IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
This is a "hash" representation of an Identifier.
A MultiRange combines several Ranges.
size_type cardinality() const
Computes a possible cardinality from all ranges.
singleton-like access to IMessageSvc via open function and helper
IMessageSvc * getMessageSvc(bool quiet=false)