Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial version of TBranchPrecisionCascade Print #19

Merged
merged 2 commits into from
Aug 23, 2022
Merged

Initial version of TBranchPrecisionCascade Print #19

merged 2 commits into from
Aug 23, 2022

Conversation

genevb
Copy link

@genevb genevb commented Aug 19, 2022

This very basic version of Print() allows one to see which branches are in the PrecisionCascade files. I expect there is considerable room for improvement to this function, but this initial version is already helpful. The printing includes the detail of whether each branch's PrecisionCascade levels extend to the level of the PrecisionCascade file under examination. In other words, if one branch is saved with 3 levels (which may be 2 + 1 residual, or 3 + 0 residual) and another branch is saved with 2 levels (either 1 + 1 residual, or 2 + 0 residual), then the branches with only 2 levels will not show up in the third file, which is good to know.

In the example below, the branches' compression configuration levels (from a TTree name "PicoDst") were set as:

Track.mGMomentumX -> 2 + 0 residual
Track.mGMomentumY -> 1 + 1 residual
Track.mGMomentumZ -> 2 + 1 residual

And here's what the Print() as implemented in this PR helpfully shows:

root -l -b -q gp_all.root.55_precisioncascade_1.root -e 'PicoDst_pc1->Print()'

Attaching file gp_all.root.55_precisioncascade_1.root as _file0...
(TFile *) 0x7fafa20d7560
TTreePrecisionCascade: PicoDst_pc1 TTree uniqueID: 1 TTree pid: 1 level: 1
TBranchPrecisionCascade: Track.mGMomentumX level: 1 Basket Size: 163858
TBranchPrecisionCascade: Track.mGMomentumY level: 1 Basket Size: 685917
TBranchPrecisionCascade: Track.mGMomentumZ level: 1 Basket Size: 172095

root -l -b -q gp_all.root.55_precisioncascade_2.root -e 'PicoDst_pc2->Print()'

Attaching file gp_all.root.55_precisioncascade_2.root as _file0...
(TFile *) 0x7fe4a48f1d90
TTreePrecisionCascade: PicoDst_pc2 TTree uniqueID: 1 TTree pid: 1 level: 2
TBranchPrecisionCascade: Track.mGMomentumZ level: 2 Basket Size: 567419

@genevb genevb requested a review from pcanal as a code owner August 19, 2022 21:01
Co-authored-by: Philippe Canal <pcanal@fnal.gov>
@pcanal pcanal merged commit ab3f4d4 into pcanal:AccelogicMain Aug 23, 2022
@genevb genevb deleted the ZIGTest branch August 23, 2022 03:55
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