Skip to content

Limit number of errors. Add min pedestal event command line parameter.#298

Merged
GernotMaier merged 3 commits intomainfrom
492-dev7
Jun 1, 2025
Merged

Limit number of errors. Add min pedestal event command line parameter.#298
GernotMaier merged 3 commits intomainfrom
492-dev7

Conversation

@GernotMaier
Copy link
Copy Markdown
Member

No description provided.

@GernotMaier GernotMaier requested a review from Copilot June 1, 2025 16:02
@GernotMaier GernotMaier self-assigned this Jun 1, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 minpedestalevents parsing in command-line reader
  • Introduce fNMinimumNumberOfPedestalEvents in 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();

Comment thread src/VBFDataReader.cpp
}
bool bSimulations = false;

unsigned int n_error_prints = 0;
Copy link

Copilot AI Jun 1, 2025

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment thread src/VReadRunParameter.cpp
Comment thread src/VEvndispRunParameter.cpp
Base automatically changed from v492-dev to main June 1, 2025 16:10
@GernotMaier GernotMaier merged commit 9380fc7 into main Jun 1, 2025
5 checks passed
@GernotMaier GernotMaier deleted the 492-dev7 branch June 1, 2025 16:56
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