|
ATLAS Offline Software
|
Go to the documentation of this file.
6 #include "GaudiKernel/MsgStream.h"
35 std::string strg =
"initialize_from_dictionary";
40 std::cout << strg << std::endl;
57 std::string strg =
" initialize_from_dictionary - cannot access LArCalorimeter dictionary ";
62 std::cout <<
"LArOnlineID::" << strg << std::endl;
83 std::stringstream strm;
85 std::string strg=
" Could not get value for label 'LArCalorimeter' of field 'subdet' in dictionary "+strm.str();
90 std::cout <<
"LArOnlineID:" << strg << std::endl;
96 int larOnlineField = -4;
98 std::stringstream strm;
100 std::string strg =
"Could not get value for label 'LArOnline' of field 'part' in dictionary "+strm.str();
105 std::cout << strg << std::endl;
111 int larOnlineCalibField = -5;
113 std::stringstream strm;
115 std::string strg =
"Could not get value for label 'LArOnlineCalib' of field 'part' in dictionary "+strm.str();
120 std::cout << strg << std::endl;
137 std::string strg0=
" initialize_from_dictionary :";
139 std::string strg2=
" feedthrough slot range -> " + (std::string)
m_full_feb_range;
148 std::cout << strg0 << std::endl;
149 std::cout << strg1 << std::endl;
150 std::cout << strg2 << std::endl;
151 std::cout << strg3 << std::endl;
158 std::stringstream strm;
160 std::string strg=
"[initialize_from_dictionary] version= " + strm.str();
165 std::cout <<
"LArOnlineID: " << strg << std::endl;
208 int size = (1 << bits);
213 std::stringstream strm1;
214 std::stringstream strm2;
229 std::stringstream strm;
233 std::string strg =
"Min > "+strm.str();
234 std::string strg1=
" "+strm1.str();
235 std::string strg2=
" "+strm2.str();
242 std::cout << strg << std::endl;
243 std::cout << strg1 << std::endl;
244 std::cout << strg2 << std::endl;
255 std::stringstream strm;
259 std::string strg =
" ***** Error channel ranges, id, hash, i = "+strm.str();
260 std::string strg1=
" , "+strm1.str();
261 std::string strg2=
" , "+strm2.str();
268 std::cout << strg << std::endl;
269 std::cout << strg1 << std::endl;
270 std::cout << strg2 << std::endl;
324 std::cout <<
" ***** Warning cannot get ft expanded id for " <<
show_to_string(
min) << std::endl;
327 unsigned int nrangesFound = 0;
342 if (nrangesFound > 1) {
350 for (
unsigned int j = 0; j < nvalues; ++j) {
356 log << MSG::WARNING <<
" ***** Warning feb range slot field is NOT both_bounded - id, slot mode: "
359 std::cout <<
" ***** Warning feb range slot field is NOT both_bounded - id, slot mode: "
380 std::cout << strg << std::endl;
389 std::string strg =
" ***** Warning feb ranges, id, hash, i = " +
395 std::cout << strg << std::endl;
415 std::set<HWIdentifier>
ids;
421 for (
const auto & exp_id : rit)
428 if(!(
ids.insert(
id)).second)
430 strg1 =
" init_hashes : duplicated id for channel nb = "+
std::to_string(nids);
439 std::cout <<
"LArOnlineID::Error" << strg1 << std::endl;
440 std::cout << strg3 << std::endl;
446 unsigned int nidtb=0;
447 std::set<HWIdentifier>::const_iterator
first =
ids.begin();
448 std::set<HWIdentifier>::const_iterator last =
ids.end();
469 for (
const auto & exp_id : rit)
475 if(!(
ids.insert(febId)).second)
477 strg1 =
" init_hashes: duplicated id for FEB nb = "+
std::to_string(nids);
486 std::cout <<
"LArOnlineID:: Error" << strg1 << std::endl;
487 std::cout << strg3 << std::endl;
515 for (
const auto & exp_id:rit)
520 int test_bec =
barrel_ec( feedthroughId);
521 int test_pn =
pos_neg( feedthroughId);
524 <<
"," << test_pn <<
"," << test_ft <<
"]"<<
endmsg;
525 if(!(
ids.insert(feedthroughId)).second)
527 strg1 =
" init_hashes : duplicated id for feedthrough nb = "+
std::to_string(nids);
536 std::cout <<
"LArOnlineID::Error" << strg1 << std::endl;
537 std::cout << strg3 << std::endl;
571 std::set<HWIdentifier>
ids;
578 for (
const auto & exp_id:rit)
585 if(!(
ids.insert(
id)).second)
587 strg1 =
" init_hashes: duplicated id for channel nb = "+
std::to_string(nids);
596 std::cout <<
"LArOnlineID:: Error" << strg1 << std::endl;
597 std::cout << strg3 << std::endl;
603 unsigned int nidtb=0;
604 std::set<HWIdentifier>::const_iterator
first =
ids.begin();
605 std::set<HWIdentifier>::const_iterator last =
ids.end();
625 for (
const auto & exp_id : rit)
631 if(!(
ids.insert(febId)).second)
633 strg1 =
" init_hashes : duplicated id for FEB nb = "+
std::to_string(nids);
642 std::cout <<
"LArOnlineID::Error" << strg1 << std::endl;
643 std::cout << strg3 << std::endl;
673 for (
const auto & exp_id:rit)
682 int test_bec =
barrel_ec( feedthroughId);
683 int test_pn =
pos_neg( feedthroughId);
686 <<
"," << test_pn <<
"," << test_ft <<
"]"<<
endmsg;
687 if(!(
ids.insert(feedthroughId)).second)
689 strg1 =
" init_hashes : duplicated id for feedthrough nb = "+
std::to_string(nids);
698 std::cout <<
"LArOnlineID::Error" << strg1 << std::endl;
699 std::cout << strg3 << std::endl;
726 int ft = feedthrough(
id);
727 return ( barrel_ec(
id)==1
729 (
ft==3 ||
ft==10 ||
ft==16 ||
ft==22 )
740 return (
bec==1 && sl<3 && (
ft==3 ||
ft==10 ||
MultiRange build_multirange() const
Get MultiRange for full dictionary.
bool isEMECIW(const HWIdentifier id) const override final
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
std::vector< int > m_slot_values
IdDictFieldImplementation m_feedthrough_impl
int init_calib_hashes(void)
bool is_H6FT(const HWIdentifier feedthroughId) const
element_type get_minimum() const
Query the values.
std::vector< HWIdentifier > m_channel_vec
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...
IdDictFieldImplementation m_slot_impl
Define the Hash identifier for channels and febs.
IMessageSvc * m_msgSvc
pointer to the message service
const element_vector & get_values() const
element_type get_maximum() const
IdContext feedthroughContext(void) const
Define context for feedthroughs.
bool is_H6(const HWIdentifier channelId) const
const IdDictDictionary * m_dict
IdDictFieldImplementation m_side_impl
int barrel_ec(const HWIdentifier id) const
Return the position barrel or endcap of a hardware cell identifier: barrel_ec = [0,...
int unpack(Identifier id) const
Identifier manipulation methods.
size_type m_feedthroughHashMax
virtual std::string dictionaryVersion(void) const override
IdDictFieldImplementation m_bec_slot_impl
size_type m_calibModuleHashMax
std::vector< HashCalcFeb > m_feb_hash_calcs
LArOnlineID(void)
Default constructor.
MultiRange m_full_feedthrough_range
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
bool isEMECchannel(const HWIdentifier id) const override final
~LArOnlineID(void)
Default destructor.
void set_bits(size_type bits, size_type bits_offset)
size_type m_calibChannelHashMax
int get_expanded_id(const HWIdentifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
create expanded HWIdentifier from HWIdentifier (return == 0 for OK)
size_type bits_offset() const
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
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...
int initLevelsFromDict(const std::string &group_name)
size_type m_channelHashMax
bool m_quiet
If true, suppress DEBUG/INFO messages.
bool isEnumerated() const
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
size_type m_feedthrough_index
IdentifierHash channel_Hash_binary_search(HWIdentifier channelId) const
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 get_label_value(const std::string &field, const std::string &label, int &value) const
std::vector< HWIdentifier > m_feedthrough_vec
Helper for the Liquid Argon Calorimeter cell identifiers.
bool isEMECOW(const HWIdentifier id) const override final
IdentifierHash feb_Hash_binary_search(HWIdentifier channelId) const
std::string to_string(const DetectorType &type)
virtual void setDictVersion(const IdDictMgr &dict_mgr, const std::string &name) override
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
std::vector< HashCalc > m_chan_hash_calcs
IdDictFieldImplementation m_bec_impl
bool is_H8(const HWIdentifier channelId) const
int initialize_from_dictionary(const IdDictMgr &) override final
initialization from the identifier dictionary
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
MultiRange m_full_feb_range
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
std::vector< HWIdentifier > m_feb_vec
MultiRange m_full_laronline_range
This is the individual specification for the range of one ExpandedIdentifier IdentifierField.
bool isHECchannel(const HWIdentifier id) const override final
size_type m_channel_in_slot_index
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
IdDictFieldImplementation m_bec_ft_impl
IdentifierHash feb_Hash(HWIdentifier febId) const
Create feb hash identifiers from feb identifiers.
bool match(std::string s1, std::string s2)
match the individual directories of two strings
HWIdentifier feedthrough_Id(int barrel_ec, int pos_neg, int feedthrough) const
Create a feedthrough identifier from fields.
Identifier::size_type size_type