Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
TileTBID.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  Access to Tile Calorimeter TB data
7  -----------------------------------------
8  ***************************************************************************/
9 
10 //<doc><file> $Id: TileTBID.cxx,v 1.1 2009-03-30 11:19:28 tsulaia Exp $
11 //<version> $Name: not supported by cvs2svn $
12 
14 #include "IdDict/IdDictDefs.h"
17 #include "CxxUtils/StrFormat.h"
18 #include "GaudiKernel/MsgStream.h"
19 
20 #include <algorithm>
21 #include <cassert>
22 #include <cstdio>
23 #include <iostream>
24 
26 
27 
29  : m_tile_region_index(0)
30  , m_SYSTEM_INDEX(999)
31  , m_SECTION_INDEX(999)
32  , m_TYPE_INDEX(999)
33  , m_MODULE_INDEX(999)
34  , m_CHANNEL_INDEX(999)
35  , m_dict(nullptr)
36  , m_type_hash_max(0)
37  , m_module_hash_max(0)
38  , m_channel_hash_max(0)
39 {
40 }
41 
43 = default;
44 
45 //
46 // TileTBID methods
47 //
48 std::string
49 TileTBID::to_string( const Identifier & id, int level ) const
50 {
51  IdContext context;
52  switch (level) {
53  case 1: case -3:
54  case 2: case -2: context = type_context(); break;
55  case 3: case -1: context = module_context(); break;
56  case 4: case 0: context = channel_context(); break;
57  default:
58  return "TileTBID::to_string - unknown context";
59  }
60 
61  ExpandedIdentifier exp_id;
62  if ( get_expanded_id(id,exp_id,&context) ) {
63  return "TileTBID::to_string - can not expand ID";
64  } else {
65  return (std::string)(exp_id);
66  }
67 }
68 
69 //
70 // get methods
71 //
72 int
74 {
75  int field = 0;
76  if(!m_dict->unpack(id, 0, index, m_tile_region_index, field)) {
77  return field;
78  } else {
79  return 0;
80  }
81 }
82 
83 //
84 // check methods
85 //
86 bool
88 {
89  bool result = is_tile(id)
90  && ( section(id) == TileTBID::TILE_TESTBEAM );
91 
92  return result;
93 }
94 
95 //
96 // TileCal TB ID
97 //
100 {
101  Identifier compactID(m_base_tile_type);
102  return compactID;
103 }
104 
105 //
106 // Build type & module id
107 //
109 TileTBID::type_id ( int type, bool checks ) const
110 {
111  if(checks) {
112 
113  // Check that id is within allowed range
114 
115  // Fill expanded id
116  ExpandedIdentifier expId(tile_exp());
117  expId << TileTBID::TILE_TESTBEAM << type;
118 
119  if (!m_full_type_range.match(expId)) {
120  std::string errorMessage = "TileTBID::type_id() result is not OK: ID, range = "
121  + std::string(expId) + " , " + (std::string)m_full_type_range;
122  throw TileID_Exception(errorMessage , 2);
123  }
124  }
125 
126  Identifier compactID(m_base_tile_type);
127  m_type_impl.pack (type,compactID);
128 
129  return (compactID);
130 }
132 TileTBID::type_id ( int type ) const
133 {
134  return type_id (type, do_checks());
135 }
136 
137 
139 TileTBID::module_id ( int type, int module, bool checks ) const
140 {
141  if(checks) {
142 
143  // Check that id is within allowed range
144 
145  // Fill expanded id
146  ExpandedIdentifier expId(tile_exp());
147  expId << TileTBID::TILE_TESTBEAM << type << module;
148 
149  if (!m_full_module_range.match(expId)) {
150  std::string errorMessage = "TileTBID::module_id() result is not OK: ID, range = "
151  + std::string(expId) + " , " + (std::string)m_full_type_range;
152  throw TileID_Exception(errorMessage , 1);
153  }
154  }
155 
156  Identifier compactID(m_base_tile_type);
157  m_type_impl.pack (type,compactID);
158  m_module_impl.pack (module,compactID);
159 
160  return (compactID);
161 }
163 TileTBID::module_id ( int type, int module ) const
164 {
165  return module_id (type, module, do_checks());
166 }
167 
168 //
169 // Build channel id
170 //
172 TileTBID::channel_id ( int type, int module, int channel, bool checks ) const
173 {
174  if(checks) {
175 
176  // Check that id is within allowed range
177 
178  // Fill expanded id
179  ExpandedIdentifier expId(tile_exp());
180  expId << TileTBID::TILE_TESTBEAM << type << module << channel;
181 
182  if (!m_full_channel_range.match(expId)) {
183  std::string errorMessage = "TileTBID::channel_id() result is not OK: ID, range = "
184  + std::string(expId) + " , " + (std::string)m_full_type_range;
185  throw TileID_Exception(errorMessage , 1);
186  }
187  }
188 
189  Identifier compactID(m_base_tile_type);
190  m_type_impl.pack (type,compactID);
191  m_module_impl.pack (module,compactID);
192  m_channel_impl.pack (channel,compactID);
193 
194  return (compactID);
195 }
197 TileTBID::channel_id ( int type, int module, int channel ) const
198 {
199  return channel_id (type, module, channel, do_checks());
200 }
201 
203 TileTBID::module_id ( const Identifier & any_id ) const
204 {
205  Identifier compactId(any_id);
206  m_channel_impl.reset(compactId);
207 
208  return (compactId);
209 }
210 
212 TileTBID::channel_id ( const Identifier & module_id,
213  int channel ) const
214 {
215  Identifier compactId(module_id);
216  m_channel_impl.pack(channel,compactId);
217 
218  if(m_do_checks) {
219 
220  // Check that id is within allowed range
221 
222  // Fill expanded id
223  ExpandedIdentifier expId;
224 
225  IdContext context = module_context();
226  if (get_expanded_id(compactId, expId, &context)) {
227  std::string errorMessage = "TileTBID::channel_id(module_id,channel) result is not OK: ID = "
228  + compactId.getString() ;
229  throw TileID_Exception(errorMessage , 1);
230 
231  // region_id.show();
232  }
233 
234  expId << channel;
235 
236  if (!m_full_channel_range.match(expId)) {
237  std::string errorMessage = "TileTBID::channel_id() result is not OK: ID, range = "
238  + (std::string)expId + " , " + (std::string)m_full_type_range;
239  throw TileID_Exception(errorMessage , 1);
240  }
241  }
242 
243  return compactId;
244 }
245 
246 bool TileTBID::module_id ( const Identifier& type_id,
247  int module, Identifier& module_id )
248 {
250  IdContext context = type_context();
251  get_expanded_id(type_id, id, &context);
252  id << module;
253  if (!m_full_module_range.match(id)) {
254  return false;
255  }
256 
257  Identifier compactId(0);
258  if (!m_dict->pack32(id,0, id.fields() - 1,compactId)) {
259  module_id = compactId;
260  }
261  return true;
262 }
263 
264 bool TileTBID::channel_id ( const Identifier& type_id,
265  int module, int channel, Identifier& channel_id )
266 {
268  IdContext context = type_context();
269  get_expanded_id(type_id, id, &context);
270  id << module << channel;
271  if (!m_full_channel_range.match(id)) {
272  return false;
273  }
274 
275  Identifier compactId(0);
276  if (!m_dict->pack32(id,0, id.fields() - 1,compactId)) {
277  channel_id = compactId;
278  }
279  return true;
280 }
281 
282 bool TileTBID::channel_id ( const Identifier& module_id,
283  int channel, Identifier& channel_id )
284 {
286  IdContext context = module_context();
287  get_expanded_id(module_id, id, &context);
288  id << channel;
289  if (!m_full_channel_range.match(id)) {
290  return false;
291  }
292 
293  Identifier compactId(0);
294  if (!m_dict->pack32(id,0, id.fields() - 1,compactId)) {
295  channel_id = compactId;
296  }
297  return true;
298 }
299 
300 IdContext
302 {
304  return {id, 0, m_TYPE_INDEX};
305 }
306 
307 IdContext
309 {
311  return {id, 0, m_MODULE_INDEX};
312 }
313 
314 IdContext
316 {
318  return {id, 0, m_CHANNEL_INDEX};
319 }
320 
321 int TileTBID::get_id (const IdentifierHash& hash_id, Identifier& id, const IdContext* context ) const
322 {
323  int result = 1;
324  id.clear();
325 
326  size_t begin = (context) ? context->begin_index(): 0;
327  // cannot get hash if end is 0:
328  size_t end = (context) ? context->end_index() : 0;
329 
330  if (0 == begin) {
331 
332  if ( m_CHANNEL_INDEX == end ) {
333  if (hash_id < (unsigned int)(m_channel_vec.end() - m_channel_vec.begin())) {
334  id = m_channel_vec[hash_id];
335  result = 0;
336  } else {
337  MsgStream log(m_msgSvc, "TileTBID" );
338  log << MSG::ERROR << "get_id: channel hash_id is out of range " << hash_id
339  << " => " << m_channel_vec.size() << endmsg;
340  }
341  } else if ( m_MODULE_INDEX == end ) {
342  if (hash_id < (unsigned int)(m_module_vec.end() - m_module_vec.begin())) {
343  id = m_module_vec[hash_id];
344  result = 0;
345  } else {
346  MsgStream log(m_msgSvc, "TileTBID" );
347  log << MSG::ERROR << "get_id: module hash_id is out of range "
348  << hash_id << " => " << m_module_vec.size() << endmsg;
349  }
350  } else if ( m_TYPE_INDEX == end ) {
351  if (hash_id < (unsigned int)(m_type_vec.end() - m_type_vec.begin())) {
352  id = m_type_vec[hash_id];
353  result = 0;
354  } else {
355  MsgStream log(m_msgSvc, "TileTBID" );
356  log << MSG::ERROR << "get_id: TYPE hash_id is out of range " << hash_id
357  << " => " << m_type_vec.size() << endmsg;
358  }
359  }
360  }
361  return(result);
362 }
363 
364 
365 int TileTBID::get_hash (const Identifier& id, IdentifierHash& hash_id, const IdContext* context ) const
366 {
367 
368  hash_id = 0;
369  int result = 1;
370 
371  size_t begin = (context) ? context->begin_index(): 0;
372  size_t end = (context) ? context->end_index() : 0;
373 
374  if (0 == begin) {
375  if ( m_CHANNEL_INDEX == end ) {
376  std::vector<Identifier>::const_iterator it = std::lower_bound(m_channel_vec.begin(),m_channel_vec.end(),id);
377  if ( it != m_channel_vec.end() ){
378  hash_id = it - m_channel_vec.begin();
379  result = 0;
380  }
381  } else if ( m_MODULE_INDEX == end ) {
382  std::vector<Identifier>::const_iterator it = std::lower_bound(m_module_vec.begin(),m_module_vec.end(),id);
383  if ( it != m_module_vec.end() ){
384  hash_id = it - m_module_vec.begin();
385  result = 0;
386  }
387  } else if ( m_TYPE_INDEX == end ) {
388  std::vector<Identifier>::const_iterator it = std::lower_bound(m_type_vec.begin(),m_type_vec.end(),id);
389  if ( it != m_type_vec.end() ){
390  hash_id = it - m_type_vec.begin();
391  result = 0;
392  }
393  }
394  }
395 
396  return (result);
397 }
398 
400 {
401  MsgStream log(m_msgSvc, "TileTBID" );
402  log << MSG::INFO << "initialize_from_dictionary " << endmsg;
403 
404  // Check whether this helper should be reinitialized
405  if (!reinitialize(dict_mgr)) {
406  log << MSG::DEBUG << "Request to reinitialize not satisfied - tags have not changed" << endmsg;
407  return (0);
408  }
409  else {
410  log << MSG::DEBUG << "(Re)initialize" << endmsg;
411  }
412 
413  log << MSG::DEBUG << "calling base initialize_from_dictionary" << endmsg;
414 
415  // init base object
416  if(AtlasDetectorID::initialize_from_dictionary(dict_mgr)) return (1);
417 
418  // Register version of the TileCalo dictionary
419  if (register_dict_tag(dict_mgr, "TileCalorimeter")) return(1);
420 
421  m_dict = dict_mgr.find_dictionary ("TileCalorimeter");
422  if(!m_dict) {
423  log << MSG::ERROR << "cannot access TileCalorimeter dictionary " << endmsg;
424  return 1;
425  }
426 
427  // Initialize the field indices
428  if(initLevelsFromDict()) return (1);
429 
430 
431  // Find value for the field Tile Calorimeter
432  const IdDictDictionary* atlasDict = dict_mgr.find_dictionary ("ATLAS");
433  int tileField = -1;
434  if (atlasDict->get_label_value("subdet", "TileCalorimeter", tileField)) {
435  log << MSG::ERROR << "Could not get value for label 'TileCalorimeter' of field 'subdet' in dictionary "
436  << atlasDict->m_name
437  << endmsg;
438  return (1);
439  }
440 
441  // Find value for the field Tile Testbeam
442  int tiletbField = -1;
443  if (m_dict->get_label_value("section", "Testbeam", tiletbField)) {
444  log << MSG::ERROR << "Could not get value for label 'Testbeam' of field 'section' in dictionary "
445  << m_dict->m_name
446  << endmsg;
447  return (1);
448  }
449 
450  /*
451  log << MSG::DEBUG << "TileTB_ID::initialize_from_dict - found field values: TileTB "
452  << TileTBField
453  << endmsg;
454  */
455 
456  // Set up id for region and range prefix
457  ExpandedIdentifier reg_id;
458  reg_id.add(tileField);
459  reg_id.add(tiletbField);
460  Range prefix;
461 
462  m_full_channel_range= m_dict->build_multirange(reg_id, prefix, "tbchannel");
463  m_full_module_range = m_dict->build_multirange(reg_id, prefix, "tbmodule");
464  m_full_type_range = m_dict->build_multirange(reg_id, prefix, "type");
465 
466  if (!m_quiet) {
467  log << MSG::DEBUG << "initialize_from_dict : " << endmsg;
468  log << MSG::DEBUG << " type range -> " << (std::string)m_full_type_range << endmsg;
469  log << MSG::DEBUG << " module range -> " << (std::string)m_full_module_range << endmsg;
470  log << MSG::DEBUG << " channel range -> " << (std::string)m_full_channel_range << endmsg;
471  }
472 
473  // Setup the hash tables
474  if(init_hashes()) return (1);
475 
476  return 0;
477 
478 }
479 
480 int TileTBID::get_expanded_id (const Identifier& id, ExpandedIdentifier& exp_id, const IdContext* context) const
481 {
482  int result = 1;
483 
484  size_t begin = (context) ? context->begin_index() : 0;
485  size_t end = (context) ? context->end_index() : m_CHANNEL_INDEX;
486  assert (end <= m_CHANNEL_INDEX);
487 
488  if (0 == end) {
489  result = 0;
490  }
491  else if ( 0 == begin) {
492  ExpandedIdentifier empty;
493  result = m_dict->unpack(id, empty, end, exp_id);
494  }
495  else {
496  result = m_dict->unpack(id, context->prefix_id(), end, exp_id);
497  }
498  return result;
499 }
500 
502 {
503  MsgStream log(m_msgSvc, "TileTBID" );
504 
505  if(!m_dict) {
506  log << MSG::ERROR << "initLevelsFromDict - dictionary NOT initialized "
507  << endmsg ;
508  return (1);
509  }
510 
511  // Find out which identifier field corresponds to each level.
512 
513  m_SYSTEM_INDEX = 999;
514  m_SECTION_INDEX = 999;
515  m_TYPE_INDEX = 999;
516  m_MODULE_INDEX = 999;
517  m_CHANNEL_INDEX = 999;
518 
519  // Save index to a Tile region for unpacking
520  ExpandedIdentifier expId(tile_exp());
522  log << MSG::ERROR << "initLevelsFromDict - unable to find tile region index: expId, reg "
523  << (std::string)expId << " " << m_tile_region_index
524  << endmsg;
525  return (1);
526  }
527 
528  // Fing a Tile region
529  IdDictField* field = m_dict->find_field("subdet") ;
530  if (field) {
531  m_SYSTEM_INDEX = field->m_index ;
532  }
533  else {
534  log << MSG::ERROR << "initLevelsFromDict - unable to find 'subdet' field "
535  << endmsg ;
536  return (1);
537  }
538 
539  field = m_dict->find_field("section") ;
540  if (field) {
541  m_SECTION_INDEX = field->m_index ;
542  }
543  else {
544  log << MSG::ERROR << "initLevelsFromDict - unable to find 'section' field "
545  << endmsg ;
546  return (1);
547  }
548 
549  field = m_dict->find_field("type") ;
550  if (field) {
551  m_TYPE_INDEX = field->m_index ;
552  }
553  else {
554  log << MSG::ERROR << "initLevelsFromDict - unable to find 'type' field "
555  << endmsg ;
556  return (1);
557  }
558 
559  field = m_dict->find_field("tbmodule") ;
560  if (field) {
561  m_MODULE_INDEX = field->m_index ;
562  }
563  else {
564  log << MSG::ERROR << "initLevelsFromDict - unable to find 'tbmodule' field "
565  << endmsg ;
566  return (1);
567  }
568 
569  field = m_dict->find_field("tbchannel") ;
570  if (field) {
571  m_CHANNEL_INDEX = field->m_index ;
572  }
573  else {
574  log << MSG::ERROR << "initLevelsFromDict - unable to find 'tbchannel' field "
575  << endmsg ;
576  return (1);
577  }
578 
579  /* Set the field implementations */
581 
587 
591 
592  if (!m_quiet) {
593  log << MSG::DEBUG << "initLevelsFromDict decode index and bit fields for each level: " << endmsg ;
594  log << MSG::DEBUG << " system [" << m_SYSTEM_INDEX << "] " << m_system_impl.show_to_string() << endmsg ;
595  log << MSG::DEBUG << " section [" << m_SECTION_INDEX << "] " << m_section_impl.show_to_string() << endmsg ;
596  log << MSG::DEBUG << " type [" << m_TYPE_INDEX << "] " << m_type_impl.show_to_string() << endmsg ;
597  log << MSG::DEBUG << " module [" << m_MODULE_INDEX << "] " << m_module_impl.show_to_string() << endmsg ;
598  log << MSG::DEBUG << " channel [" << m_CHANNEL_INDEX << "] " << m_channel_impl.show_to_string() << endmsg ;
599  }
600 
601  return(0) ;
602 }
603 
605 {
606  MsgStream log(m_msgSvc, "TileTBID" );
607 
608  // type hash
609  unsigned int nids = 0;
610  std::set<Identifier> ids;
611  for (unsigned int i = 0; i < m_full_type_range.size(); ++i) {
612  const Range& range = m_full_type_range[i];
614  auto first = rit.begin();
615  auto last = rit.end();
616  for (; first != last; ++first) {
617  const ExpandedIdentifier& exp_id = (*first);
618  Identifier id = type_id (exp_id[m_TYPE_INDEX]);
619  if(!(ids.insert(id)).second){
620  log << MSG::ERROR << "init_hashes "
621  << " Error: duplicated id for type id. nids= " << nids
622  << " compact Id " << show_to_string(id)
623  << endmsg;
624  }
625  nids++;
626  }
627  }
629  if ( fill_vec(ids, m_type_hash_max, m_type_vec) ) return (1);
630 
631  // module hash
632  nids = 0;
633  ids.clear();
634  for (unsigned int i = 0; i < m_full_module_range.size(); ++i) {
635  const Range& range = m_full_module_range[i];
637  auto first = rit.begin();
638  auto last = rit.end();
639  for (; first != last; ++first) {
640  const ExpandedIdentifier& exp_id = (*first);
641  Identifier id = module_id (exp_id[m_TYPE_INDEX],
642  exp_id[m_MODULE_INDEX]);
643  if(!(ids.insert(id)).second){
644  log << MSG::ERROR << "init_hashes "
645  << " Error: duplicated id for module id. nids= " << nids
646  << " compact Id " << show_to_string(id)
647  << endmsg;
648  }
649  nids++;
650  }
651  }
653  if ( fill_vec(ids, m_module_hash_max, m_module_vec) ) return (1);
654 
655  // channel hash
656  nids = 0;
657  ids.clear();
658  for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
659  const Range& range = m_full_channel_range[i];
661  auto first = rit.begin();
662  auto last = rit.end();
663  for (; first != last; ++first) {
664  const ExpandedIdentifier& exp_id = (*first);
665  Identifier id = channel_id (exp_id[m_TYPE_INDEX],
666  exp_id[m_MODULE_INDEX],
667  exp_id[m_CHANNEL_INDEX]);
668  if(!(ids.insert(id)).second){
669  log << MSG::ERROR << "init_hashes "
670  << " Error: duplicated id for channel id. nids= " << nids
671  << " compact Id " << show_to_string(id)
672  << endmsg;
673  }
674  nids++;
675  }
676  }
678  if ( fill_vec(ids, m_channel_hash_max, m_channel_vec) ) return (1);
679 
680  return (0);
681 }
682 
683 int TileTBID::fill_vec (std::set<Identifier> & ids,
684  unsigned int hash_max, std::vector<Identifier> & vec)
685 {
686 
687  if(ids.size() != hash_max) {
688 
689  MsgStream log(m_msgSvc, "TileTBID" );
690  log << MSG::ERROR << "fill_vec "
691  << " Error: set size NOT EQUAL to hash max. size " << ids.size()
692  << " hash max " << hash_max
693  << endmsg;
694 
695  return (1);
696  }
697 
698  vec.resize(hash_max);
699 
700  std::set<Identifier>::const_iterator first = ids.begin();
701  std::set<Identifier>::const_iterator last = ids.end();
702 
703  int index = 0;
704  for (;first != last; ++first) {
705  vec[index++] = (*first);
706  }
707 
708  return (0);
709 }
710 
714 
TileTBID::m_module_vec
std::vector< Identifier > m_module_vec
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:301
IdDictDictionary::find_region
IdDictRegion * find_region(const std::string &region_name) const
Definition: IdDictDictionary.cxx:92
ConstRangeIterator
Definition: RangeIterator.h:46
TileTBID::channel_id
Identifier channel_id(int type, int module, int channel) const
identifer for one channel of a Tile testbeam detector
Definition: TileTBID.cxx:197
IdDictDictionary::build_multirange
MultiRange build_multirange() const
Get MultiRange for full dictionary.
Definition: IdDictDictionary.cxx:290
TileTBID::m_SECTION_INDEX
size_type m_SECTION_INDEX
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:281
TileTBID::to_string
std::string to_string(const Identifier &id, int level=0) const
extract all fields from TileTB identifier Identifier get_all_fields ( const Identifier & id,...
Definition: TileTBID.cxx:49
IdDictDictionary::unpack
int unpack(const Identifier &id, const ExpandedIdentifier &prefix, size_t index2, ExpandedIdentifier &unpackedId) const
Unpack the value_type id to an expanded Identifier, considering the provided prefix (result will incl...
Definition: IdDictDictionary.cxx:674
AtlasDetectorID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
Definition: AtlasDetectorID.cxx:240
get_generator_info.result
result
Definition: get_generator_info.py:21
TileTBID::module_id
Identifier module_id(int type, int module) const
identifer for one module of a Tile testbeam detector
Definition: TileTBID.cxx:163
TileTBID::initialize_from_dictionary
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr)
initialization from the identifier dictionary
Definition: TileTBID.cxx:399
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
TileTBID::TILE_TESTBEAM
@ TILE_TESTBEAM
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:82
TileTBID::is_tiletb
bool is_tiletb(const Identifier &id) const
Test ID if it is TileTBID.
Definition: TileTBID.cxx:87
TileTBID::type_id
Identifier type_id(int type) const
identifer for Tile testbeam detectors of a give type
Definition: TileTBID.cxx:132
TileTBID::TileTBID
TileTBID(void)
Default constructor.
Definition: TileTBID.cxx:28
TileTBID::m_MODULE_INDEX
size_type m_MODULE_INDEX
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:283
IdDictFieldImplementation::show_to_string
std::string show_to_string(void) const
Definition: IdDictFieldImplementation.cxx:38
index
Definition: index.py:1
TileTBID::m_system_impl
IdDictFieldImplementation m_system_impl
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:288
TileTBID::m_section_impl
IdDictFieldImplementation m_section_impl
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:289
IdContext::end_index
size_type end_index() const
Definition: IdContext.h:46
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
ExpandedIdentifier::add
void add(element_type value)
Append a value into a new field.
skel.it
it
Definition: skel.GENtoEVGEN.py:407
TileTBID::m_channel_impl
IdDictFieldImplementation m_channel_impl
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:292
ExpandedIdentifier
Definition: DetectorDescription/Identifier/Identifier/ExpandedIdentifier.h:102
TileTBID::m_type_hash_max
size_type m_type_hash_max
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:297
IdDictFieldImplementation::pack
void pack(int value, Identifier &id) const
Definition: IdDictFieldImplementation.h:173
AtlasDetectorID::m_msgSvc
IMessageSvc * m_msgSvc
pointer to the message service
Definition: AtlasDetectorID.h:368
TileTBID::m_dict
const IdDictDictionary * m_dict
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:286
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:9
TileTBID::fill_vec
int fill_vec(std::set< Identifier > &ids, unsigned int hash_max, std::vector< Identifier > &vec)
Definition: TileTBID.cxx:683
AtlasDetectorID::m_do_checks
bool m_do_checks
Flag for subclasses to know whether or not to perform checks.
Definition: AtlasDetectorID.h:362
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
TileTBID::type
int type(const Identifier &id) const
extract type field from TileTB identifier
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:146
IdDictDictionary::pack32
int pack32(const ExpandedIdentifier &id, size_t index1, size_t index2, Identifier &packedId) const
Pack to 32bits the subset of id between (inclusive) index1 and index2 - this is generic,...
Definition: IdDictDictionary.cxx:448
AtlasDetectorID::tile_exp
ExpandedIdentifier tile_exp(void) const
Definition: AtlasDetectorID.h:499
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
IdDictDictionary::find_field
IdDictField * find_field(const std::string &name) const
Definition: IdDictDictionary.cxx:36
TileTBID::get_expanded_id
int get_expanded_id(const Identifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
create expanded Identifier from Identifier (return == 0 for OK)
Definition: TileTBID.cxx:480
IdDictRegion
Definition: IdDictRegion.h:20
TileTBID::module
int module(const Identifier &id) const
extract module field from TileTB identifier
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:150
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
TileTBID::get_field
int get_field(const Identifier &id, size_type index) const
unpack one field from Identifier
Definition: TileTBID.cxx:73
TileTBID::m_TYPE_INDEX
size_type m_TYPE_INDEX
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:282
IdDictFieldImplementation::reset
void reset(Identifier &id) const
Definition: IdDictFieldImplementation.h:183
IdDictDefs.h
python.PyAthena.module
module
Definition: PyAthena.py:131
IdDictMgr
Definition: IdDictMgr.h:14
TileTBID.h
IdContext::begin_index
size_type begin_index() const
Definition: IdContext.h:45
StrFormat.h
Provide helper functions to create formatted strings.
IdDictMgr::find_dictionary
IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
Definition: IdDictMgr.cxx:115
TileTBID::~TileTBID
virtual ~TileTBID()
Default destructor.
TileTBID::m_full_module_range
MultiRange m_full_module_range
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:295
TileTBID::m_CHANNEL_INDEX
size_type m_CHANNEL_INDEX
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:284
lumiFormat.i
int i
Definition: lumiFormat.py:85
TileTBID::channel_context
IdContext channel_context(void) const
idContext for channels
Definition: TileTBID.cxx:315
TileTBID::m_channel_hash_max
size_type m_channel_hash_max
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:299
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
TileTBID::section
int section(const Identifier &id) const
extract section field from TileTB identifier
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:142
createCoolChannelIdFile.channel_id
channel_id
Definition: createCoolChannelIdFile.py:52
IdDictDictionary::m_regions
std::vector< IdDictRegion * > m_regions
Definition: IdDictDictionary.h:235
TileTBID::m_base_tile_type
Identifier m_base_tile_type
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:304
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
TileTBID::size_type
Identifier::size_type size_type
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:69
TileID_Exception
Exception class for Tile Identifiers.
Definition: TileID_Exception.h:16
TileTBID::type_context
IdContext type_context(void) const
access to IdContext's which define which levels of fields are contained in the id
Definition: TileTBID.cxx:301
AtlasDetectorID::is_tile
bool is_tile(Identifier id) const
Definition: AtlasDetectorID.h:695
TileTBID::initLevelsFromDict
int initLevelsFromDict(void)
Definition: TileTBID.cxx:501
ConstRangeIterator::begin
ConstRangeIterator begin() const
Definition: RangeIterator.cxx:18
TileTBID::m_full_channel_range
MultiRange m_full_channel_range
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:296
AtlasDetectorID::m_quiet
bool m_quiet
If true, suppress DEBUG/INFO messages.
Definition: AtlasDetectorID.h:371
TileTBID::channel
int channel(const Identifier &id) const
extract channel field from TileTB identifier
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:154
AtlasDetectorID::register_dict_tag
int register_dict_tag(const IdDictMgr &dict_mgr, const std::string &dict_name)
Register the file and tag names for a particular IdDict dictionary.
Definition: AtlasDetectorID.cxx:186
AtlasDetectorID::tile_field_value
int tile_field_value() const
Definition: AtlasDetectorID.h:617
IdDictDictionary::get_label_value
int get_label_value(const std::string &field, const std::string &label, int &value) const
Definition: IdDictDictionary.cxx:64
IdContext::prefix_id
const ExpandedIdentifier & prefix_id() const
Accessors.
Definition: IdContext.h:44
CxxUtils::strformat
std::string strformat(const char *fmt,...)
return a std::string according to a format fmt and varargs
Definition: StrFormat.cxx:49
TileTBID::module_context
IdContext module_context(void) const
idContext for modules
Definition: TileTBID.cxx:308
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
TileTBID::get_id
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const
create compact id from hash id (return == 0 for OK)
Definition: TileTBID.cxx:321
python.subdetectors.mmg.ids
ids
Definition: mmg.py:8
IdentifierHash.h
RangeIterator.h
Range
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
Definition: DetectorDescription/Identifier/Identifier/Range.h:29
TileTBID::m_tile_region_index
size_type m_tile_region_index
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:279
IdDictDictionary
Definition: IdDictDictionary.h:30
TileTBID::m_type_impl
IdDictFieldImplementation m_type_impl
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:290
MultiRange::match
int match(const ExpandedIdentifier &id) const
Match an identifier.
Definition: MultiRange.cxx:57
TileTBID::m_SYSTEM_INDEX
size_type m_SYSTEM_INDEX
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:280
Identifier::getString
std::string getString() const
Provide a string form of the identifier - hexadecimal.
Definition: Identifier.cxx:25
AtlasDetectorID::reinitialize
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
Definition: AtlasDetectorID.cxx:206
IdDictDictionary::m_name
std::string m_name
Definition: IdDictDictionary.h:216
AtlasDetectorID::show_to_string
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:350
TileTBID::m_full_type_range
MultiRange m_full_type_range
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:294
MultiRange::size
size_type size() const
Definition: MultiRange.cxx:70
DeMoScan.first
bool first
Definition: DeMoScan.py:536
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
TileTBID::m_module_hash_max
size_type m_module_hash_max
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:298
TileTBID::init_hashes
int init_hashes(void)
Definition: TileTBID.cxx:604
ConstRangeIterator::end
ConstRangeIterator end() const
Definition: RangeIterator.cxx:32
IdDictField
Definition: IdDictField.h:15
MultiRange::cardinality
size_type cardinality() const
Computes a possible cardinality from all ranges.
Definition: MultiRange.cxx:82
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
TileTBID::m_channel_vec
std::vector< Identifier > m_channel_vec
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:302
AtlasDetectorID::do_checks
virtual bool do_checks(void) const override
Checks are performed by default in debug compilation and NOT in optimized compilation.
Definition: AtlasDetectorID.cxx:457
IdContext
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition: IdContext.h:26
IdDictRegion::m_implementation
std::vector< IdDictFieldImplementation > m_implementation
Definition: IdDictRegion.h:42
TileTBID::m_type_vec
std::vector< Identifier > m_type_vec
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:300
TileTBID::get_hash
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const
create hash id from compact id (return == 0 for OK)
Definition: TileTBID.cxx:365
TileTBID::tiletb_id
Identifier tiletb_id(void) const
identifer for all Tile testbeam detectors
Definition: TileTBID.cxx:99
TileTBID::m_module_impl
IdDictFieldImplementation m_module_impl
Definition: Calorimeter/CaloIdentifier/CaloIdentifier/TileTBID.h:291
Identifier
Definition: IdentifierFieldParser.cxx:14