30 return StatusCode::SUCCESS;
43 <<
". In theory this should not be called, but may happen"
44 <<
" if multiple concurrent events are being processed out of order.");
45 return StatusCode::SUCCESS;
49 if (oldColl==
nullptr) {
50 ATH_MSG_FATAL(
"Null pointer is returned by getDetectorElementCollection()");
51 return StatusCode::FAILURE;
55 std::unique_ptr<InDetDD::HGTD_DetectorElementCollection> writeCdo{std::make_unique<InDetDD::HGTD_DetectorElementCollection>()};
61 std::map<const InDetDD::HGTD_DetectorElement*, const InDetDD::HGTD_DetectorElement*> oldToNewMap;
62 oldToNewMap[
nullptr] =
nullptr;
63 writeCdo->resize(oldColl->
size());
68 oldEl->GeoVDetectorElement::getMaterialGeom(),
69 oldEl->getCommonItems());
70 oldToNewMap[oldEl] = *newEl;
77 if (oldToNewMap[(*oldIt)]!=newEl) {
80 const Trk::Layer* layer{(*oldIt)->surface().associatedLayer()};
84 newEl->surface().associateLayer(*layer);
95 const std::size_t size{writeCdo->size()};
96 if (writeHandle.
record(std::move(writeCdo)).isFailure()) {
98 <<
" with EventRange " << writeHandle.
getRange()
99 <<
" into Conditions Store");
100 return StatusCode::FAILURE;
103 <<
" with size of " << size <<
" into Conditions Store");
105 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const
Base class for conditions algorithms.
DataModel_detail::const_iterator< DataVector > const_iterator
DataModel_detail::iterator< DataVector > iterator
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
SG::WriteCondHandleKey< InDetDD::HGTD_DetectorElementCollection > m_writeKey
virtual StatusCode initialize() override final
const HGTD_DetectorManager * m_detManager
virtual StatusCode execute(const EventContext &ctx) const override final
HGTD_DetectorElementCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
StringProperty m_detManagerName
static EventIDRange infiniteMixed()
Produces an mixed EventIDRange that is infinite in Time and RunLumi.
Class to hold geometrical description of an HGTD detector element.
const std::string & key() const
void addDependency(const EventIDRange &range)
const EventIDRange & getRange() const
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
const DataObjID & fullKey() const
Base Class for a Detector Layer in the Tracking realm.
DataVector< HGTD_DetectorElement > HGTD_DetectorElementCollection