(Online) alignment crashes whe conditions pool is removed
The alignment analyser processes crash when the conditions pool is removed INFO ConditionsPool +++ Remove Conditions for pool with IOV: run(0):[276746-276746] age: 3 [33600 entries]
.
This was first noticed when trying to run the online alignment over more than three runs, as the conditions pools seem to be kept for two more runs before being deleted. The cause of the crash was initially not very clear, but by now I have the suspicion that it is because we cache the lhcb
object here for the first run and its conditions pool. When the conditions pool is removed later, we crash when trying to access it.
I'm not sure how to best fix it. As noted here, in principle we need to be careful about using multiple runs and mixing different event contexts. In the past, this was not a problem, as all our data was within a run or two. Only now for the ion data-taking we have multiple runs as input sample.
As a hacky fix, I thought of updating the IOV by adding a function like void update_iov(DetectorElement new_iov) {m_topOfGeometry = new_iov;}
to here and using this here
else {
//info() << "updating IOV" << endmsg;
data.elementProvider->update_iov(lhcb);
}
This seems to fix it, but I'm not sure if this is a good solution or has unintended side effects.
@rmatev @wouter @sponce if you could help me to find a proper solution, that would be much appreciated