-
Notifications
You must be signed in to change notification settings - Fork 4
GUI History
groot records semantic GUI actions to .gui_history by default. This is
separate from ROOT's .gint_history: .gint_history records prompt text, while
.gui_history records analysis operations such as markers, fits, zooms,
projections, and canvas actions.
The file uses JSON Lines. Each line is one compact JSON object, and every record uses the same top-level sections:
| Section | Purpose |
|---|---|
time |
Local timestamp for the action. |
action |
Stable action name, such as fit.gaus or projection.create. |
context |
Canvas and pad names. |
event |
ROOT event code, key code, printable key, and selected object name. |
object |
Primary object name, class, source file, and ROOT/internal path. |
parent |
Parent object provenance, commonly used for projections. |
range |
X/Y ranges used by zooms, fits, pans, and gates. |
projection |
Projection axis, output name, gate limits, and background limits. |
fit |
Fit model and measured fit quantities when available. |
marker |
Marker type and position. |
display |
Display toggles such as log scale and residual visibility. |
extra |
Action-specific fields that do not yet have a structured slot. |
Missing values are written as null. This keeps each action record predictable
even when a section is not relevant to that action.
Current journaled actions include:
| Action | Meaning |
|---|---|
canvas.open |
A GCanvas was created. |
canvas.close |
A GCanvas was closed outside interpreter shutdown. |
prompt.help |
The prompt handled ? or help before passing input to ROOT. |
marker.add |
A primary, fit, background, cut, or projection marker was added. |
markers.clear |
Markers were removed from a histogram. |
hist.zoom |
The visible histogram range was changed from markers. |
hist.unzoom |
The histogram axes were restored to their full range. |
hist.pan |
A GCanvas arrow-key pan shifted the visible X range. |
hist.rebin |
A GH1D was rebinned by the interactive rebin factor. |
hist.unbin |
A GH1D was unbinned by the interactive unbin factor. |
hist.draw_copy |
Shift-click opened a clean draw-copy in a new canvas. |
hist.clear_helpers |
Fits, markers, residual state, Sumw2, and peak markers were cleared. |
background.show |
A calculated GH1D background was drawn. |
background.toggle |
GH1D background display/removal state was toggled. |
fit.gaus |
A Gaussian fit was created from marker limits. |
fit.photopeak |
A photopeak fit was created from marker limits. |
fit.double_gaus |
A double-Gaussian fit was created from fit markers. |
residuals.toggle |
Residual display was toggled for a GH1D. |
peaks.show |
Searched peaks were displayed. |
projection.create |
A 1D projection was created from a 2D histogram or parent projection. |
projection.background |
A projection background range was marked. |
projection.navigate |
Up/down arrow navigation drew another remembered projection. |
projection.show_x |
ROOT's native TH2::SetShowProjectionX(1) was enabled. |
cut.mode |
2D marker vertices were switched into cut-building mode. |
cut.create |
A TCutG was created from cut markers. |
pad.logy.toggle |
Log Y display was toggled on a 1D pad. |
pad.logz.toggle |
Log Z display was toggled on a 2D pad. |
From the groot prompt:
gui_history()
gui_history(40)
gui_history("fit")
GGuiHistory::Print(20, "projection")The inspector prints compact summaries of the most recent matching records. For raw JSONL lines, use:
auto lines = GGuiHistory::Recent(20);
auto fit_lines = GGuiHistory::Recent(20, "fit");For summary strings without printing:
auto summary = GGuiHistory::Summary(20);Useful prompt controls:
GGuiHistory::SetEnabled(false);
GGuiHistory::SetEnabled(true);
GGuiHistory::SetPath("my.gui_history");
GGuiHistory::Clear();Configuration keys can be set in .gintrc:
Gui.HistSize: 10000
GGuiHistory.File: .gui_history
GGuiHistory.Enabled: 1
Gui.HistSize limits .gui_history to the most recent N semantic action
records. Set it to 0 or a negative value to disable trimming.