ATLAS Offline Software
Loading...
Searching...
No Matches
TTOnlineID.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
9#include "IdDict/IdDictMgr.h"
10#include "IdDict/IdDictRegion.h"
12#include "CxxUtils/StrFormat.h"
15#include <algorithm>
16#include <cassert>
17#include <cmath>
18#include <cstdio>
19#include <iostream>
20#include <set>
21#include <string>
22
24
25
27 AtlasDetectorID("TTOnlineID", "PPM_Modules"),
28 m_calo_index(999),
31 m_crate_index(999),
32 m_module_index(999),
34 m_channel_index(999),
35 m_dict(nullptr),
41{
42
43}
44
46
47
49{
51 return {id, 0, m_crate_index};
52}
53
55{
57 return {id, 0, m_module_index};
58}
59
65
71
72
73
74//==========================================================================
76//==========================================================================
77{
78 ATH_MSG_INFO("initialize_from_dictionary");
79
80 // Check whether this helper should be reinitialized
81 // -------------------------------------------------
82 if (!reinitialize(dict_mgr)) {
83 ATH_MSG_DEBUG("Request to reinitialize not satisfied - tags have not changed");
84 return (0);
85 }
86 else {
87 ATH_MSG_DEBUG("(Re)initialize");
88 }
89
90 // init base object
91 // ----------------
93 return (1);
94 }
95
96 m_dict = dict_mgr.find_dictionary("Calorimeter");
97
98 ATH_MSG_DEBUG(" => defined m_dict from find_dictionary(Calorimeter) = " << m_dict);
99 if(!m_dict)
100 {
101 // initialize_from_dictionary - cannot access Calorimeter dictionary
102 return 1;
103 }
104
105 // Register version of the dictionary used
106 // ---------------------------------------
107 if (register_dict_tag(dict_mgr, "Calorimeter")) return(1);
108
109 // initialize dictionary version
110 // -----------------------------
111 AtlasDetectorID::setDictVersion(dict_mgr, "Calorimeter");
112
113
114 // Initialize the field indices
115 // --------------------------------------
116 if(initLevelsFromDict()) return (1);
117
118 /* Find value for the field Calorimeter */
119 // ---------------------------------------
120 const IdDictDictionary* atlasDict = dict_mgr.find_dictionary ("ATLAS");
121 int caloValue = -1;
122 if (atlasDict->get_label_value("subdet", "Calorimeter", caloValue)) {
123 ATH_MSG_ERROR(" Could not get value for label 'Calorimeter' of field 'subdet' in dictionary " << atlasDict->name());
124 return (1);
125 }
126 ATH_MSG_DEBUG("[init_from_dictionary] > caloValue = " << caloValue);
127
128 /* Find values for the fake field DetZside */
129 // --------------------------------------
130
131 // retrieve the calo tag from the DB
132 std::string tag = m_dict->dict_tag();
133 bool oldTag = ( tag.empty() || tag == "CaloIdentifier-DC3-05" || tag == "CaloIdentifier-LVL1-01");
134 ATH_MSG_DEBUG("Calorimeter dict. DB tag= " << tag);
135
136 //int detzsideValue = -1;
137 //if (m_dict->get_label_value("DetZside", "no_side", detzsideValue)) {
138 if (m_dict->get_label_value("DetZside", "no_side", m_iDetZSideFieldValue)) {
139 if (!oldTag) {
140 ATH_MSG_WARNING("Could not get value for label 'DetZside' in dictionary " << m_dict->name());
141 }
142 return (0);
143 }
144 ATH_MSG_DEBUG("[init_from_dictionary] > detzsideValue = " << detzside_field_value());
145
146
147 // Set up id for tower and layer's range prefix
148 // ---------------------------------------------
149 // Note: negative value is good enough to get multirange since the
150 // regions are symmetric in +/-eta
151
152 ExpandedIdentifier reg_id;
153 reg_id.add(caloValue);
154 reg_id.add(detzside_field_value());
155
156 Range prefix;
157 m_full_crate_range = m_dict->build_multirange(reg_id, prefix, "crate");
158 m_full_module_range = m_dict->build_multirange(reg_id, prefix, "module");
159 m_full_submodule_range = m_dict->build_multirange(reg_id, prefix, "submodule");
160 m_full_channel_range = m_dict->build_multirange(reg_id, prefix, "channel");
161
162 ATH_MSG_DEBUG("[initialize_from_dictionary] > Crate range -> " << (std::string)m_full_crate_range);
163 ATH_MSG_DEBUG("[initialize_from_dictionary] > Module range -> " << (std::string)m_full_module_range);
164 ATH_MSG_DEBUG("[initialize_from_dictionary] > SubModule range -> " << (std::string)m_full_submodule_range);
165 ATH_MSG_DEBUG("[initialize_from_dictionary] > Channel range -> " << (std::string)m_full_channel_range);
166
167
168 // Setup the hash tables
169 // --------------------------------------
170 if(init_hashes()) return (1);
171 return 0;
172}
173
174
175//=====================================================================================
177 const IdContext* context) const
178//=====================================================================================
179{
180 // We assume that the context is >= region
181 exp_id.clear();
182 exp_id << calo_field_value();
183 exp_id << detzside_field_value();
184 if(context && context->end_index() >= m_crate_index) {
185 exp_id << crate(id);
186 if(context->end_index() >= m_module_index) {
187 exp_id << module(id);
188 if(context->end_index() >= m_submodule_index) {
189 exp_id << submodule(id);
190 if(context->end_index() >= m_channel_index)
191 exp_id << channel(id);
192 }
193 }
194 }
195 return (0);
196}
197
198
199//=====================================================================================
201//=====================================================================================
202{
203 // Fill expanded id
206 if (!m_full_channel_range.match(id)) {
207 std::string errorMessage = "[TTOnlineID]::channnelId() result is not OK: ID, range = "
208 + std::string(id) + " , " + (std::string)m_full_channel_range;
209 throw CaloID_Exception(errorMessage , 2);
210 }
211}
212
213/* ================================================================*/
215/* ================================================================*/
216{
217 // Check that id is within allowed range
218 // Fill expanded id
219 ExpandedIdentifier expId;
220 IdContext context = submoduleContext();
221 if (get_expanded_id(submoduleId, expId, &context)) {
222 std::string errorMessage = "TTOnlineID::channel_Id_checks(submoduleId) result is not OK: ID = "
224 throw CaloID_Exception(errorMessage , 99);
225 }
226
227 expId << channel;
228 if (!m_full_channel_range.match(expId)) {
229 std::string errorMessage = "TTOnlineID::channel_Id_checks(submoduleId) result is not OK: ID, range = "
230 + std::string(expId) + " , " + (std::string)m_full_channel_range;
231 throw CaloID_Exception(errorMessage , 99);
232 }
233}
234
235/* ================================================================*/
237/* ================================================================*/
238{
239 // Check that id is within allowed range
240 // Fill expanded id
241 ExpandedIdentifier expId;
242 IdContext context = moduleContext();
243 if (get_expanded_id(moduleId, expId, &context)) {
244 std::string errorMessage = "TTOnlineID::channel_Id_checks(moduleId) result is not OK: ID = "
246 throw CaloID_Exception(errorMessage , 99);
247 }
248
249 expId << submodule << channel;
250 if (!m_full_channel_range.match(expId)) {
251 std::string errorMessage = "TTOnlineID::channel_Id_checks(submoduleId) result is not OK: ID, range = "
252 + std::string(expId) + " , " + (std::string)m_full_channel_range;
253 throw CaloID_Exception(errorMessage , 99);
254 }
255}
256
257/* ================================================================*/
259/* ================================================================*/
260{
261 // Check that id is within allowed range
262 // Fill expanded id
263 ExpandedIdentifier expId;
264 IdContext context = crateContext();
265 if (get_expanded_id(crateId, expId, &context)) {
266 std::string errorMessage = "TTOnlineID::channel_Id_checks(crateId) result is not OK: ID = "
268 throw CaloID_Exception(errorMessage , 99);
269 }
270
271 expId << module << submodule << channel;
272 if (!m_full_channel_range.match(expId)) {
273 std::string errorMessage = "TTOnlineID::channel_Id_checks(crateId) result is not OK: ID, range = "
274 + std::string(expId) + " , " + (std::string)m_full_channel_range;
275 throw CaloID_Exception(errorMessage , 99);
276 }
277}
278
279/* ================================================================*/
281/* ================================================================*/
282{
283 // Check that id is within allowed range
284 // Fill expanded id
286 expId << detzside_field_value() << crate << module << submodule;
287
288 if (!m_full_submodule_range.match(expId)) { std::string errorMessage = "TTOnlineID::submodule_Id_checks() result is not OK: ID, range = "
289 + std::string(expId) + " , " + (std::string)m_full_submodule_range;
290 throw CaloID_Exception(errorMessage , 99);
291 }
292}
293
294/* ================================================================*/
296/* ================================================================*/
297{
298 // Check that id is within allowed range
299 // Fill expanded id
301 expId << detzside_field_value() << crate << module;
302
303 if (!m_full_module_range.match(expId)) { std::string errorMessage = "TTOnlineID::module_Id_checks() result is not OK: ID, range = "
304 + std::string(expId) + " , " + (std::string)m_full_module_range;
305 throw CaloID_Exception(errorMessage , 99);
306 }
307}
308
309/* ================================================================*/
311/* ================================================================*/
312{
313 // Check that id is within allowed range
314 // Fill expanded id
316 expId << detzside_field_value() << crate;
317
318 if (!m_full_crate_range.match(expId)) { std::string errorMessage = "TTOnlineID::crate_Id_checks() result is not OK: ID, range = "
319 + std::string(expId) + " , " + (std::string)m_full_crate_range;
320 throw CaloID_Exception(errorMessage , 99);
321 }
322}
323
324
325//=========================================================
327//=========================================================
328{
329 ATH_MSG_DEBUG("[initLevelsFromDict] (0) Entering routine... ");
330
331 if(!m_dict) {
332 ATH_MSG_INFO("TTOnlineID::initLevelsFromDict - dictionary NOT initialized ");
333 return (1);
334 }
335
336 ATH_MSG_DEBUG("[initLevelsFromDict] (1) m_dict OK ... ");
337
338 // Find out which identifier field corresponds to each level.
339 // ----------------------------------------------------------
340 m_calo_index = 999 ;
341 m_detzside_index = 999 ;
342 m_crate_index = 999 ;
343 m_module_index = 999 ;
344 m_submodule_index = 999 ;
345 m_channel_index = 999 ;
346
347 ATH_MSG_DEBUG("[initLevelsFromDict] (2) data member initialization OK ... ");
348
349 // retrieve the calo tag from the DB
350 std::string tag = m_dict->dict_tag();
351 bool oldTag = ( tag.empty() || tag == "CaloIdentifier-DC3-05" || tag == "CaloIdentifier-LVL1-01");
352 ATH_MSG_DEBUG("Calorimeter dict. DB tag= " << tag);
353
354 // Save index to a Online LVL1 region for unpacking - search with region name
355 const IdDictRegion* reg = m_dict->find_region("PPM_Crate-00");
356 if (reg) {
357 m_l1online_regions_index = reg->index();}
358 else {
359 if(!oldTag) ATH_MSG_WARNING("TTOnlineID::initLevelsFromDict - unable to find 'PPM_Crate-00' region");
360 return (0);
361 }
362 ATH_MSG_DEBUG("[initLevelsFromDict] (3) region 'PPM_Crate-00' found OK ... " << m_l1online_regions_index);
363
364 // Look for Fields...
365 // ------------------
366 const IdDictField* field = m_dict->find_field("subdet") ;
367 if (field) {
368 m_calo_index = field->index();}
369 else {
370 ATH_MSG_INFO("TTOnlineID::initLevelsFromDict - unable to find 'Calo' field ");
371 return (1);
372 }
373 ATH_MSG_DEBUG("[initLevelsFromDict] (4) field 'Calo' found OK ");
374
375
376 field = m_dict->find_field("DetZside") ;
377 if (field) {
378 m_detzside_index = field->index();}
379 else {
380 ATH_MSG_INFO("TTOnlineID::initLevelsFromDict - unable to find 'DetZside' field ");
381 return (1);
382 }
383 ATH_MSG_DEBUG("[initLevelsFromDict] (5) field 'DetZside' found OK ");
384
385
386 field = m_dict->find_field("crate") ;
387 if (field) {
388 m_crate_index = field->index();}
389 else {
390 ATH_MSG_INFO("TTOnlineID::initLevelsFromDict - unable to find 'crate' field ");
391 return (1);
392 }
393 ATH_MSG_DEBUG("[initLevelsFromDict] (6) field 'crate' found OK ");
394
395 field = m_dict->find_field("module") ;
396 if (field) {
397 m_module_index = field->index();
398 }
399 else {
400 ATH_MSG_INFO("TTOnlineID::initLevelsFromDict - unable to find 'module' field ");
401 return (1);
402 }
403 ATH_MSG_DEBUG("[initLevelsFromDict] (7) field 'module' found OK ");
404
405 field = m_dict->find_field("submodule") ;
406 if (field) {
407 m_submodule_index = field->index();
408 }
409 else {
410 ATH_MSG_INFO("TTOnlineID::initLevelsFromDict - unable to find 'submodule' field ");
411 return (1);
412 }
413 ATH_MSG_DEBUG("[initLevelsFromDict] (8) field 'submodule' found OK ");
414
415 field = m_dict->find_field("channel") ;
416 if (field) {
417 m_channel_index = field->index();
418 }
419 else {
420 ATH_MSG_INFO("TTOnlineID::initLevelsFromDict - unable to find 'channel' field ");
421 return (1);
422 }
423 ATH_MSG_DEBUG("[initLevelsFromDict] (9) field 'channel' found OK ");
424
425
426 // Set the field implementation
427 // ------------------------------
428 const IdDictRegion& region = m_dict->region(m_l1online_regions_index);
429 ATH_MSG_DEBUG("[initLevelsFromDict] (10) found levels: ");
430 ATH_MSG_DEBUG("[initLevelsFromDict] > subdet " << m_calo_index);
431 ATH_MSG_DEBUG("[initLevelsFromDict] > detzside " << m_detzside_index);
432 ATH_MSG_DEBUG("[initLevelsFromDict] > crate " << m_crate_index);
433 ATH_MSG_DEBUG("[initLevelsFromDict] > module " << m_module_index);
434 ATH_MSG_DEBUG("[initLevelsFromDict] > submodule " << m_submodule_index);
435 ATH_MSG_DEBUG("[initLevelsFromDict] > channel " << m_channel_index);
436
437 ATH_MSG_DEBUG("[initLevelsFromDict] > ...fields implementation... ");
438 ATH_MSG_DEBUG("[initLevelsFromDict] > ...implementation: m_calo_index ");
440
441 ATH_MSG_DEBUG("[initLevelsFromDict] > ...implementation: m_det_side_index ");
443
444 ATH_MSG_DEBUG("[initLevelsFromDict] > ...implementation: m_crate_index ");
446
447 ATH_MSG_DEBUG("[initLevelsFromDict] > ...implementation: m_module_index ");
449 ATH_MSG_DEBUG("[initLevelsFromDict] > ...implementation: m_submodule_index ");
451 ATH_MSG_DEBUG("[initLevelsFromDict] > ...implementation: m_channel_index ");
453
454 ATH_MSG_DEBUG("[initLevelsFromDict] (11) decode index and bit fields for each level: ");
455 ATH_MSG_DEBUG("[initLevelsFromDict] > calo " << m_calo_impl.show_to_string());
456 ATH_MSG_DEBUG("[initLevelsFromDict] > detzside " << m_calo_detzside_impl.show_to_string());
457 ATH_MSG_DEBUG("[initLevelsFromDict] > crate " << m_crate_impl.show_to_string());
458 ATH_MSG_DEBUG("[initLevelsFromDict] > module " << m_module_impl.show_to_string());
459 ATH_MSG_DEBUG("[initLevelsFromDict] > submodule " << m_submodule_impl.show_to_string());
460 ATH_MSG_DEBUG("[initLevelsFromDict] > channel " << m_channel_impl.show_to_string());
461
462 return(0) ;
463}
464
465
466//=====================================================
468//=====================================================
469{
470 // Crate hash
471 // -----------
472 {
473 m_crateHashMax = m_full_crate_range.cardinality();
475 unsigned int nids = 0;
476 std::set<HWIdentifier> ids;
477 for (unsigned int i = 0; i < m_full_crate_range.size(); ++i) {
478 const Range& range = m_full_crate_range[i];
479 ConstRangeIterator rit(range);
480 auto first = rit.begin();
481 auto last = rit.end();
482 for (; first != last; ++first) {
483 const ExpandedIdentifier& exp_id = (*first);
484 HWIdentifier cra_id = crateId( exp_id[m_crate_index] ) ;
485
486 if(!(ids.insert(cra_id)).second){
487 ATH_MSG_ERROR("[init_hashes] > duplicated id for channel nb = " << nids);
488 ATH_MSG_ERROR(" expanded Id= " << show_to_string(cra_id));
489 }
490 nids++;
491 }
492 }
493 if(ids.size() != m_crateHashMax) {
494 ATH_MSG_ERROR("[init_hashes] >");
495 ATH_MSG_ERROR(" set size NOT EQUAL to hash max. size " << ids.size());
496 ATH_MSG_ERROR(" hash max " << m_crateHashMax);
497 return (1);
498 }
499
500 nids=0;
501 std::set<HWIdentifier>::const_iterator first = ids.begin();
502 std::set<HWIdentifier>::const_iterator last = ids.end();
503 for (;first != last && nids < m_crate_vec.size(); ++first) {
504 m_crate_vec[nids] = (*first) ;
505 nids++;
506 }
507 ATH_MSG_DEBUG("[init_hashes()] > Crate_size= " << m_crate_vec.size());
508 }
509
510 // Module hash
511 // -----------
512 {
513 m_moduleHashMax = m_full_module_range.cardinality();
515 unsigned int nids = 0;
516 std::set<HWIdentifier> ids;
517 for (unsigned int i = 0; i < m_full_module_range.size(); ++i) {
518 const Range& range = m_full_module_range[i];
519 ConstRangeIterator rit(range);
520 auto first = rit.begin();
521 auto last = rit.end();
522 for (; first != last; ++first) {
523 const ExpandedIdentifier& exp_id = (*first);
524 HWIdentifier mod_id = moduleId(exp_id[m_crate_index], exp_id[m_module_index] ) ;
525
526 if(!(ids.insert(mod_id)).second){
527 ATH_MSG_ERROR("[init_hashes] > duplicated id for channel nb = " << nids);
528 ATH_MSG_ERROR(" expanded Id= " << show_to_string(mod_id));
529 }
530 nids++;
531 }
532 }
533 if(ids.size() != m_moduleHashMax) {
534 ATH_MSG_ERROR("[init_hashes] >");
535 ATH_MSG_ERROR(" set size NOT EQUAL to hash max. size " << ids.size());
536 ATH_MSG_ERROR(" hash max " << m_moduleHashMax);
537 return (1);
538 }
539
540 nids=0;
541 std::set<HWIdentifier>::const_iterator first = ids.begin();
542 std::set<HWIdentifier>::const_iterator last = ids.end();
543 for (;first != last && nids < m_module_vec.size(); ++first) {
544 m_module_vec[nids] = (*first) ;
545 nids++;
546 }
547 ATH_MSG_DEBUG("[init_hashes()] > Module_size= " << m_module_vec.size());
548 }
549
550 // SubModule hash
551 // -----------
552 {
555 unsigned int nids = 0;
556 std::set<HWIdentifier> ids;
557 for (unsigned int i = 0; i < m_full_submodule_range.size(); ++i) {
558 const Range& range = m_full_submodule_range[i];
559 ConstRangeIterator rit(range);
560 auto first = rit.begin();
561 auto last = rit.end();
562 for (; first != last; ++first) {
563 const ExpandedIdentifier& exp_id = (*first);
564 HWIdentifier submod_id = submoduleId(exp_id[m_crate_index], exp_id[m_module_index], exp_id[m_submodule_index] ) ;
565
566 if(!(ids.insert(submod_id)).second){
567 ATH_MSG_ERROR("[init_hashes] > duplicated id for channel nb = " << nids);
568 ATH_MSG_ERROR(" expanded Id= " << show_to_string(submod_id));
569 }
570 nids++;
571 }
572 }
573 if(ids.size() != m_submoduleHashMax) {
574 ATH_MSG_ERROR("[init_hashes] >");
575 ATH_MSG_ERROR(" set size NOT EQUAL to hash max. size " << ids.size());
576 ATH_MSG_ERROR(" hash max " << m_submoduleHashMax);
577 return (1);
578 }
579
580 nids=0;
581 std::set<HWIdentifier>::const_iterator first = ids.begin();
582 std::set<HWIdentifier>::const_iterator last = ids.end();
583 for (;first != last && nids < m_submodule_vec.size(); ++first) {
584 m_submodule_vec[nids] = (*first) ;
585 nids++;
586 }
587 ATH_MSG_DEBUG("[init_hashes()] > Submodule_size= " << m_submodule_vec.size());
588 }
589
590 // Channel hash
591 // -----------
592 {
595 unsigned int nids = 0;
596 std::set<HWIdentifier> ids;
597 for (unsigned int i = 0; i < m_full_channel_range.size(); ++i) {
598 const Range& range = m_full_channel_range[i];
599 ConstRangeIterator rit(range);
600 auto first = rit.begin();
601 auto last = rit.end();
602 for (; first != last; ++first) {
603 const ExpandedIdentifier& exp_id = (*first);
604 HWIdentifier chan_id = channelId(exp_id[m_crate_index], exp_id[m_module_index], exp_id[m_submodule_index], exp_id[m_channel_index]) ;
605
606 if(!(ids.insert(chan_id)).second){
607 ATH_MSG_ERROR("[init_hashes] > duplicated id for channel nb = " << nids);
608 ATH_MSG_ERROR(" expanded Id= " << show_to_string(chan_id));
609 }
610 nids++;
611 }
612 }
613 if(ids.size() != m_channelHashMax) {
614 ATH_MSG_ERROR("[init_hashes] >");
615 ATH_MSG_ERROR(" set size NOT EQUAL to hash max. size " << ids.size());
616 ATH_MSG_ERROR(" hash max " << m_channelHashMax);
617 return (1);
618 }
619
620 nids=0;
621 std::set<HWIdentifier>::const_iterator first = ids.begin();
622 std::set<HWIdentifier>::const_iterator last = ids.end();
623 for (;first != last && nids < m_channel_vec.size(); ++first) {
624 m_channel_vec[nids] = (*first) ;
625 nids++;
626 }
627 ATH_MSG_DEBUG("[init_hashes()] > Channel_size= " << m_channel_vec.size());
628 }
629 return (0);
630}
631
632
633
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Provide helper functions to create formatted strings.
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr) override
Initialization from the identifier dictionary.
bool reinitialize(const IdDictMgr &dict_mgr)
Test whether an idhelper should be reinitialized based on the change of tags.
virtual void setDictVersion(const IdDictMgr &dict_mgr, const std::string &name) override
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 calo_field_value() const
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
ExpandedIdentifier calo_exp(void) const
AtlasDetectorID(const std::string &name, const std::string &group)
Exception class for Calo Identifiers.
ConstRangeIterator end() const
ConstRangeIterator begin() const
void add(element_type value)
Append a value into a new field.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Definition IdContext.h:26
int get_label_value(const std::string &field, const std::string &label, int &value) const
const std::string & name() const
Dictionary name.
const IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.
const IdDictFieldImplementation & implementation(size_t i) const
A Range describes the possible ranges for the field values of an ExpandedIdentifier.
HWIdentifier moduleId(int crate, int module) const
(1) create towerId from fields
Definition TTOnlineID.h:279
size_type m_crateHashMax
Definition TTOnlineID.h:162
size_type m_submodule_index
Definition TTOnlineID.h:153
virtual int initialize_from_dictionary(const IdDictMgr &dict_mgr)
Initialization from the identifier dictionary.
int initLevelsFromDict()
init() hashes
size_type m_l1online_regions_index
Definition TTOnlineID.h:150
std::vector< HWIdentifier > m_channel_vec
Definition TTOnlineID.h:170
IdDictFieldImplementation m_channel_impl
Definition TTOnlineID.h:196
IdDictFieldImplementation m_submodule_impl
Definition TTOnlineID.h:195
MultiRange m_full_submodule_range
Definition TTOnlineID.h:159
size_type m_submoduleHashMax
Definition TTOnlineID.h:164
HWIdentifier channelId(int crate, int module, int submodule, int channel) const
(1) create towerId from fields
Definition TTOnlineID.h:390
int get_expanded_id(const HWIdentifier &id, ExpandedIdentifier &exp_id, const IdContext *context) const
create expanded HWIdentifier from HWIdentifier (return == 0 for OK)
HWIdentifier crateId(int crate) const
(1) create towerId from fields
Definition TTOnlineID.h:226
IdDictFieldImplementation m_calo_detzside_impl
Definition TTOnlineID.h:192
int module(const HWIdentifier id) const
Definition TTOnlineID.h:457
int detzside_field_value() const
return the value of the detzside field (initialized in initialize_from_dictionary())
Definition TTOnlineID.h:475
void channel_Id_checks(int crate, int module, int submodule, int channel) const
void module_Id_checks(int crate, int module) const
IdContext crateContext() const
context for feedthroughs, feb & channels
std::vector< HWIdentifier > m_module_vec
Definition TTOnlineID.h:168
IdDictFieldImplementation m_crate_impl
Definition TTOnlineID.h:193
size_type m_channel_index
Definition TTOnlineID.h:154
const IdDictDictionary * m_dict
Definition TTOnlineID.h:156
void crate_Id_checks(int crate) const
IdContext moduleContext() const
MultiRange m_full_crate_range
Definition TTOnlineID.h:157
int m_iDetZSideFieldValue
Definition TTOnlineID.h:172
IdDictFieldImplementation m_calo_impl
Field Implementation.
Definition TTOnlineID.h:191
MultiRange m_full_module_range
Definition TTOnlineID.h:158
size_type m_module_index
Definition TTOnlineID.h:152
size_type m_moduleHashMax
Definition TTOnlineID.h:163
int init_hashes()
std::vector< HWIdentifier > m_crate_vec
Definition TTOnlineID.h:167
size_type m_calo_index
Member Data index.
Definition TTOnlineID.h:148
void submodule_Id_checks(int crate, int module, int submodule) const
HWIdentifier submoduleId(int crate, int module, int submodule) const
(1) create towerId from fields
Definition TTOnlineID.h:333
int submodule(const HWIdentifier id) const
Definition TTOnlineID.h:463
IdContext submoduleContext() const
size_type m_crate_index
Definition TTOnlineID.h:151
MultiRange m_full_channel_range
Definition TTOnlineID.h:160
size_type m_channelHashMax
Definition TTOnlineID.h:165
size_type m_detzside_index
Definition TTOnlineID.h:149
int crate(const HWIdentifier id) const
Definition TTOnlineID.h:451
std::vector< HWIdentifier > m_submodule_vec
Definition TTOnlineID.h:169
IdContext channelContext() const
int channel(const HWIdentifier id) const
Definition TTOnlineID.h:469
IdDictFieldImplementation m_module_impl
Definition TTOnlineID.h:194
std::string strformat(const char *fmt,...)
return a std::string according to a format fmt and varargs
Definition StrFormat.cxx:49