![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
6 #include "GaudiKernel/MsgStream.h"
19 m_larhvRegion_index(999),
21 m_configuration_index(999),
22 m_partition_index(999),
55 std::string strg =
" => initialize_from_dictionary()";
60 std::cout << strg << std::endl;
67 <<
"Request to reinitialize not satisfied - tags have not changed"
82 log << MSG::INFO <<
" => initialize_from_dictionary(dict_mgr) ="
90 strg =
" initialize_from_dictionary - cannot access LArHighVoltage dictionary ";
96 std::cout <<
"LArHVLineID::" << strg << std::endl;
104 log << MSG::INFO <<
"Register_dict_tag of LArHighVoltage is OK" <<
endmsg;
109 log << MSG::INFO <<
"setDictVersion of LArHighVoltage is OK" <<
endmsg;
119 if (atlasDict->
get_label_value(
"subdet",
"LArHighVoltage", larHVValue)) {
120 std::stringstream strm;
121 strm << atlasDict->
m_name;
122 strg=
" Could not get value for label 'LArHighVoltage' of field 'subdet' in dictionary "+strm.str();
127 std::cout <<
"LArHVLineID:" << strg << std::endl;
135 int configurationValue = 1;
137 std::stringstream strm;
139 strg =
"WARNING : Could not get value for label 'configuration' in dictionary "+strm.str();
144 std::cout << strg << std::endl;
148 log <<
MSG::DEBUG <<
"[init_from_dictionary] > configurationValue = "
149 << configurationValue <<
endmsg;
154 reg_id.
add(larHVValue);
155 reg_id.
add(configurationValue);
162 log << MSG::INFO <<
"[initialize_from_dictionary] > HV line range -> "
179 MsgStream
log(m_msgSvc,
"LArHVLineID" );
182 exp_id << lar_field_value()
188 if(context && context->end_index() >= m_hvline_index) {
189 exp_id << hv_line(
id);
203 log << MSG::INFO <<
"LArHVLineID::initLevelsFromDict - dictionary NOT initialized "
208 log << MSG::INFO <<
"[initLevelsFromDict] m_dict OK ... " <<
endmsg;
226 log << MSG::INFO <<
"WARNING : LArHVLineID::initLevelsFromDict - unable to find 'barrel-region1' region"
239 <<
"LArHVLineID::initLevelsFromDict - unable to find 'subdet' field " <<
endmsg ;
243 <<
"[initLevelsFromDict] field 'LArHighVoltage' found OK " <<
endmsg;
252 <<
"LArHVLineID::initLevelsFromDict - unable to find 'configuration' field " <<
endmsg ;
256 <<
"[initLevelsFromDict] field config=Atlas found OK " <<
endmsg;
264 log << MSG::INFO <<
"LArHVLineID::initLevelsFromDict - unable to find 'partition' field "
277 log << MSG::INFO <<
"LArHVLineID::initLevelsFromDict - unable to find 'canline' field "
291 log << MSG::INFO <<
"LArHVLineID::initLevelsFromDict - unable to find 'cannode' field "
305 log << MSG::INFO <<
"LArHVLineID::initLevelsFromDict - unable to find 'hvline' field "
326 log <<
MSG::DEBUG <<
"[initLevelsFromDict] > ...implementation: m_larhvcalo_index " <<
endmsg;
334 log <<
MSG::DEBUG <<
"[initLevelsFromDict] Decode index and bit fields for each level: " <<
endmsg;
354 std::stringstream strm1;
355 std::stringstream strm2;
356 std::stringstream strm3;
365 unsigned int nids = 0;
366 std::set<HWIdentifier>
ids;
379 if(!(
ids.insert(hv_id)).second){
381 strg1 =
"[init_hashes] > duplicated id for channel nb = "+strm1.str();
383 strg3 =
" expanded Id= "+strm3.str();
395 strg1 =
"[init_hashes] >";
396 strg2 =
" set size NOT EQUAL to hash max. size "+strm1.str();
397 strg3 =
" hash max "+strm2.str();
406 std::cout <<
"LArOnlineID::" << strg1 << std::endl;
407 std::cout <<
"Error" << strg2 << std::endl;
408 std::cout << strg3 << std::endl;
414 std::set<HWIdentifier>::const_iterator
first =
ids.begin();
415 std::set<HWIdentifier>::const_iterator last =
ids.end();
IdDictRegion * find_region(const std::string ®ion_name) const
IdContext hvlineContext(void) const
MultiRange build_multirange() const
Get MultiRange for full dictionary.
std::vector< HWIdentifier > m_hvline_vec
HWIdentifier HVLineId(int part, int canline, int cannode, int line) const
Create an HighVoltage line identifier from fields.
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
size_type m_cannode_index
std::string show_to_string(void) const
size_type m_partition_index
void add(element_type value)
IdDictFieldImplementation m_configuration_impl
IMessageSvc * m_msgSvc
pointer to the message service
IdDictFieldImplementation m_partition_impl
reg
globals -----------------------------------------------------------------—
IdDictField * find_field(const std::string &name) const
LArHVLineID(void)
only allowed constructor
int initLevelsFromDict(void)
int get_expanded_id(const HWIdentifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
size_type m_canline_index
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
IdDictFieldImplementation m_atlas_impl
Field Implementation.
std::vector< IdDictRegion * > m_regions
MultiRange m_full_hvline_range
size_type m_configuration_index
const IdDictDictionary * m_dict
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
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr)
Initialization from the identifier dictionary.
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.
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
IdDictFieldImplementation m_cannode_impl
size_type m_hvlineHashMax
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
size_type cardinality() const
Computes a possible cardinality from all ranges.
MultiRange m_full_canline_range
IdDictFieldImplementation m_canline_impl
IdDictFieldImplementation m_hvline_impl
std::vector< IdDictFieldImplementation > m_implementation
MultiRange m_full_atlas_highvoltage_range
size_type m_larhvRegion_index