Draft
Conversation
added 2 commits
September 30, 2022 15:53
sbnana v09_59_00 using sbnanaobj v09_19_04
This was referenced Sep 30, 2022
Author
|
This is a set of PRs that spans SBNSoftware/sbnanaobj#79, SBNSoftware/sbncode#298, and SBNSoftware/sbnobj#67 |
jzennamo
reviewed
Oct 12, 2022
| std::cout << "SpectrumLoader: nonzero number of both BNB (" << nbnb | ||
| << ") and NuMI (" << nnumi << ") triggers. I'm confused" | ||
| const int next = sr->hdr.extinfo.size(); | ||
| if(nbnb > 0 && nnumi > 0 && next > 0){ |
Contributor
There was a problem hiding this comment.
Should this abort when all three are non-zero or just when two out of three are?
Contributor
|
Looks good now! |
jzennamo
approved these changes
Oct 13, 2022
PetrilloAtWork
approved these changes
Oct 19, 2022
Member
PetrilloAtWork
left a comment
There was a problem hiding this comment.
One suggestion left behind, because after all it's me.
Either ways, it's good.
Comment on lines
+191
to
+193
| if((nbnb > 0 && nnumi > 0) || (nbnb > 0 && next > 0) || (nnumi > 0 && next > 0)){ | ||
| std::cout << "SpectrumLoader: nonzero number of 2 of 3 BNB (" << nbnb | ||
| << "), NuMI (" << nnumi << "), and EXT (" << next << ") triggers. I'm confused" |
Member
There was a problem hiding this comment.
More maintainable alternative:
Suggested change
| if((nbnb > 0 && nnumi > 0) || (nbnb > 0 && next > 0) || (nnumi > 0 && next > 0)){ | |
| std::cout << "SpectrumLoader: nonzero number of 2 of 3 BNB (" << nbnb | |
| << "), NuMI (" << nnumi << "), and EXT (" << next << ") triggers. I'm confused" | |
| const unsigned int nGateTypes = (nbnb > 0) + (nnumi > 0) + (next > 0); | |
| if(nGateTypes > 1){ | |
| std::cout << "SpectrumLoader: nonzero number of " << nGateTypes << " of 3 BNB (" << nbnb | |
| << "), NuMI (" << nnumi << "), and EXT (" << next << ") triggers. I'm confused" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds offbeam gate counting into the CAFs. The number of gates is computed as a difference with the gate counting performed within the event to compute the number of offbeam gates for BNB or NuMI seen by the trigger hardware on an event-by-event basis.