![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
6 #include "GaudiKernel/MsgStream.h"
34 std::string strg =
"initialize_from_dictionary";
39 std::cout << strg << std::endl;
56 std::string strg =
" initialize_from_dictionary - cannot access LArCalorimeter dictionary ";
61 std::cout <<
"LArOnlineID::" << strg << std::endl;
82 std::stringstream strm;
84 std::string strg=
" Could not get value for label 'LArCalorimeter' of field 'subdet' in dictionary "+strm.str();
89 std::cout <<
"LArOnlineID:" << strg << std::endl;
95 int larOnlineField = -4;
97 std::stringstream strm;
99 std::string strg =
"Could not get value for label 'LArOnline' of field 'part' in dictionary "+strm.str();
104 std::cout << strg << std::endl;
110 int larOnlineCalibField = -5;
112 std::stringstream strm;
114 std::string strg =
"Could not get value for label 'LArOnlineCalib' of field 'part' in dictionary "+strm.str();
119 std::cout << strg << std::endl;
136 std::string strg0=
" initialize_from_dictionary :";
138 std::string strg2=
" feedthrough slot range -> " + (std::string)
m_full_feb_range;
147 std::cout << strg0 << std::endl;
148 std::cout << strg1 << std::endl;
149 std::cout << strg2 << std::endl;
150 std::cout << strg3 << std::endl;
157 std::stringstream strm;
159 std::string strg=
"[initialize_from_dictionary] version= " + strm.str();
164 std::cout <<
"LArOnlineID: " << strg << std::endl;
207 int size = (1 << bits);
212 std::stringstream strm1;
213 std::stringstream strm2;
228 std::stringstream strm;
232 std::string strg =
"Min > "+strm.str();
233 std::string strg1=
" "+strm1.str();
234 std::string strg2=
" "+strm2.str();
241 std::cout << strg << std::endl;
242 std::cout << strg1 << std::endl;
243 std::cout << strg2 << std::endl;
254 std::stringstream strm;
258 std::string strg =
" ***** Error channel ranges, id, hash, i = "+strm.str();
259 std::string strg1=
" , "+strm1.str();
260 std::string strg2=
" , "+strm2.str();
267 std::cout << strg << std::endl;
268 std::cout << strg1 << std::endl;
269 std::cout << strg2 << std::endl;
323 std::cout <<
" ***** Warning cannot get ft expanded id for " <<
show_to_string(
min) << std::endl;
326 unsigned int nrangesFound = 0;
341 if (nrangesFound > 1) {
349 for (
unsigned int j = 0; j < nvalues; ++j) {
355 log << MSG::WARNING <<
" ***** Warning feb range slot field is NOT both_bounded - id, slot mode: "
358 std::cout <<
" ***** Warning feb range slot field is NOT both_bounded - id, slot mode: "
379 std::cout << strg << std::endl;
388 std::string strg =
" ***** Warning feb ranges, id, hash, i = " +
394 std::cout << strg << std::endl;
414 std::set<HWIdentifier>
ids;
429 if(!(
ids.insert(
id)).second)
431 strg1 =
" init_hashes : duplicated id for channel nb = "+
std::to_string(nids);
440 std::cout <<
"LArOnlineID::Error" << strg1 << std::endl;
441 std::cout << strg3 << std::endl;
447 unsigned int nidtb=0;
448 std::set<HWIdentifier>::const_iterator
first =
ids.begin();
449 std::set<HWIdentifier>::const_iterator last =
ids.end();
478 if(!(
ids.insert(febId)).second)
480 strg1 =
" init_hashes: duplicated id for FEB nb = "+
std::to_string(nids);
489 std::cout <<
"LArOnlineID:: Error" << strg1 << std::endl;
490 std::cout << strg3 << std::endl;
525 int test_bec =
barrel_ec( feedthroughId);
526 int test_pn =
pos_neg( feedthroughId);
529 <<
"," << test_pn <<
"," << test_ft <<
"]"<<
endmsg;
530 if(!(
ids.insert(feedthroughId)).second)
532 strg1 =
" init_hashes : duplicated id for feedthrough nb = "+
std::to_string(nids);
541 std::cout <<
"LArOnlineID::Error" << strg1 << std::endl;
542 std::cout << strg3 << std::endl;
576 std::set<HWIdentifier>
ids;
592 if(!(
ids.insert(
id)).second)
594 strg1 =
" init_hashes: duplicated id for channel nb = "+
std::to_string(nids);
603 std::cout <<
"LArOnlineID:: Error" << strg1 << std::endl;
604 std::cout << strg3 << std::endl;
610 unsigned int nidtb=0;
611 std::set<HWIdentifier>::const_iterator
first =
ids.begin();
612 std::set<HWIdentifier>::const_iterator last =
ids.end();
640 if(!(
ids.insert(febId)).second)
642 strg1 =
" init_hashes : duplicated id for FEB nb = "+
std::to_string(nids);
651 std::cout <<
"LArOnlineID::Error" << strg1 << std::endl;
652 std::cout << strg3 << std::endl;
693 int test_bec =
barrel_ec( feedthroughId);
694 int test_pn =
pos_neg( feedthroughId);
697 <<
"," << test_pn <<
"," << test_ft <<
"]"<<
endmsg;
698 if(!(
ids.insert(feedthroughId)).second)
700 strg1 =
" init_hashes : duplicated id for feedthrough nb = "+
std::to_string(nids);
709 std::cout <<
"LArOnlineID::Error" << strg1 << std::endl;
710 std::cout << strg3 << std::endl;
737 int ft = feedthrough(
id);
738 return ( barrel_ec(
id)==1
740 (
ft==3 ||
ft==10 ||
ft==16 ||
ft==22 )
751 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
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
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.
element_type get_minimum() 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
element_type get_maximum() const
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
mode get_mode() const
Query the values.
This is the individual specification for the range of one ExpandedIdentifier field.
bool isHECchannel(const HWIdentifier id) const override final
size_type m_channel_in_slot_index
const element_vector & get_values() const
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