|
ATLAS Offline Software
|
Go to the documentation of this file.
17 #include "GaudiKernel/MsgStream.h"
44 const std::set<Identifier>&
ids,
49 m_end_index = end_index;
52 log << MSG::ERROR <<
name <<
" set size " <<
ids.size()
56 m_id_vec.assign (
ids.begin(),
ids.end());
71 std::vector<Identifier>::const_iterator
it = std::lower_bound(m_id_vec.begin(),m_id_vec.end(),
id);
72 if (
it != m_id_vec.end() ){
73 hash_id =
it - m_id_vec.begin();
135 if (hash_id < hg->hash_max()) {
136 id = hg->
id (hash_id);
233 const std::string& dict_name)
244 log << MSG::ERROR <<
" cannot access " << dict_name <<
"dictionary"
IdDictRegion * find_region(const std::string ®ion_name) const
std::string m_name
Name of this helper.
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
int fill_vec_of_dict_regions(const std::string &group_name="")
Initialize the list of detector regions.
int init(T &parent, const std::string &type, const MultiRange &full_range, Identifier(T::*idfunc)(const ExpandedIdentifier &) const, size_type end_index)
Initialize.
size_type end_index() const
Return the ending index of the context for this group.
size_type end_index() const
IdContext region_context() const
Return the context for regions.
Identifier id(IdentifierHash hashId) const
Return the identifier for a given hash code (no checking).
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.
IMessageSvc * m_msgSvc
pointer to the message service
CaloIDHelper(const std::string &name)
Constructor.
int get_hash(Identifier id, IdentifierHash &hash_id) const
Look up the hash code corresponding to an Identifier.
const HashGroup & regions() const
Return the HashGroup for regions.
Identifier::size_type size_type
std::vector< const IdDictRegion * > m_vecOfDictRegions
List of IdDictRegion objects.
size_type begin_index() const
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
float etaGranularity(const IdentifierHash regHash) const
Return the eta granularity of a region, or NOT_VALID.
HashGroup m_regions
Group of region Identifiers.
int initialize_base_from_dictionary(const IdDictMgr &dict_mgr, const std::string &dict_name)
Do basic initialization of the helper.
int register_dict_tag(const IdDictMgr &dict_mgr, const std::string &dict_name)
Register the file and tag names for a particular IdDict dictionary.
A MultiRange combines several Ranges.
float eta0(const IdentifierHash regHash) const
Return the minimum eta of region, or NOT_VALID.
const std::string & name() const
Return the name for this helper.
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.
const IdDictDictionary * m_dict
The dictionary for this helper.
IMessageSvc * msgSvc()
Return the message service for this helper (may be null).
float phi0(const IdentifierHash regHash) const
Return the minimum phi of region, or NOT_VALID.
HashGroup m_channels
Group of channel (cell) Identifiers.
Base class to factor out code common among Calo ID helpers.
IdContext context() const
Return the context for this group.
float phiGranularity(const IdentifierHash regHash) const
Return the phi granularity of a region, or NOT_VALID.
virtual int get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const =0
Create an expanded Identifier from an Identifier.
size_type cardinality() const
Computes a possible cardinality from all ranges.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Manage a list of identifiers.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...