14 , m_writeKey{
"SCTAlignmentStore",
"SCTAlignmentStore"}
15 , m_DetManagerName(
"SCT")
17 declareProperty(
"WriteKey", m_writeKey);
18 declareProperty(
"DetManagerName", m_DetManagerName);
38 return StatusCode::SUCCESS;
45 const EventContext& ctx = Gaudi::Hive::currentContext();
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;
59 if (oldColl==
nullptr) {
60 ATH_MSG_FATAL(
"Null pointer is returned by getDetectorElementCollection()");
61 return StatusCode::FAILURE;
65 std::unique_ptr<GeoAlignmentStore> writeCdo{std::make_unique<GeoAlignmentStore>()};
71 if (readCdoStatic==
nullptr) {
73 return StatusCode::FAILURE;
82 writeHandle.addDependency(readHandleStatic);
87 if (readCdoDynamicL1==
nullptr) {
89 return StatusCode::FAILURE;
93 if (readCdoDynamicL2==
nullptr) {
94 ATH_MSG_FATAL(
"Null pointer to the read conditions object of " << readHandleDynamicL2.key());
95 return StatusCode::FAILURE;
99 if (readCdoDynamicL3==
nullptr) {
100 ATH_MSG_FATAL(
"Null pointer to the read conditions object of " << readHandleDynamicL3.key());
101 return StatusCode::FAILURE;
116 writeHandle.addDependency(readHandleDynamicL1);
117 writeHandle.addDependency(readHandleDynamicL2);
118 writeHandle.addDependency(readHandleDynamicL3);
123 oldEl->getMaterialGeom()->getAbsoluteTransform(writeCdo.get());
124 oldEl->getMaterialGeom()->getDefAbsoluteTransform(writeCdo.get());
127 writeCdo->lockDelta();
128 writeCdo->lockPosCache();
131 if (writeHandle.record(std::move(writeCdo)).isFailure()) {
132 ATH_MSG_FATAL(
"Could not record GeoAlignmentStore " << writeHandle.key()
133 <<
" with EventRange " << writeHandle.getRange()
134 <<
" into Conditions Store");
135 return StatusCode::FAILURE;
137 ATH_MSG_INFO(
"recorded new CDO " << writeHandle.key() <<
" with range " << writeHandle.getRange() <<
" into Conditions Store");
139 return StatusCode::SUCCESS;
145 return StatusCode::SUCCESS;