7#include "GaudiKernel/IChronoStatSvc.h"
12#include "CaloEvent/CaloTowerContainer.h"
20 ISvcLocator* pSvcLocator)
70 return StatusCode::FAILURE;
79 unsigned int toolCtr = 0;
86 for (ToolHandle<ICaloTowerBuilderToolBase>& tool :
m_ptools) {
89 ATH_MSG_INFO(std::setw(2) << toolCtr <<
".) " << tool->type()
90 <<
"::name() = \042" << tool->name() <<
"\042");
98 tool->setTowerSeg(theTowerSeg);
105 return StatusCode::SUCCESS;
122 ATH_CHECK( theTowers.
record(std::make_unique<CaloTowerContainer>(theTowerSeg)) );
125 ToolHandleArray<ICaloTowerBuilderToolBase>::const_iterator firstITool =
m_ptools.begin();
126 ToolHandleArray<ICaloTowerBuilderToolBase>::const_iterator lastITool =
m_ptools.end();
127 StatusCode processStatus = StatusCode::SUCCESS;
134 while (!processStatus.isFailure() && firstITool != lastITool) {
137 m_chrono->chronoStart((*firstITool)->name());
140 processStatus = (*firstITool)->execute(ctx, theTowers.
ptr());
143 m_chrono->chronoStop((*firstITool)->name());
145 if (!processStatus.isFailure()) {
147 <<
": CaloTowerContainer::size() = " << theTowers->size());
153 << (*firstITool)->name()
154 <<
"\042 - cross-check CaloTowerContainer::size() = "
155 << theTowers->size());
161 return StatusCode::SUCCESS;
170 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Helpers for checking error return status codes and reporting errors.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
An algorithm that can be simultaneously executed in multiple threads.
SG::WriteHandleKey< CaloTowerContainer > m_towerContainerKey
ServiceHandle< IChronoStatSvc > m_chrono
virtual StatusCode finalize() override
unsigned int m_nPhiTowers
virtual ~CaloTowerAlgorithm()
virtual StatusCode initialize() override
inherited from Algorithm
unsigned int m_nEtaTowers
ToolHandleArray< ICaloTowerBuilderToolBase > m_ptools
virtual StatusCode execute(const EventContext &ctx) const override
CaloTowerAlgorithm(const std::string &name, ISvcLocator *pService)
Algorithm constructor.
Data object stores CaloTower segmentation.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.