Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XML: add std:: when building with tinyXML #1230

Merged
merged 2 commits into from
Feb 15, 2024

Conversation

andresailer
Copy link
Member

@andresailer andresailer commented Feb 14, 2024

BEGINRELEASENOTES

ENDRELEASENOTES

Comment on lines +38 to +41
_sL = det.extension< SurfaceList >(false) ;
if (not _sL) {
_sL = det.addExtension<SurfaceList >( new SurfaceList( true ) ) ;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still see error printouts, even with these changes. I haven't seen any runtime issues yet with ILD reco, I have to still check results.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which k4geo test are you running?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am running the ILD standard reco, where this also pops up after #1226

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might call a different extension<>()
Can you pinpoint via gdb?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In ILD reconstruction the issue is this extension here: https://github.com/iLCSoft/DDKalTest/blob/81e946b08c3d244c762714e707b640dae0b8152d/src/DDPlanarMeasLayer.cc#L110

That in turn is defined here:

using DoubleParameters = StructExtension<MapStringDoubleStruct>;

I couldn't immediately find a similar hook as for the SurfaceList, but someone with a bit more knowledge about the internals probably has more success.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- auto* ext = detElement.extension<dd4hep::rec::DoubleParameters>();
+ auto* ext = detElement.extension<dd4hep::rec::DoubleParameters>(false);

and then if(ext) instead of catch?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I have a false in there, what happens with previous versions of DD4hep? IIUC, I still get an exception, right? So, I would only have to add an additional nullptr check to have it silent for newer versions?!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still works in previous versions of DD4hep with the false and nullptr check. The if (!alert) return 0; was already present before.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PS: for ten years
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for completeness: iLCSoft/DDKalTest#16 fixes things for ILD reco

Copy link

Test Results

    8 files      8 suites   3h 5m 43s ⏱️
  360 tests   360 ✅ 0 💤 0 ❌
1 416 runs  1 416 ✅ 0 💤 0 ❌

Results for commit 7adc2ff.

@MarkusFrankATcernch MarkusFrankATcernch merged commit b6f660a into AIDASoft:master Feb 15, 2024
14 checks passed
@MarkusFrankATcernch
Copy link
Contributor

Thomas,
I think this change in the object extensions should be reverted.
If this is the only thing going wrong, then the change was not
correct, because I though on failure always a message should be printed.
Should I revert ?

@tmadlener
Copy link
Contributor

I think Andres suggestion would make sense in this case. After all, the try-catch for this specific case is effectively there for a runtime check and not necessarily an error.

On the other hand I think it might be used like this in a few other cases as well, so there might be more "error messages" popping up in other places that are not necessarily an error.

At least for me it would be OK to leave it in, but I have no idea on how many times this will still show up in other places.

@MarkusFrankATcernch
Copy link
Contributor

Let's see. If there are more problems popping up, I think we should reconsider reverting the change in the object extensions. As said: I thought the change is fully backwards compatible, which obviously is not the case.
Otherwise I would not have done it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extensions got broken with #1226
3 participants