Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is redundant, for the slice index
has_method checks if both start and end indices are non-negative. The size of the valid slice can not be less than 1.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @aalkin thanks for the feedback! We checked with @DelloStritto one file where the previous code was crashing, and the
ambTrack.has_bc()condition was not sufficient, we had to add the second one.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Anton,
with the condition
!ambTrack.has_bc()we did not manage to reject the track which was making the task crash while we did it with the requirementambTrack.bc().size() == 0, so I am not sure they are fully equivalent.Do you suggest to remove the condition
!ambTrack.has_bc()?Thanks a lot for the review,
Luigi
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The getter for the slice index looks like this
Size = 0 can only happen if
has_condition is already false, or the data is somehow malformed. Probably there is an entry where start > end?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a[0] cannot be less than a[1]?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unexpected, the slice with start=end should be size 1. I'll try to reproduce this with the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DelloStritto@aalkin thanks for the checks! @jgrosseo can we in the meantime merge this PR? Based on the last messages, I would say that we should also keep the check on the size to properly catch the pathological tracks in the existing MC productions. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not against merging this. @aalkin Let us know when you have news...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added the test for start==end slice index (AliceO2Group/AliceO2#12088), and the slice of a correct size of 1 is returned. Let me look at the problematic data file, because the issue you've found seems to be something else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I can share the file I am testing with you, thanks @aalkin