ATLAS Offline Software
CaloTowerBuilderToolBase.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "GaudiKernel/Service.h"
6 #include "GaudiKernel/ServiceHandle.h"
7 #include "GaudiKernel/IIncidentSvc.h"
8 #include "GaudiKernel/TypeNameString.h"
9 
11 
13 
15  const std::string& type, const IInterface* parent)
17  , m_cellContainerName("AllCalo")
18 {
19 
20  // common properties
21  declareProperty("CellContainerName", m_cellContainerName);
22  declareInterface<ICaloTowerBuilderToolBase>(this);
23 }
24 
26 = default;
27 
29  if (!m_cellContainerName.key().empty()) {
30  ATH_CHECK( m_cellContainerName.initialize() );
31  }
32  ATH_CHECK(m_caloMgrKey.initialize());
33  // invoke internal initialization
34  return this->initializeTool();
35 }
36 
38 
39  ATH_MSG_DEBUG(" in CaloTowerBuilderToolBase::setTowerSeg ");
40  m_theTowerSeg = theTowerSeg;
41  ATH_MSG_DEBUG(" neta,nphi,etamin,etamax " << theTowerSeg.neta()
42  << " " << theTowerSeg.nphi() << " " << theTowerSeg.etamin()
43  << " " << theTowerSeg.etamax());
44 }
45 
46 
51 {
52  return m_theTowerSeg;
53 }
54 
55 
60 {
61  const CaloCellContainer* cells = nullptr;
62  if (!m_cellContainerName.key().empty()) {
64  if (!cells) {
65  ATH_MSG_WARNING("no CaloCellContainer with key <"
66  << m_cellContainerName.key() << "> found, skip tool!");
67 
68  }
69  }
70  return cells;
71 }
72 
RunTileCalibRec.cells
cells
Definition: RunTileCalibRec.py:271
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
initialize
void initialize()
Definition: run_EoverP.cxx:894
CaloTowerBuilderToolBase::m_theTowerSeg
CaloTowerSeg m_theTowerSeg
Definition: CaloTowerBuilderToolBase.h:99
CaloTowerSeg::neta
index_t neta() const
Retrieve number of bins.
Definition: CaloTowerSeg.h:423
CaloTowerBuilderToolBase::getCells
const CaloCellContainer * getCells() const
Retrieve cells from StoreGate.
Definition: CaloTowerBuilderToolBase.cxx:59
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
CaloTowerSeg::nphi
index_t nphi() const
Retrieve number of bins.
Definition: CaloTowerSeg.h:428
ATLAS_NOT_THREAD_SAFE
StatusCode CaloTowerBuilderToolBase::initialize ATLAS_NOT_THREAD_SAFE()
Install fatal handler with default options.
Definition: CaloTowerBuilderToolBase.cxx:28
CaloTowerBuilderToolBase::~CaloTowerBuilderToolBase
virtual ~CaloTowerBuilderToolBase()
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CaloTowerBuilderToolBase::towerSeg
const CaloTowerSeg & towerSeg() const
Return the tower segmentation.
Definition: CaloTowerBuilderToolBase.cxx:50
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CaloTowerSeg::etamax
double etamax() const
Retrieve upper boundary value range.
Definition: CaloTowerSeg.h:448
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
errorcheck.h
Helpers for checking error return status codes and reporting errors.
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
CaloTowerSeg::etamin
double etamin() const
Retrieve lower boundary value range.
Definition: CaloTowerSeg.h:443
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CaloTowerBuilderToolBase::m_cellContainerName
SG::ReadHandleKey< CaloCellContainer > m_cellContainerName
Definition: CaloTowerBuilderToolBase.h:92
CaloTowerBuilderToolBase::CaloTowerBuilderToolBase
CaloTowerBuilderToolBase(const std::string &name, const std::string &type, const IInterface *parent)
AlgTool constructor.
Definition: CaloTowerBuilderToolBase.cxx:14
CaloTowerSeg
Data object stores CaloTower segmentation.
Definition: CaloTowerSeg.h:37
AthAlgTool
Definition: AthAlgTool.h:26
SG::get
const T * get(const ReadHandleKey< T > &key)
Convenience function to retrieve an object given a ReadHandleKey.
CaloTowerBuilderToolBase.h
CaloTowerBuilderToolBase::setTowerSeg
virtual void setTowerSeg(const CaloTowerSeg &theTowerSeg) override
Definition: CaloTowerBuilderToolBase.cxx:37