59 ATH_MSG_DEBUG(
"Request to reinitialize not satisfied - tags have not changed");
79 ATH_MSG_ERROR(
"initialize_from_dictionary - cannot access LArElectrode dictionary");
102 ATH_MSG_ERROR(
"Could not get value for label 'LArElectrode' of field 'subdet' in dictionary "
103 << atlasDict->
name());
106 ATH_MSG_DEBUG(
"[init_from_dictionary] > larField value = " << larField);
110 int configurationValue = 1;
111 if (
m_dict->get_label_value(
"configuration",
"Atlas", configurationValue)) {
112 ATH_MSG_WARNING(
"Could not get value for label 'configuration' in dictionary "
116 ATH_MSG_DEBUG(
"[init_from_dictionary] > configurationValue = " << configurationValue);
121 reg_id.
add(larField);
122 reg_id.
add(configurationValue);
128 ATH_MSG_DEBUG(
"[initialize_from_dictionary] > Electrode range -> "
170 ATH_MSG_INFO(
"LArElectrodeID::initLevelsFromDict - dictionary NOT initialized");
187 ATH_MSG_DEBUG(
"[initLevelsFromDict] data member initialization OK ...");
194 ATH_MSG_WARNING(
"[initLevelsFromDict] - unable to find 'EM-BARREL-ALL' region");
197 ATH_MSG_DEBUG(
"[initLevelsFromDict] region 'EM-BARREL-ALL' found OK ...");
205 ATH_MSG_INFO(
"LArElectrodeID::initLevelsFromDict - unable to find 'subdet' field");
208 ATH_MSG_DEBUG(
"[initLevelsFromDict] field 'LArElectrode' found OK");
212 field =
m_dict->find_field(
"configuration") ;
216 ATH_MSG_INFO(
"LArHVLineID::initLevelsFromDict - unable to find 'configuration' field");
219 ATH_MSG_DEBUG(
"[initLevelsFromDict] field config=Atlas found OK");
223 field =
m_dict->find_field(
"detector") ;
227 ATH_MSG_INFO(
"LArElectrodeID::initLevelsFromDict - unable to find 'detector' field");
230 ATH_MSG_DEBUG(
"[initLevelsFromDict] field 'detector' found OK");
235 field =
m_dict->find_field(
"zside") ;
239 ATH_MSG_INFO(
"LArElectrodeID::initLevelsFromDict - unable to find 'zside' field");
242 ATH_MSG_DEBUG(
"[initLevelsFromDict] field 'zside' found OK");
247 field =
m_dict->find_field(
"module") ;
252 ATH_MSG_INFO(
"LArElectrodeID::initLevelsFromDict - unable to find 'module' field");
255 ATH_MSG_DEBUG(
"[initLevelsFromDict] field 'module' found OK");
259 field =
m_dict->find_field(
"hvphi") ;
264 ATH_MSG_INFO(
"initLevelsFromDict - unable to find 'hvphi' field");
267 ATH_MSG_DEBUG(
"[initLevelsFromDict] field 'hvphi' found OK");
271 field =
m_dict->find_field(
"hveta") ;
276 ATH_MSG_INFO(
"[initLevelsFromDict] - unable to find 'hveta' field");
279 ATH_MSG_DEBUG(
"[initLevelsFromDict] field 'hveta' found OK");
283 field =
m_dict->find_field(
"hvgap") ;
288 ATH_MSG_INFO(
"[initLevelsFromDict] - unable to find 'hvgap' field");
291 ATH_MSG_DEBUG(
"[initLevelsFromDict] field 'hvgap' found OK");
296 field =
m_dict->find_field(
"electrode") ;
301 ATH_MSG_INFO(
"[initLevelsFromDict] - unable to find 'electrode' field");
304 ATH_MSG_DEBUG(
"[initLevelsFromDict] field 'electrode' found OK");
330 ATH_MSG_DEBUG(
"[initLevelsFromDict] Decode index and bit fields for each level:");
356 unsigned int nids = 0;
357 std::set<HWIdentifier> ids;
361 for (
const auto & exp_id :rit) {
371 if(!(ids.insert(elec_id)).second){
372 ATH_MSG_ERROR(
"[init_hashes] > duplicated id for channel nb = " << nids);
380 ATH_MSG_ERROR(
" set size NOT EQUAL to hash max. size " << ids.size());
386 std::set<HWIdentifier>::const_iterator first = ids.begin();
387 std::set<HWIdentifier>::const_iterator last = ids.end();
#define ATH_MSG_WARNING(x)
static const int s_larconfig_value
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.
virtual void setDictVersion(const IdDictMgr &dict_mgr, const std::string &name) override
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 lar_field_value() const
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
AtlasDetectorID(const std::string &name, const std::string &group)
void add(element_type value)
Append a value into a new field.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
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
IdDictFieldImplementation m_atlas_impl
Field Implementation.
size_type m_detector_index
IdDictFieldImplementation m_hveta_impl
IdDictFieldImplementation m_hvphi_impl
IdDictFieldImplementation m_detector_impl
size_type m_electrode_index
IdDictFieldImplementation m_configuration_impl
IdDictFieldImplementation m_hvgap_impl
size_type m_larelectrode_index
MultiRange m_full_larelectrode_range
IdContext electrodeContext() const
Define feedthrough Context.
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr)
Initialization from the identifier dictionary.
virtual ~LArElectrodeID()
Default destructor.
IdDictFieldImplementation m_electrode_impl
size_type m_configuration_index
IdDictFieldImplementation m_zside_impl
size_type m_larElectrodeRegion_index
HWIdentifier ElectrodeId(int det, int side, int mod, int phi, int eta, int gap, int elec) const
Create an Electrode identifier from fields.
int hv_eta(const HWIdentifier id) const
Return an integer corresponding to the high volatge eta sector of an hardware electrode identifier.
LArElectrodeID()
Default constructor.
int zside(const HWIdentifier id) const
Return an integer corresponding to the side of an hardware electrode identifier.
std::vector< HWIdentifier > m_electrode_vec
int get_expanded_id(const HWIdentifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
int gap(const HWIdentifier id) const
Return an integer corresponding to the cell gap of an hardware electrode identifier.
size_type m_electrodeHashMax
const IdDictDictionary * m_dict
int electrode(const HWIdentifier id) const
Return an integer corresponding to the electrode number of an hardware electrode identifier.
int detector(const HWIdentifier id) const
Return an integer corresponding to the detector of an hardware electrode identifier.
IdDictFieldImplementation m_module_impl
MultiRange m_full_electrode_range
int hv_phi(const HWIdentifier id) const
Return an integer corresponding to the high voltage phi sector of an hardware electrode identifier.
A Range describes the possible ranges for the field values of an ExpandedIdentifier.