39   return StatusCode::SUCCESS;
 
   50   if (writeHandle.isValid()) {
 
   51     ATH_MSG_DEBUG(
"CondHandle " << writeHandle.fullKey() << 
" is already valid." 
   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;
 
   78   writeHandle.addDependency(readHandle);
 
   82     if (*muonDependency != 
nullptr) {
 
   83        writeHandle.addDependency(muonDependency);
 
   86        return StatusCode::FAILURE;
 
   91     if (*trtDependency != 
nullptr) {
 
   92       writeHandle.addDependency(trtDependency);
 
   95       return StatusCode::FAILURE;
 
  100     if (*sctDependency != 
nullptr) {
 
  101       writeHandle.addDependency(sctDependency);
 
  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()]);
 
  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;
 
  157   ATH_MSG_INFO(
"recorded new CDO " << writeHandle.key() << 
" with range " <<  writeHandle.getRange()
 
  158       << 
" with size of " << 
size << 
" into Conditions Store");
 
  160   return StatusCode::SUCCESS;