Skip to content

Drop irrelevant warnings in PixelPrepDataToxAOD

Thomas Strebler requested to merge tstreble-23.0-patch-21691 into 23.0

Some warnings tend to pollute every event in case the PixelPrepDataToxAOD algorithms is run on an input file which doesn't have the pixel SDO collection included.

First of all, such warning is already present in https://gitlab.cern.ch/atlas/athena/-/blob/23.0/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx?ref_type=heads#L154

  const InDetSimDataCollection* sdoCollection(nullptr);
  if (m_writeSDOs) {
    SG::ReadHandle<InDetSimDataCollection> sdoCollectionHandle(m_SDOcontainer_key,ctx);
    if (sdoCollectionHandle.isValid()) {
      sdoCollection = &*sdoCollectionHandle;
    } else if (m_firstEventWarnings) {
      ATH_MSG_WARNING("SDO information requested, but SDO collection not available!");
    }
  }

with a protection to only display it on the first event.

Second, for the warnings removed, the SDO collection is actually not absolutely required since the truth matching can also be simply based on the geometry, rather than going back to the SDO record. See https://gitlab.cern.ch/atlas/athena/-/blob/23.0/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/PixelPrepDataToxAOD.cxx?ref_type=heads#L574

Consequently those warnings are removed.

FYI @srettie @kbehr @lgagnon @goetz @dan-guest

Merge request reports