35 ATH_MSG_DEBUG(
"Request to reinitialize not satisfied - tags have not changed");
45 ATH_MSG_ERROR(
"initialize_from_dictionary - cannot access LArCalorimeter dictionary");
64 ATH_MSG_ERROR(
"Could not get value for label 'LArCalorimeter' of field 'subdet' in dictionary "
65 << atlasDict->
name());
70 int larOnlineField = -4;
71 if (
m_dict->get_label_value(
"part",
"LArOnline", larOnlineField)) {
72 ATH_MSG_ERROR(
"Could not get value for label 'LArOnline' of field 'part' in dictionary "
78 int larOnlineCalibField = -5;
79 if (
m_dict->get_label_value(
"part",
"LArOnlineCalib", larOnlineCalibField)) {
80 ATH_MSG_ERROR(
"Could not get value for label 'LArOnlineCalib' of field 'part' in dictionary "
87 region_id.add(larField);
88 region_id.add(larOnlineField);
113 ATH_MSG_DEBUG(
"[initialze_from_dictionary] ...call init_H6hashes..");
142 int size = (1 << bits);
223 unsigned int nrangesFound = 0;
238 if (nrangesFound > 1) {
246 for (
unsigned int j = 0; j < nvalues; ++j) {
251 ATH_MSG_WARNING(
" ***** Warning feb range slot field is NOT both_bounded - id, slot mode: "
267 std::to_string(min_hash));
290 std::set<HWIdentifier> ids;
296 for (
const auto & exp_id : rit)
303 if(!(ids.insert(
id)).second)
305 ATH_MSG_ERROR(
"init_hashes : duplicated id for channel nb = "+std::to_string(nids));
311 unsigned int nidtb=0;
312 std::set<HWIdentifier>::const_iterator first = ids.begin();
313 std::set<HWIdentifier>::const_iterator last = ids.end();
314 for (;first != last && nidtb < nids; ++first)
334 for (
const auto & exp_id : rit)
340 if(!(ids.insert(febId)).second)
342 ATH_MSG_ERROR(
"init_hashes: duplicated id for FEB nb = "+std::to_string(nids));
351 for (;first != last && nidtb < nids; ++first)
370 for (
const auto & exp_id:rit)
375 int test_bec =
barrel_ec( feedthroughId);
376 int test_pn =
pos_neg( feedthroughId);
379 <<
"," << test_pn <<
"," << test_ft <<
"]");
380 if(!(ids.insert(feedthroughId)).second)
382 ATH_MSG_ERROR(
"init_hashes : duplicated id for feedthrough nb = "+std::to_string(nids));
391 for (;first != last && nidtb < nids; ++first)
411 std::set<HWIdentifier> ids;
412 ATH_MSG_DEBUG(
"[init_H6hashes] : ChannelId : m_full_laronline_range.size() = "
418 for (
const auto & exp_id:rit)
425 if(!(ids.insert(
id)).second)
427 ATH_MSG_ERROR(
"init_hashes: duplicated id for channel nb = "+std::to_string(nids));
433 unsigned int nidtb=0;
434 std::set<HWIdentifier>::const_iterator first = ids.begin();
435 std::set<HWIdentifier>::const_iterator last = ids.end();
436 for (;first != last && nidtb < nids; ++first)
455 for (
const auto & exp_id : rit)
461 if(!(ids.insert(febId)).second)
463 ATH_MSG_ERROR(
"init_hashes : duplicated id for FEB nb = "+std::to_string(nids));
472 for (;first != last && nidtb < nids; ++first)
493 for (
const auto & exp_id:rit)
502 int test_bec =
barrel_ec( feedthroughId);
503 int test_pn =
pos_neg( feedthroughId);
505 ATH_MSG_DEBUG(
"[init_H6hashes] in loop : [bec,pn,ft]= [" << test_bec
506 <<
"," << test_pn <<
"," << test_ft <<
"]");
507 if(!(ids.insert(feedthroughId)).second)
509 ATH_MSG_ERROR(
"init_hashes : duplicated id for feedthrough nb = "+std::to_string(nids));
518 for (;first != last && nidtb < nids; ++first)
522 ATH_MSG_DEBUG(
"[init_H6hashes] filling m_feedthrough_vec IS-H6 !!");
539 ( ft==3 || ft==10 || ft==16 || ft==22 )
550 return (bec==1 && sl<3 && (ft==3 || ft==10 ||
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
virtual std::string dictionaryVersion(void) const override
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.
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
const std::string & group() const
Group name for this helper.
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.
Identifier::size_type size_type
const IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
element_type get_minimum() const
Query the values.
bool isEnumerated() const
const element_vector & get_values() const
element_type get_maximum() const
This is a "hash" representation of an Identifier.
std::vector< int > m_slot_values
Define the Hash identifier for channels and febs.
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
MultiRange m_full_laronline_range
HWIdentifier feedthrough_Id(int barrel_ec, int pos_neg, int feedthrough) const
Create a feedthrough identifier from fields.
std::vector< HWIdentifier > m_channel_vec
size_type m_calibModuleHashMax
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
const IdDictDictionary * m_dict
size_type m_channel_in_slot_index
size_type m_feedthrough_index
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
int get_expanded_id(const HWIdentifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
create expanded HWIdentifier from HWIdentifier (return == 0 for OK)
IdentifierHash channel_Hash_binary_search(HWIdentifier channelId) const
IdentifierHash feb_Hash_binary_search(HWIdentifier channelId) const
size_type m_channelHashMax
MultiRange m_full_feb_range
IdDictFieldImplementation m_bec_ft_impl
LArOnlineID_Base(const std::string &name, const std::string &group, bool is_slar)
Default constructor.
int pos_neg(const HWIdentifier id) const
Return the side of a hardware cell identifier pos_neg = [0,1] positive-side or negative-side Barrel...
IdDictFieldImplementation m_feedthrough_impl
IdentifierHash feb_Hash(HWIdentifier febId) const
Create feb hash identifiers from feb identifiers.
IdContext feedthroughContext() const
Define context for feedthroughs.
IdDictFieldImplementation m_slot_impl
size_type m_feedthroughHashMax
IdDictFieldImplementation m_side_impl
std::vector< HWIdentifier > m_feb_vec
std::vector< HashCalcFeb > m_feb_hash_calcs
int initLevelsFromDict(const std::string &group_name)
IdDictFieldImplementation m_bec_impl
std::vector< HWIdentifier > m_feedthrough_vec
IdDictFieldImplementation m_bec_slot_impl
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
size_type m_calibChannelHashMax
MultiRange m_full_feedthrough_range
std::vector< HashCalc > m_chan_hash_calcs
bool is_H6FT(const HWIdentifier feedthroughId) const
~LArOnlineID()
Default destructor.
bool isEMECOW(const HWIdentifier id) const override final
LArOnlineID()
Default constructor.
bool isEMECIW(const HWIdentifier id) const override final
bool is_H8(const HWIdentifier channelId) const
bool isHECchannel(const HWIdentifier id) const override final
int initialize_from_dictionary(const IdDictMgr &) override final
initialization from the identifier dictionary
bool is_H6(const HWIdentifier channelId) const
bool isEMECchannel(const HWIdentifier id) const override final
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
bool match(std::string s1, std::string s2)
match the individual directories of two strings