Repository navigation
Remove the unused GANfreemem flag of TFCSEnergyAndHitGANV2, which shares its bit with RetryChainFromStart, and clear that bit when reading older files - #216
Merged
Conversation
…res its bit with RetryChainFromStart, and clear that bit when reading older files
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codecov Report✅ All modified and coverable lines are covered by tests.
|
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.
Problem
TFCSEnergyAndHitGANV2derives fromTFCSParametrizationChainand defines its flagkGANfreememasBIT(17), the same bit asTFCSParametrizationChain::kRetryChainFromStart. The constructor sets it, so every GAN reportsRetryChainFromStart(): all 564TFCSEnergyAndHitGANV2inTFCSparam_AF3_MC23_Sep23.rootdo. Athenaupstream/mainhas the same clash.GANfreemem()itself is never read, here, in Athenamain-FCSExternalor in FastCaloSimAnalyzer. The comment about deletingm_inputafter reading is left over fromTFCSEnergyAndHitGAN; this class has nom_inputand no custom streamer. So the only effect of the bit is the chain one.simulate_and_retryhands a retry request of the parametrizations before and after the bins back to the caller instead of retrying, andTFCSEnergyAndHitGANV2::simulate, which never restarts its chain, then fails withFCSFatal. No production parametrization requests a retry there today, so simulation is not affected.Change
kGANfreemem,GANfreemem(),set_GANfreemem(),reset_GANfreemem()and the stale comment are removed, and the constructor no longer sets the bit.Streamer(TFCSEnergyAndHitGANV2 -inLinkDef.h, as forTFCSPredictExtrapWeights) reads and writes the class buffer as before, and clearsBIT(17)after reading, so older files read as new ones. The file format, the class version and the StreamerInfo do not change.GANStreamerTests: a new GAN does not reportRetryChainFromStart(), and a GAN withBIT(17)set (as in older files) does not after writing and reading.Files written from now on have the bit clear; older readers (Athena's own copy) ignore it there as well.
Checks
Against
main(73c5cc7):AtlasBenchmarkdump (BENCH_N=50): byte-identical tomainSliceCheckon the MC23 fileTFCSparam_dev_Hybrid_Ha_v5_all_baryons_0_500.root(reads all its GANs through the new streamer,BENCH_N=20): byte-identical tomainci-linux(clang-tidy 21, cppcheck): 0 warnings; its ctest 130/130 passed