 |
ATLAS Offline Software
|
Go to the documentation of this file.
6 #include "GaudiKernel/MsgStream.h"
31 std::string strg =
"initialize_from_dictionary";
36 std::cout << strg << std::endl;
53 strg =
" initialize_from_dictionary - cannot access LArCalorimeter dictionary ";
58 std::cout <<
"LArOnline_SuperCellID::" << strg << std::endl;
75 std::cout <<
"Finished initLevelsFromDict" << std::endl;
83 std::stringstream strm;
84 strm << atlasDict->
name();
85 strg=
" Could not get value for label 'LArCalorimeter' of field 'subdet' in dictionary "+strm.str();
90 std::cout <<
"LArOnline_SuperCellID:" << strg << std::endl;
96 int larOnlineField = -4;
98 std::stringstream strm;
100 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 strg =
"Could not get value for label 'LArOnlineCalib' of field 'part' in dictionary "+strm.str();
120 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;
154 std::stringstream strm;
156 strg=
"[initialize_from_dictionary] version= " + strm.str();
161 std::cout <<
"LArOnline_SuperCellID: " << strg << std::endl;
188 int size = (1 << bits);
193 std::stringstream strm1;
194 std::stringstream strm2;
211 strg =
"Min > "+strm.str();
212 strg1=
" "+strm1.str();
213 strg2=
" "+strm2.str();
220 std::cout << strg << std::endl;
221 std::cout << strg1 << std::endl;
222 std::cout << strg2 << std::endl;
234 strg =
" ***** Error channel ranges, id, hash, i = "+strm.str();
235 strg1=
" , "+strm1.str();
236 strg2=
" , "+strm2.str();
243 std::cout << strg << std::endl;
244 std::cout << strg1 << std::endl;
245 std::cout << strg2 << std::endl;
297 std::cout <<
" ***** Warning cannot get ft expanded id for " <<
show_to_string(
min) << std::endl;
310 for (
unsigned int j = 0; j < nvalues; ++j) {
322 std::stringstream strm, strm1, strm2, strm3;
327 strg =
"Min > " + strm.str() +
" " + strm1.str() +
" " + strm2.str() +
" " + strm3.str();
332 std::cout << strg << std::endl;
341 std::stringstream strm, strm1, strm2;
345 strg =
" ***** Error feb ranges, id, hash, i = " +
346 strm.str() +
" , " + strm1.str() +
" , "+strm2.str();
351 std::cout << strg << std::endl;
362 int ft = feedthrough(
id);
363 return ( barrel_ec(
id)==1
365 (
ft==3 ||
ft==10 ||
ft==16 ||
ft==22 )
382 return (
bec==1 && sl==2 && sideCondition && (
ft==2 ||
ft==9 ||
397 (
ft == 0 ||
ft == 1 ||
ft == 2 ||
ft == 4 ||
ft == 5 ||
ft == 7 ||
ft == 8 ||
ft == 9 ||
ft == 11 ||
ft == 12 ||
ft == 13 ||
ft == 14 ||
ft == 15 ||
398 ft == 17 ||
ft == 18 ||
ft == 19 ||
ft == 20 ||
ft == 21 ||
ft == 23 ||
ft == 24)) ||
399 (sl==2 && sideCondition && (
ft==2 ||
ft==9 ||
ft==15 ||
ft==21))));
405 return (
bec == 1 && !(
ft==3 ||
ft==10 ||
ft==16 ||
ft==22 ||
ft==6));
LArOnline_SuperCellID()
Default constructor.
MultiRange build_multirange() const
Get MultiRange for full dictionary.
bool isEMECOW(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
bool isEMECIW(const HWIdentifier id) const override final
IdDictFieldImplementation m_feedthrough_impl
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 std::string & name() const
Dictionary name.
const IdDictDictionary * m_dict
IdContext feedthroughContext() const
Define context for feedthroughs.
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
std::vector< HashCalcFeb > m_feb_hash_calcs
MultiRange m_full_feedthrough_range
bool isHECchannel(const HWIdentifier id) const override final
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
void set_bits(size_type bits, size_type bits_offset)
bool isEMECchannel(const HWIdentifier id) const override final
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)
const std::string & group() const
Group name for this helper.
size_type m_channelHashMax
bool isEnumerated() const
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
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
int initialize_from_dictionary(const IdDictMgr &dict_mgr) override final
initialization from the identifier dictionary
Helper for the Liquid Argon Calorimeter cell identifiers.
IdentifierHash feb_Hash_binary_search(HWIdentifier channelId) const
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
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
MultiRange m_full_laronline_range
This is the individual specification for the range of one ExpandedIdentifier IdentifierField.
element_type get_value_at(size_type index) const
~LArOnline_SuperCellID()
Default destructor.
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
size_type get_indices() const
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