39 return StatusCode::SUCCESS;
52 <<
". In theory this should not be called, but may happen"
53 <<
" if multiple concurrent events are being processed out of order.");
54 return StatusCode::SUCCESS;
58 if (oldColl==
nullptr) {
59 ATH_MSG_FATAL(
"Null pointer is returned by getDetectorElementCollection()");
60 return StatusCode::FAILURE;
64 std::unique_ptr<InDetDD::SiDetectorElementCollection> writeCdo{std::make_unique<InDetDD::SiDetectorElementCollection>()};
69 if (readCdo==
nullptr) {
71 return StatusCode::FAILURE;
82 if (*muonDependency !=
nullptr) {
86 return StatusCode::FAILURE;
91 if (*trtDependency !=
nullptr) {
95 return StatusCode::FAILURE;
100 if (*sctDependency !=
nullptr) {
103 ATH_MSG_ERROR(
"SCT AlignmentStore not found but configured");
104 return StatusCode::FAILURE;
109 std::map<const InDetDD::SiDetectorElement*, const InDetDD::SiDetectorElement*> oldToNewMap;
110 oldToNewMap[
nullptr] =
nullptr;
111 writeCdo->resize(oldColl->
size());
116 oldEl->GeoVDetectorElement::getMaterialGeom(),
117 oldEl->getCommonItems(),
119 oldToNewMap[oldEl] = *newEl;
127 if (oldToNewMap[(*oldIt)]!=newEl) {
130 newEl->setNextInEta(oldToNewMap[(*oldIt)->nextInEta()]);
131 newEl->setPrevInEta(oldToNewMap[(*oldIt)->prevInEta()]);
132 newEl->setNextInPhi(oldToNewMap[(*oldIt)->nextInPhi()]);
133 newEl->setPrevInPhi(oldToNewMap[(*oldIt)->prevInPhi()]);
137 const Trk::Layer* layer{(*oldIt)->surface().associatedLayer()};
139 newEl->surface().associateLayer(*layer);
146 newEl->updateCache();
150 const std::size_t size{writeCdo->size()};
151 if (writeHandle.
record(std::move(writeCdo)).isFailure()) {
153 <<
" with EventRange " << writeHandle.
getRange()
154 <<
" into Conditions Store");
155 return StatusCode::FAILURE;
158 <<
" with size of " << size <<
" into Conditions Store");
160 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
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.
Ensure that the extensions for the Vector3D are properly loaded.
static EventIDRange infiniteMixed()
Produces an mixed EventIDRange that is infinite in Time and RunLumi.
Class to hold the SiDetectorElement objects to be put in the detector store.
Class to hold geometrical description of a silicon detector element.
StringProperty m_detManagerName
SG::ReadCondHandleKey< GeoAlignmentStore > m_readKey
PixelDetectorElementCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteCondHandleKey< InDetDD::SiDetectorElementCollection > m_writeKey
SG::ReadCondHandleKey< InDetDD::TRT_DetElementContainer > m_trtDetElContKey
const InDetDD::PixelDetectorManager * m_detManager
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_muonManagerKey
virtual StatusCode initialize() override final
virtual StatusCode execute(const EventContext &ctx) const override final
SG::ReadCondHandleKey< GeoAlignmentStore > m_SCT_readKey
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.