Initialization from the identifier dictionary.
19 {
21
23
24 AtlasDetectorID atlas_id ("", "");
25
26 const IdDictDictionary* dict = dict_mgr.
find_dictionary(
"InnerDetector");
27
28 auto assignRegionFromAtlasID = [
this, &dict](
const ExpandedIdentifier&
id,
30 const std::string& techType) {
32 ATH_MSG_WARNING(
"initialize_from_dictionary - unable to find "<<techType<<
" region index: id, reg "
33 << id << " " << regionIdx);
34 }
35 };
36
37 auto assignRegionIdxFromGrp = [
this, &dict](
const std::string& grp,
size_type& regionIdx) {
39 if (!group || !
group->n_regions()) {
42 return;
43 }
44 regionIdx =
group->region(0).index();
45 ATH_MSG_VERBOSE(
"Region index for "<<grp<<
" will be assigned to "<<regionIdx);
46
47 };
48
49 auto assignRegionIdxFromRegion = [
this, &dict](
const std::string& grp,
size_type& regionIdx) {
50 const IdDictRegion* region = dict->
find_region(grp);
51 if (!region) {
54 return;
55 }
56 regionIdx = region->
index();
57 ATH_MSG_VERBOSE(
"Region index for "<<grp<<
" will be assigned to "<<regionIdx);
58 };
59
60
61 if (!dict) {
62 ATH_MSG_ERROR(
"initialize_from_dictionary - cannot access InnerDetector dictionary");
63 return 1;
64 }
65
66
67 if (dict->
version() ==
"ITkHGTD" || dict->
version() ==
"ITkHGTDPLR" || dict->
version() ==
"P2-RUN4") {
69 }
71
72
76 }
77
79 if (!dict) {
80 ATH_MSG_WARNING(
"initialize_from_dictionary - cannot access LArCalorimeter dictionary");
81 return 1;
82 }
86
88 if (!dict) {
89 ATH_MSG_WARNING(
"initialize_from_dictionary - cannot access Calorimeter dictionary");
90 return 1;
91 }
92
94
96
98 if (!dict) {
99 ATH_MSG_WARNING(
"initialize_from_dictionary - cannot access TileCalorimeter dictionary");
100 return 1;
101 }
102
104
106 if (!dict) {
107 ATH_MSG_WARNING(
"initialize_from_dictionary - cannot access MuonSpectrometer dictionary");
108 return 1;
109 }
112 ATH_MSG_WARNING(
"initialize_from_dictionary - cannot access stationName field");
113 return 1;
114 } else {
116 }
123
125 if (!dict) {
126 ATH_MSG_WARNING(
"initialize_from_dictionary - cannot access ForwardDetectors dictionary");
127 return 1;
128 }
129
134
135 ATH_MSG_VERBOSE(
"AtlasDetectorIDHelper::initialize_from_dictionary ");
149 return 0;
150}
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
size_type m_trt_region_index
size_type m_sct_region_index
size_type m_lar_em_region_index
size_type m_lar_hec_region_index
size_type m_mdt_region_index
size_type m_mm_region_index
size_type m_lar_fcal_region_index
size_type m_pixel_region_index
size_type m_tgc_region_index
const IdDictField * m_station_field
size_type m_stgc_region_index
size_type m_muon_station_index
Identifier::size_type size_type
size_type m_zdc_region_index
bool m_isHighLuminosityLHC
size_type m_lvl1_region_index
size_type m_lucid_region_index
size_type m_tile_region_index
size_type m_rpc_region_index
const std::string & version() const
Dictionary version.
IdDictGroup * find_group(const std::string &group_name)
const IdDictField * find_field(const std::string &name) const
const IdDictRegion * find_region(const std::string ®ion_name) const
const IdDictDictionary * find_dictionary(const std::string &name) const
Access dictionary by name.