TRD: merging TracketCheck and TrackletCountCheck#2201
Merged
Barthelemy merged 5 commits intoMar 28, 2024
Conversation
martenole
reviewed
Mar 22, 2024
|
|
||
| ILOG(Debug, Devel) << "initializing TrackletCountCheck" << ENDM; | ||
|
|
||
| mThresholdMeanHighPerTimeFrame = std::stof(mCustomParameters.atOrDefaultValue("UpperthresholdPerTimeFrame", "600000.0" /*default value*/, *mActivity)); |
Contributor
There was a problem hiding this comment.
I stumbled upon this as well and don't really like the framework API. Basically you should not use the atOrDefaultValue method, as this will give you always the default value from the code and not from the json unless you have provided a value for the explicit activity type and beamType. Took me also a bit to figure out what to use. Please change all these to use atOptional like below:
Suggested change
| mThresholdMeanHighPerTimeFrame = std::stof(mCustomParameters.atOrDefaultValue("UpperthresholdPerTimeFrame", "600000.0" /*default value*/, *mActivity)); | |
| mThresholdMeanHighPerTimeFrame = std::stof(mCustomParameters.atOptional("UpperthresholdPerTimeFrame", *mActivity).value_or("6e5")); |
I also think that with the scientific notation long numbers are more easy to read..
martenole
approved these changes
Mar 27, 2024
Contributor
martenole
left a comment
There was a problem hiding this comment.
Did not go through everything in detail, but looks good to me
Barthelemy
approved these changes
Mar 28, 2024
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.
Hi @martenole !
In this PR , I tried to merge two checks: TrackletCheck and TrackletCountCheck.
Please check if everything seems fine. If everything is fine I will remove commented statements.
One issue I see is that check class can read default parameters written in code
for example:
mStatThresholdPerTrigger = std::stof(mCustomParameters.atOrDefaultValue("StatThresholdPerTrigger", "1000.0", *mActivity));but can not read default parameter provided with config

for example: