Cleanup and refactor LoadWCSim#372
Conversation
… fix to the PlotWaveforms Makefile to fix a build error
|
Haven't went over in detail yet, but I noticed the workflow build failed. It seems unrelated to the PR, and I haven't found anything in the PR that would break the build. Sometimes this just happens. |
jminock
left a comment
There was a problem hiding this comment.
Looks good to me! Thank you for cleaning this up!
minor comment changes just to trigger CI with updated workflow.
another tweak to retrigger CI workflow with updated action
yet another workflow attempt
|
alright, the first thing i can't help but notice (because the git diff highlights the entire file as having changed) is that the whitespace has been switched from consistent tab-intenting to a combination of tabs and spaces. |
| MCFile = WCSimEntry->GetCurrentFile()->GetName(); | ||
|
|
||
| // Clean slate | ||
| std::cout << TDCData->size() << std::endl; |
There was a problem hiding this comment.
omit couts, especially as this is probably misleading to print the number of hits just priot to clearing and re-populating them?
|
Alright, finally got the CI approval, looks fine to me, i agree it's more readable like this. 👍 |
Describe your changes
Title says it all. LoadWCSim had a lot of copy pasta and this fixes it. This makes it easier to read and make modifications later. I also took the opportunity to adjust layout and formatting to my preferences.
Checklist before submitting your PR
newusage, there is a reason the data must be on the heapnewthere is adelete, unless I explicitly know why (e.g. ROOT or a BoostStore takes ownership)I didn't create anything new, mainly just rearranged, so the last four boxes are unchecked.
Additional Material
I loaded and saved a single WCSim file. Then used LoadANNIEEvent and PrintANNIEEvent to verify that the resulting files are the same (or nearly so). The only "unintended" difference I found was a minor change in the floating point precision of MCParticle::trackLength (eg. 0.563564 → 0.563563) that will have no impact.