|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
   10 #include "GaudiKernel/MsgStream.h" 
   24   m_larhvRegion_index(999),
 
   26   m_configuration_index(999),
 
   27   m_partition_index(999),
 
   60   std::string strg = 
" => initialize_from_dictionary()";
 
   65     std::cout << strg << std::endl;
 
   72             << 
"Request to reinitialize not satisfied - tags have not changed"  
   87     log << 
MSG::INFO << 
" => initialize_from_dictionary(dict_mgr) ="  
   95       strg = 
" initialize_from_dictionary - cannot access LArHighVoltage dictionary ";
 
  101       std::cout << 
"LArHVLineID::" << strg << std::endl;
 
  124   if (atlasDict->
get_label_value(
"subdet", 
"LArHighVoltage", larHVValue)) {
 
  125     std::stringstream strm;
 
  126     strm << atlasDict->
name();
 
  127     strg= 
" Could not get value for label 'LArHighVoltage' of field 'subdet' in dictionary "+strm.str();
 
  132       std::cout << 
"LArHVLineID:" << strg << std::endl;
 
  140   int configurationValue   = 1;
 
  142     std::stringstream strm;
 
  144     strg = 
"WARNING : Could not get value for label 'configuration' in dictionary "+strm.str();
 
  149       std::cout << strg << std::endl;
 
  153   log << 
MSG::DEBUG << 
"[init_from_dictionary] > configurationValue = " 
  154       << configurationValue << 
endmsg; 
 
  159   reg_id.
add(larHVValue);
 
  160   reg_id.
add(configurationValue); 
 
  167   log << 
MSG::INFO << 
"[initialize_from_dictionary] >  HV line range -> "   
  184   MsgStream 
log(m_msgSvc, 
"LArHVLineID" );
 
  187   exp_id << lar_field_value()
 
  193   if(context && context->end_index() >= m_hvline_index) {
 
  194     exp_id << hv_line(
id);
 
  208     log << 
MSG::INFO  << 
"LArHVLineID::initLevelsFromDict - dictionary NOT initialized " 
  231     log << 
MSG::INFO  << 
"WARNING : LArHVLineID::initLevelsFromDict - unable to find 'barrel-region1' region"   
  244     << 
"LArHVLineID::initLevelsFromDict - unable to find 'subdet' field " << 
endmsg ;
 
  248       << 
"[initLevelsFromDict] field 'LArHighVoltage' found OK "  << 
endmsg;
 
  257     << 
"LArHVLineID::initLevelsFromDict - unable to find 'configuration' field " << 
endmsg ;
 
  261       << 
"[initLevelsFromDict] field config=Atlas found OK "  << 
endmsg;
 
  269     log << 
MSG::INFO  <<  
"LArHVLineID::initLevelsFromDict - unable to find 'partition' field " 
  282     log << 
MSG::INFO  <<  
"LArHVLineID::initLevelsFromDict - unable to find 'canline' field " 
  296     log << 
MSG::INFO  <<  
"LArHVLineID::initLevelsFromDict - unable to find 'cannode' field " 
  310     log << 
MSG::INFO  <<  
"LArHVLineID::initLevelsFromDict - unable to find 'hvline' field " 
  331   log << 
MSG::DEBUG  << 
"[initLevelsFromDict] > ...implementation: m_larhvcalo_index " << 
endmsg;
 
  339   log << 
MSG::DEBUG  << 
"[initLevelsFromDict] Decode index and bit fields for each level: " << 
endmsg;
 
  359   std::stringstream strm1;
 
  360   std::stringstream strm2;
 
  361   std::stringstream strm3;
 
  370   unsigned int nids = 0;
 
  371   std::set<HWIdentifier> 
ids;
 
  375     for (
const auto & exp_id :rit) {
 
  382       if(!(
ids.insert(hv_id)).second){
 
  384     strg1 = 
"[init_hashes] > duplicated id for channel nb = "+strm1.str();
 
  386     strg3 = 
" expanded Id= "+strm3.str();
 
  398     strg1 = 
"[init_hashes] >";
 
  399     strg2 = 
" set size NOT EQUAL to hash max. size "+strm1.str();
 
  400     strg3 = 
" hash max "+strm2.str();
 
  409     std::cout << 
"LArOnlineID::" << strg1 << std::endl;
 
  410     std::cout << 
"Error" << strg2 << std::endl;
 
  411     std::cout << strg3 << std::endl;
 
  417   std::set<HWIdentifier>::const_iterator 
first = 
ids.begin();
 
  418   std::set<HWIdentifier>::const_iterator last  = 
ids.end();
 
  
IdDictRegion * find_region(const std::string ®ion_name) 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
const IdDictRegion & region(size_t i) const
Region at index i.
size_type m_partition_index
void add(element_type value)
Append a value into a new field.
IdDictFieldImplementation m_configuration_impl
IdContext hvlineContext() const
IMessageSvc * m_msgSvc
pointer to the message service
IdDictFieldImplementation m_partition_impl
const std::string & name() const
Dictionary name.
IdDictField * find_field(const std::string &name) const
int get_expanded_id(const HWIdentifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
size_type m_canline_index
const IdDictFieldImplementation & implementation(size_t i) const
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
LArHVLineID()
only allowed constructor
IdDictFieldImplementation m_atlas_impl
Field Implementation.
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
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
MultiRange m_full_atlas_highvoltage_range
size_type m_larhvRegion_index