|
ATLAS Offline Software
|
Go to the documentation of this file.
17 #include "GaudiKernel/MsgStream.h"
27 m_pixel_wafer_hash_max(0),
28 m_pixel_helper(nullptr),
35 m_pixel_wafer_hash_max(0),
36 m_pixel_helper(pixel_helper),
37 m_sct_helper(sct_helper)
49 else std::cout <<
" INFO SiliconID Initialize from dictionary" << std::endl;
52 if (
m_msgSvc)
log << MSG::INFO <<
"Request to reinitialize not satisfied - tags have not changed" <<
endmsg;
54 " INFO SiliconID::initialize_from_dictionary - Request to reinitialize not satisfied - tags have not changed" <<
59 else std::cout <<
" DEBUG SiliconID::initialize_from_dictionary - (Re)initialize" << std::endl;
103 if (
m_msgSvc)
log << MSG::INFO <<
"test_wafer_packing: wafer hash max, pix, sct "
108 else std::cout <<
" INFO SiliconID::test_wafer_packing: wafer hash max, pix, sct "
126 if (
m_msgSvc)
log << MSG::INFO <<
"test_wafer_packing: id "
129 else std::cout <<
" INFO SiliconID::test_wafer_packing: id "
137 if (
m_msgSvc)
log << MSG::ERROR <<
"test_wafer_packing: wafer_hash not equal to i "
138 <<
"hash: " <<
hash <<
" i: " <<
i <<
" "
141 else std::cout <<
" ERROR SiliconID::test_wafer_packing: wafer_hash not equal to i "
142 <<
"hash: " <<
hash <<
" i: " <<
i <<
" "
154 if (
m_msgSvc)
log << MSG::ERROR <<
"test_wafer_packing: is_barrel fails for sct. "
155 <<
"hash: " <<
hash <<
" i: " <<
i <<
" "
158 else std::cout <<
" ERROR SiliconID::test_wafer_packing: is_barrel fails for sct. "
159 <<
"hash: " <<
hash <<
" i: " <<
i <<
" "
167 if (
m_msgSvc)
log << MSG::ERROR <<
"test_wafer_packing: is_barrel fails for pixel. "
168 <<
"hash: " <<
hash <<
" i: " <<
i <<
" "
171 else std::cout <<
" ERROR SiliconID::test_wafer_packing: is_barrel fails for pixel. "
172 <<
"hash: " <<
hash <<
" i: " <<
i <<
" "
184 if (
m_msgSvc)
log << MSG::ERROR <<
"test_wafer_packing: is_blayer is sct. "
185 <<
"hash: " <<
hash <<
" i: " <<
i <<
" "
188 else std::cout <<
" ERROR SiliconID::test_wafer_packing: is_blayer is sct. "
189 <<
"hash: " <<
hash <<
" i: " <<
i <<
" "
195 if (
m_msgSvc)
log << MSG::ERROR <<
"test_wafer_packing: is_blayer fails for pixel. "
196 <<
"hash: " <<
hash <<
" i: " <<
i <<
" "
199 else std::cout <<
" ERROR SiliconID::test_wafer_packing: is_blayer fails for pixel. "
200 <<
"hash: " <<
hash <<
" i: " <<
i <<
" "
210 if (
m_msgSvc)
log << MSG::ERROR <<
"test_wafer_packing: is_hash_pixel "
211 <<
"hash: " <<
hash <<
" i: " <<
i <<
" "
214 else std::cout <<
" ERROR SiliconID::test_wafer_packing: is_hash_pixel "
215 <<
"hash: " <<
hash <<
" i: " <<
i <<
" "
225 log << MSG::INFO <<
"Looped over " << nids <<
" hashes "
227 log << MSG::INFO <<
"Number of is_barrel (pix/sct): " << nbar
228 <<
" " << nbarp <<
" " << nbars
230 log << MSG::INFO <<
"Number of is_blayer: " << nblay
232 log << MSG::INFO <<
"Number of matching is_hash_pixel/is_pixel: " << nHashPix
235 std::cout <<
" INFO Looped over " << nids <<
" hashes "
237 std::cout <<
" INFO Number of is_barrel (pix/sct): " << nbar
238 <<
" " << nbarp <<
" " << nbars
240 std::cout <<
" INFO Number of is_blayer: " << nblay
242 std::cout <<
" INFO Number of matching is_hash_pixel/is_pixel: " << nHashPix
247 if (
error)
return(1);
bool is_pixel(Identifier id) const
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const override final
Create compact id from hash id (return == 0 for OK)
Identifier wafer_id(IdentifierHash wafer_hash) const
Identifier from hash.
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
size_type wafer_hash_max(void) const
Hash table maximum sizes.
const SCT_ID * m_sct_helper
bool is_sct(Identifier id) const
int test_wafer_hashes(void) const
Tests of packing.
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
bool is_barrel(const Identifier &id) const
Test for barrel - generic, i.e. works for EITHER pixel or sct id.
IMessageSvc * m_msgSvc
pointer to the message service
bool is_blayer(const Identifier &id) const
Test for b-layer - WARNING: id MUST be pixel id, otherwise answer is not accurate....
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override final
Initialization from the identifier dictionary.
size_type m_wafer_hash_max
bool is_blayer(const Identifier &id) const
Test for pixle b-layer - generic, i.e. works for EITHER pixel or sct id.
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be pixel id, otherwise answer is not accurate. Use SiliconID for g...
bool is_hash_pixel(IdentifierHash wafer_hash) const
Test whether hash is pixel or sct.
This is an Identifier helper class for both the Pixel and SCT subdetectors. This class defines identi...
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const override final
Create hash id from compact id (return == 0 for OK)
int register_dict_tag(const IdDictMgr &dict_mgr, const std::string &dict_name)
Register the file and tag names for a particular IdDict dictionary.
size_type wafer_hash_max(void) const
size_type wafer_hash_max(void) const
size_type m_pixel_wafer_hash_max
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
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...
const PixelID * m_pixel_helper
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be sct id, otherwise answer is not accurate. Use SiliconID for gen...