Repository navigation
Conversation
|
O2 linter results: ❌ 0 errors, |
| float interactionRate = -1.f; | ||
| if constexpr (!IsMc) { | ||
| if (fillHistQa) { | ||
| if (FillMl || fillTreeUpcQa || fillHistQa) { |
There was a problem hiding this comment.
You are mixing compile-time condition and run-time condition. That looks suspicious.
There was a problem hiding this comment.
You are mixing compile-time condition and run-time condition. That looks suspicious.
Thanks for the comment. I've fixed this.
There was a problem hiding this comment.
You just removed the conditions. Does it mean that the previous logic was wrong?
There was a problem hiding this comment.
The previous logic was correct, it ensured that the rate was assigned whenever the ML or QA output needed it. However, the condition looked suspicious, so I removed it and now fetch and assign the rate for every selected data collision.
There was a problem hiding this comment.
Sorry but I don't understand your reasoning. Did you remove the condition just because I said that it looked suspicious or because you thought there was something wrong with it?
There was a problem hiding this comment.
Partly because you pointed out that it looked suspicious, but also because I thought removing it would make the code cleaner and more readable. I didn’t find something wrong with the condition itself.
There was a problem hiding this comment.
Well, while having clean and readable code is important of course, if it does not do what was intended, it's useless.
If the condition was correct, which seems to be the case here, you should add it back.
My comment was more of a warning to double-check the logic because usually this mixing indicates a mistake.
There was a problem hiding this comment.
Well, while having clean and readable code is important of course, if it does not do what was intended, it's useless. If the condition was correct, which seems to be the case here, you should add it back. My comment was more of a warning to double-check the logic because usually this mixing indicates a mistake.
Thanks for the clarification! The condition was intended to avoid unnecessary CCDB requests when the interaction rate is not used. I added it back.
Replace
runNumberwithinteractionRateinHfUpcQaandHfUpcLcBdtInfosto enable direct studies versus interaction rate.