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());
68 oldEl->GeoVDetectorElement::getMaterialGeom(),
69 oldEl->getCommonItems());
70 oldToNewMap[oldEl] = *newEl;
77 if (oldToNewMap[(*oldIt)]!=newEl) {
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;
102 ATH_MSG_INFO(
"recorded new CDO " << writeHandle.key() <<
" with range " << writeHandle.getRange()
103 <<
" with size of " <<
size <<
" into Conditions Store");
105 return StatusCode::SUCCESS;