30 return StatusCode::SUCCESS;
41 if (writeHandle.isValid()) {
42 ATH_MSG_DEBUG(
"CondHandle " << writeHandle.fullKey() <<
" is already valid."
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(),
nullptr);
68 oldEl->GeoVDetectorElement::getMaterialGeom(),
69 oldEl->getCommonItems());
70 oldToNewMap[oldEl] = *newEl;
75 InDetDD::HGTD_DetectorElementCollection::const_iterator oldIt{oldColl->begin()};
77 if (oldToNewMap[(*oldIt)]!=newEl) {
83 newEl->surface().associateLayer(*
layer);
94 const std::size_t
size{writeCdo->size()};
95 if (writeHandle.record(std::move(writeCdo)).isFailure()) {
97 <<
" with EventRange " << writeHandle.getRange()
98 <<
" into Conditions Store");
99 return StatusCode::FAILURE;
101 ATH_MSG_INFO(
"recorded new CDO " << writeHandle.key() <<
" with range " << writeHandle.getRange()
102 <<
" with size of " <<
size <<
" into Conditions Store");
104 return StatusCode::SUCCESS;