ATLAS Offline Software
MbtsDetDescrManager.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include "CaloDetDescr/CaloDetDescrElement.h"
7 
9 #include "GaudiKernel/MsgStream.h"
10 
12 {
13 }
14 
16 {
17  for (auto& p : m_elements) {
18  delete p.second;
19  }
20 }
21 
23 {
24  MbtsElements::const_iterator it = m_elements.find(elementId);
25  if(it==m_elements.end())
26  return nullptr;
27  else
28  return it->second;
29 }
30 
32 {
33  MbtsElements::iterator it = m_elements.find(element->identify());
34  if(it==m_elements.end())
35  m_elements[element->identify()] = element;
36  else {
37  // Issue warning message and don't update map entry
38  MsgStream log(Athena::getMessageSvc(), "MbtsDetDescrManager");
39  if (log.level() <= MSG::DEBUG) {
40  log << MSG::DEBUG << "Attempt to update map entry for ID=" << element->identify().getString() << ". Skipping" << endmsg;
41  }
42  }
43 }
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
skel.it
it
Definition: skel.GENtoEVGEN.py:396
MbtsDetDescrManager::~MbtsDetDescrManager
~MbtsDetDescrManager()
Definition: MbtsDetDescrManager.cxx:15
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
MbtsDetDescrManager.h
MbtsDetDescrManager::add
void add(CaloDetDescrElement *element)
Definition: MbtsDetDescrManager.cxx:31
CaloDetDescrElement::identify
Identifier identify() const override final
cell identifier
Definition: CaloDetDescrElement.cxx:64
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
MbtsDetDescrManager::get_element
CaloDetDescrElement * get_element(const Identifier &elementId) const
Definition: MbtsDetDescrManager.cxx:22
MbtsDetDescrManager::m_elements
MbtsElements m_elements
Definition: MbtsDetDescrManager.h:27
Identifier::getString
std::string getString() const
Provide a string form of the identifier - hexadecimal.
Definition: Identifier.cxx:25
DEBUG
#define DEBUG
Definition: page_access.h:11
MbtsDetDescrManager::MbtsDetDescrManager
MbtsDetDescrManager()
Definition: MbtsDetDescrManager.cxx:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
Identifier
Definition: IdentifierFieldParser.cxx:14