Skip to content

CHG: MReadOutAssembly class clean up#167

Merged
zoglauer merged 4 commits into
cositools:develop/emfrom
zoglauer:feature/MReadOutAssembly-cleanup
Jun 29, 2026
Merged

CHG: MReadOutAssembly class clean up#167
zoglauer merged 4 commits into
cositools:develop/emfrom
zoglauer:feature/MReadOutAssembly-cleanup

Conversation

@zoglauer

Copy link
Copy Markdown
Collaborator

Lot's of changes, but 99% are just code, documentation & formatting clean-up.
Unit tests should pass.

@zoglauer zoglauer requested review from ckierans, fhagemann and snpike and removed request for snpike June 23, 2026 19:28

@fhagemann fhagemann left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good to me.
Mostly style guide changes but also:

  • Removing StripHitTOnly methods
  • Changing m_InDetector from bool[16] to array<bool,16>
  • Adding a comment about a BUG? --> If the bug still persists, keep track of it in an issue?

Comment thread include/MReadOutAssembly.h
Comment thread include/MReadOutAssembly.h
Comment thread src/MReadOutAssembly.cxx
Comment thread src/MReadOutAssembly.cxx
Comment thread src/MReadOutAssembly.cxx Outdated
// Remove a strip hit

if (i < m_StripHits.size()) {
// BUG: MHit objects retain non-owning references to this strip hit if the caller deletes it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this bug still present or does it need to be fixed? If the latter: track as issue?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good point: #168

Comment thread src/MReadOutAssembly.cxx Outdated
Comment thread src/MReadOutAssembly.cxx Outdated
Comment thread src/MReadOutAssembly.cxx Outdated
Comment thread src/MReadOutAssembly.cxx Outdated
Comment thread src/MReadOutAssembly.cxx Outdated
@fhagemann

Copy link
Copy Markdown

And the GitHub Action tests all pass :)

@zoglauer

Copy link
Copy Markdown
Collaborator Author

I removes all the "." at the end of the one-line comments.

@zoglauer

Copy link
Copy Markdown
Collaborator Author

New version ready.

@fhagemann fhagemann left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good to me 👍

@fhagemann

Copy link
Copy Markdown

Looks like #155 added new code to MReadOutAssembly, so we might want to check as well that the new code is clean

@zoglauer

Copy link
Copy Markdown
Collaborator Author

I checked the new code, fixed the formatting, and found a bug in it. Turns out part of it was already there in the old code too... that one was above Claude's and GPT's pay grade.
#169

@zoglauer zoglauer merged commit a9e1d0e into cositools:develop/em Jun 29, 2026
1 check passed
@fhagemann

Copy link
Copy Markdown

I remember commenting on this in #124 (comment), but we should have also added a bug comment and opened an issue already back then.. 😅

@zoglauer

Copy link
Copy Markdown
Collaborator Author

Good catch :)
That is a sneaker bug - we don't know when the next one will be added, and then we all might have forgotten about 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.

2 participants