|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "GaudiKernel/IChronoStatSvc.h"
12 #include "CaloEvent/CaloTowerContainer.h"
20 ISvcLocator* pSvcLocator)
22 , m_chrono(
"ChronoStatSvc",
name)
23 , m_doChronoStat(true)
30 , m_towerContainerKey(
"")
70 return StatusCode::FAILURE;
79 unsigned int toolCtr = 0;
86 for (ToolHandle<ICaloTowerBuilderToolBase>&
tool :
m_ptools) {
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;
ServiceHandle< IChronoStatSvc > m_chrono
virtual StatusCode execute(const EventContext &ctx) const override
unsigned int m_nEtaTowers
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
CaloTowerAlgorithm(const std::string &name, ISvcLocator *pService)
Algorithm constructor.
An algorithm that can be simultaneously executed in multiple threads.
ToolHandleArray< ICaloTowerBuilderToolBase > m_ptools
virtual ~CaloTowerAlgorithm()
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual StatusCode finalize() override
Helpers for checking error return status codes and reporting errors.
SG::WriteHandleKey< CaloTowerContainer > m_towerContainerKey
virtual StatusCode initialize() override
inherited from Algorithm
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Data object stores CaloTower segmentation.
size_type size() const noexcept
Returns the number of elements in the collection.
unsigned int m_nPhiTowers