ATLAS Offline Software
Loading...
Searching...
No Matches
CaloTTDescrManager.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 Calo description package
7 -----------------------------------------
8 ***************************************************************************/
9
10//<doc><file> $Id: CaloTTDescrManager.cxx,v 1.8 2006-07-21 12:39:14 fledroit Exp $
11//<version> $Name: not supported by cvs2svn $
12
13//<<<<<< INCLUDES >>>>>>
14
19#include <iostream>
20
21
22
29
31{
32// Remove regions and descriptors
33 clear();
34}
35
38{
39 calo_region_map::const_iterator p = m_calo_region_map.find(region);
40 if(p != m_calo_region_map.end()) {
41 return p->second;
42 } else {
43 // no CaloTTDescrRegion corresponding to Identifier
44 // this is expected as some Identifiers have no real counter part)
45 return(nullptr);
46 }
47
48}
49
52{
53 return m_calo_region_vec.begin();
54}
55
61
67
73
79
85
90
91
92
93void
95{
96 // initialization actually done in CaloTTMgrDetDescrCnv
97 m_is_initialized = true;
98}
99
101{
102 return m_is_initialized;
103}
104
105
106void
108{
109 m_calo_region_vec.push_back(region);
110 // m_calo_region_map[region->identify()] = region;
111 m_calo_region_map.insert(std::pair<Identifier, CaloTTDescrRegion*>((region->identify()),region));
112}
113
114void
116{
117 m_calo_descr_vec.push_back(descriptor);
118}
119
120void
122{
123 m_calo_lvl1_id = id_helper;
124}
125
126
127void
129{
130 std::cout << "CaloTTDescrManager : " << std::endl;
131 std::cout << " Number of Calo TT Regions : " << m_calo_region_vec.size() << std::endl;
132 std::cout << " Number of Calo descriptors : " << m_calo_descr_vec.size() << std::endl;
133
136
137 for (; first != last; ++first) {
138 (*first)->print();
139 }
140
141}
142
144{
145// Remove regions and descriptors
148 for (; first != last; ++first) delete (*first);
149 m_calo_region_vec.clear();
150
153 for (; first2 != last2; ++first2) delete (*first2);
154 m_calo_descr_vec.clear();
155
156 m_is_initialized = false;
157}
158
159
160
Helper class for offline TT identifiers.
Definition CaloLVL1_ID.h:66
const CaloLVL1_ID * m_calo_lvl1_id
Helper used to decode the TT offline identifiers.
void add(CaloTTDescrRegion *region)
Insertion in the vector of Det Descr regions (== Trigger Towers)
calo_descr_vec m_calo_descr_vec
vector of descriptors
calo_descr_vec::size_type calo_descr_size
calo_region_vec m_calo_region_vec
vector of Det Descr regions (== Trigger Towers)
calo_descr_size calo_descriptors_size(void) const
Total number of descriptors.
void clear(void)
Delete towers and descriptors.
calo_descr_vec::const_iterator calo_descr_const_iterator
void set_helper(const CaloLVL1_ID *id_helper)
set the helper used to decode the TT offline identifiers
calo_region_vec_size calo_region_size(void) const
Total number of Det Descr regions (i.e.
calo_region_vec::const_iterator calo_region_const_iterator
const CaloLVL1_ID * get_lvl1_id(void) const
access to the offline identifier helper
calo_descr_const_iterator calo_descriptors_begin(void) const
Begin iterator on descriptors.
CaloTTDescrRegion * find_calo_region(const Identifier &tower_id) const
Access to the Det Descr region (==Trigger Tower) corresponding to a TT identifier.
calo_region_vec::size_type calo_region_vec_size
calo_region_map m_calo_region_map
calo_region_const_iterator calo_region_end(void) const
End iterator on Det Descr regions (== Trigger Towers)
void initialize(void)
dummy.
calo_region_const_iterator calo_region_begin(void) const
Begin iterator on Det Descr regions (== Trigger Towers)
bool is_initialized(void) const
calo_descr_const_iterator calo_descriptors_end(void) const
End iterator on descriptors.
This class provides an interface to the geometrical description of the Calorimeter Trigger Towers.
virtual Identifier identify() const
This class holds the Calorimeter TriggerTower geometrical description.