Add EBMRD for EventBuildingV2 tool chain#334
Open
fengyvoid wants to merge 2 commits intoANNIEsoft:Applicationfrom
Open
Add EBMRD for EventBuildingV2 tool chain#334fengyvoid wants to merge 2 commits intoANNIEsoft:Applicationfrom
fengyvoid wants to merge 2 commits intoANNIEsoft:Applicationfrom
Conversation
jminock
approved these changes
Aug 25, 2025
Collaborator
jminock
left a comment
There was a problem hiding this comment.
Looks good! This is already in use. So it has been tested and works.
marc1uk
reviewed
Sep 19, 2025
| Log("EBMRD: Current buffer size is " + std::to_string(MRDEventsBuffer.size()), v_message, verbosityEBMRD); | ||
| // loop the MRDEvents, save every event to MRDEventsBuffer if it's not already in the buffer | ||
| int newLoadedEvents = 0; | ||
| for (std::pair<uint64_t, std::vector<std::pair<unsigned long, int>>> p : MRDEvents) |
Collaborator
There was a problem hiding this comment.
use reference to avoid copying
| for (std::pair<uint64_t, std::vector<std::pair<unsigned long, int>>> p : MRDEvents) | ||
| { | ||
| uint64_t MTCtime = p.first; | ||
| std::vector<std::pair<unsigned long, int>> WaveMap = p.second; |
Collaborator
There was a problem hiding this comment.
use reference to avoid copying
| if (PairedMRDTimeStamps.size() > 0) | ||
| { | ||
| bool skip = false; | ||
| for (std::pair<int, std::vector<uint64_t>> pair : PairedMRDTimeStamps) |
Collaborator
There was a problem hiding this comment.
use reference to avoid copying
| Matching(matchTargetTrigger, 14); | ||
| if (CosmicTriggerGroupped) | ||
| { | ||
| Matching(36, 36); |
Collaborator
There was a problem hiding this comment.
i presume these are trigger types - ideally use enums instead of magic numbers
| if (verbosityEBMRD > 11) | ||
| cout << "******************EBMRD: new MRD event: " << loopNum << endl; | ||
| uint64_t MTCtime = mrdpair.first; | ||
| std::vector<std::pair<unsigned long, int>> WaveMap = mrdpair.second; |
Collaborator
There was a problem hiding this comment.
make reference to avoid copy
| uint32_t matchedTrigWord = 0; | ||
| int matchedTrack = 0; | ||
| int matchedIndex = 0; | ||
| for (std::pair<int, std::vector<std::map<uint64_t, uint32_t>>> pair : GroupedTriggersInTotal) |
| Log("EBMRD: Skipping TrackTriggerWord " + std::to_string(TrackTriggerWord), v_debug, verbosityEBMRD); | ||
| continue; | ||
| } | ||
| if (matchedNumberInTrack.find(TrackTriggerWord) == matchedNumberInTrack.end()) |
Collaborator
There was a problem hiding this comment.
map.count instead of find
| if (matchedNumberInTrack.find(TrackTriggerWord) == matchedNumberInTrack.end()) | ||
| matchedNumberInTrack.emplace(TrackTriggerWord, 0); | ||
|
|
||
| vector<std::map<uint64_t, uint32_t>> groupedTriggers = pair.second; |
Collaborator
There was a problem hiding this comment.
use reference to avoid copy
|
|
||
| for (int i = 0; i < groupedTriggers.size(); i++) | ||
| { | ||
| map<uint64_t, uint32_t> groupedTrigger = groupedTriggers.at(i); |
Collaborator
There was a problem hiding this comment.
use reference to avoid copy
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.
EBMRD Tool in EventBuildingV2 tool set.
This is splitted from PR #307
Seems you don't have comment for this one! :)