Limit number of errors. Add min pedestal event command line parameter.#298
Merged
GernotMaier merged 3 commits intomainfrom Jun 1, 2025
Merged
Limit number of errors. Add min pedestal event command line parameter.#298GernotMaier merged 3 commits intomainfrom
GernotMaier merged 3 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new command-line parameter to set a minimum number of pedestal events, applies that threshold in pedestal calculations, and adds a safeguard to limit repeated error messages when reading data files.
- Add
minpedestaleventsparsing in command-line reader - Introduce
fNMinimumNumberOfPedestalEventsin run parameters with default and printout - Replace hardcoded pedestal-event checks and warning messages with the new parameter
- Cap the number of printed exceptions in data reader to avoid log flooding
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/VReadRunParameter.cpp | Parse new minpedestalevents CLI option |
| src/VEvndispRunParameter.cpp | Initialize and print default minimum pedestal events |
| inc/VEvndispRunParameter.h | Declare new parameter and bump ROOT ClassDef version |
| src/VCalibrator.cpp | Use fNMinimumNumberOfPedestalEvents instead of hardcoded 50 in checks |
| src/VBFDataReader.cpp | Add a counter to limit exception log prints when reading corrupted files |
Comments suppressed due to low confidence (1)
inc/VEvndispRunParameter.h:301
- The method
printCTA_DST()is declared but not implemented, which will lead to a linker error. Either provide an implementation or remove the declaration.
void printCTA_DST();
| } | ||
| bool bSimulations = false; | ||
|
|
||
| unsigned int n_error_prints = 0; |
There was a problem hiding this comment.
The n_error_prints counter is reset on each call since it's a local variable. Consider making it static or a class member so it persists across multiple invocations and effectively limits log output.
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.
No description provided.