Skip to content

v0.20.12 - ROOT Macro Cleanup (2026-06-08)

What Changed?

This release refactors the ROOT C macro examples to use TTree::Project() instead of TTree::Draw() with the >> histname syntax for filling histograms. The change simplifies the fill_histogram() helper by eliminating intermediate string construction.


What's New

Main Feature: Use TTree::Project in fill_histogram

What it does: Replaces TTree::Draw(varexp, selection, "goff") with TTree::Project(hist->GetName(), branch, selection) in the fill_histogram() helper across three ROOT macros.

How to use it: No usage change — the macros work identically. The internal implementation is cleaner.

Code example:

// Before
void fill_histogram(TH1D* hist, TTree* tree, const TString& branch, const TString& selection = "") {
    TString varexp = Form("%s >> %s", branch.Data(), hist->GetName());
    tree->Draw(varexp, selection, "goff");
}

// After
void fill_histogram(TH1D* hist, TTree* tree, const TString& branch, const TString& selection = "") {
    tree->Project(hist->GetName(), branch, selection);
}

Installation

Quick Start

# Get the release
git checkout v0.20.12

# Setup
task env:setup

# Run CLI
uv run kazunoko --help

What's Different from the Last Version?

🔧 Changed

  • check_histogram.C: fill_histogram() uses TTree::Project() instead of TTree::Draw()
  • check_event_rate.C: same change (fill_profile() with TProfile is unchanged — not supported by TTree::Project)
  • check_thresholds.C: same change

Is It Safe to Upgrade?

Backward Compatible: Yes

  • No changes to Python library, CLI, or public API
  • ROOT macro behavior is identical

Tests Passed

  • ✅ Builds without errors
  • ✅ Pre-commit hooks passed

Release Details

  • Date: 2026-06-08
  • Version: v0.20.12
  • Files Changed: 3 ROOT macros
  • Commits: 2f5daa6, b299378, 77f79d3, 069133e

Next Steps

No specific roadmap items at this time.