33 ATH_MSG_INFO(
"Request to reinitialize not satisfied - tags have not changed");
48 ATH_MSG_ERROR(
"ZdcID::initialize_from_dict - cannot access ForwardDetectors dictionary");
64 if (atlasDict->
get_label_value(
"subdet",
"ForwardDetectors", fwdField)) {
65 ATH_MSG_ERROR(
"Could not get value for label 'ForwardDetectors' of field 'subdet' in dictionary "
66 << atlasDict->
name());
72 if (
m_dict->get_label_value(
"part",
"ZDC", zdcField)) {
73 ATH_MSG_ERROR(
"Could not get value for label 'ZDC' of field 'part' in dictionary "
78 <<
"Found field values: ZDC " << zdcField);
82 region_id.add(fwdField);
83 region_id.add(zdcField);
104 ATH_MSG_ERROR(
"ZdcID::initLevelsFromDict - dictionary NOT initialized");
123 ATH_MSG_ERROR(
"ZdcID::initLevelsFromDict - unable to find zdc region index: id, reg "
134 ATH_MSG_ERROR(
"ZdcID::initLevelsFromDict - unable to find 'subdet' field");
137 field =
m_dict->find_field(
"part");
142 ATH_MSG_ERROR(
"ZdcID::initLevelsFromDict - unable to find 'part' field");
145 field =
m_dict->find_field(
"side");
150 ATH_MSG_ERROR(
"ZdcID::initLevelsFromDict - unable to find 'side' field");
153 field =
m_dict->find_field(
"module");
158 ATH_MSG_ERROR(
"ZdcID::initLevelsFromDict - unable to find 'module' field");
161 field =
m_dict->find_field(
"type");
166 ATH_MSG_ERROR(
"ZdcID::initLevelsFromDict - unable to find 'type' field");
169 field =
m_dict->find_field(
"channel");
174 ATH_MSG_ERROR(
"ZdcID::initLevelsFromDict - unable to find 'channel' field");
189 ATH_MSG_DEBUG(
"decode index and bit fields for each level:");
212 unsigned int nids = 0;
213 std::set<Identifier> ids;
217 auto first = rit.
begin();
218 auto last = rit.
end();
219 for (; first != last; ++first) {
223 if(!(ids.insert(
id)).second) {
225 <<
" Error: duplicated id for module id. nid " << nids
226 <<
" compact id " << MSG::hex <<
id.get_compact() << MSG::dec
227 <<
" id " << (std::string)exp_id);
235 <<
" Error: set size NOT EQUAL to hash max. size " << ids.size()
241 std::set<Identifier>::const_iterator first = ids.begin();
242 std::set<Identifier>::const_iterator last = ids.end();
243 for (; first != last && nids <
m_module_vec.size(); ++first) {
256 auto first = rit.
begin();
257 auto last = rit.
end();
258 for (; first != last; ++first) {
265 if(!(ids.insert(
id)).second) {
267 <<
" Error: duplicated id for channel id. nid " << nids
268 <<
" compact id " << MSG::hex <<
id.get_compact() << MSG::dec
269 <<
" id " << (std::string)exp_id);
277 <<
" Error: set size NOT EQUAL to hash max. size " << ids.size()
285 for (; first != last && nids <
m_channel_vec.size(); ++first) {
302 for (; first != last; ++first, ++nids) {
307 ATH_MSG_ERROR(
"ZDC_ID::test_packing: new and old compacts not equal. New/old/expanded ids "
314 if (
id != new_id_1) {
315 ATH_MSG_ERROR(
"ZDC_ID::test_packing: new and old compacts from hash not equal. New/old/expanded ids. hash " << idHash <<
" "
322 ATH_MSG_DEBUG(
"ZDC_ID::test_packing: tested module ids. nids, errors "
323 << nids <<
" " << nerr);
327 for (; first != last; ++first, ++nids) {
334 ATH_MSG_ERROR(
"ZDC_ID::test_packing: new and old compacts not equal. New/old/expanded ids "
341 if (
id != new_id_1) {
342 ATH_MSG_ERROR(
"ZDC_ID::test_packing: new and old compacts from hash not equal. New/old/expanded ids hash " << idHash <<
" "
349 ATH_MSG_DEBUG(
"ZDC_ID::test_packing: tested channel ids. nids, errors "
350 << nids <<
" " << nerr);
356 ATH_MSG_ERROR(
"ZDC_ID::test_packing: Unable to test module/channel is packing - no dictionary has been defined.");
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
int register_dict_tag(const IdDictMgr &dict_mgr, const std::string &dict_name)
Register the file and tag names for a particular IdDict dictionary.
int forward_field_value() const
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
int zdc_field_value() const
AtlasDetectorID(const std::string &name, const std::string &group)
ConstRangeIterator end() const
ConstRangeIterator begin() const
int get_label_value(const std::string &field, const std::string &label, int &value) const
const std::string & name() const
Dictionary name.
const IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
const IdDictFieldImplementation & implementation(size_t i) const
This is a "hash" representation of an Identifier.
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
IdDictFieldImplementation m_forward_impl
Identifier module_id(int side, int module) const
MultiRange m_full_channel_range
IdentifierHash module_hash(Identifier module_id) const
module hash from id - optimized
size_type m_FORWARD_INDEX
IdDictFieldImplementation m_zdc_impl
size_type m_channel_hash_max
int side(const Identifier &id) const
Values of different levels (failure returns 0)
const_id_iterator modules_end() const
size_type m_module_hash_max
size_type m_zdc_region_index
std::vector< Identifier >::const_iterator const_id_iterator
const IdDictDictionary * m_dict
void test_packing() const
Tests of packing.
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr)
Initialization from the identifier dictionary.
MultiRange m_full_module_range
const_id_iterator modules_begin() const
Iterators over full set of ids. modules iterator is sorted.
const_id_iterator channels_begin() const
Iterators over full set of ids. channels iterator is sorted.
int type(const Identifier &id) const
IdDictFieldImplementation m_side_impl
const_id_iterator channels_end() const
Identifier channel_id(int side, int module, int type, int channel) const
int channel(const Identifier &id) const
IdDictFieldImplementation m_type_impl
IdDictFieldImplementation m_module_impl
IdDictFieldImplementation m_channel_impl
size_type m_CHANNEL_INDEX
IdentifierHash channel_hash(Identifier channel_id) const
channel hash from id - optimized