spaulaus / paass-lc

Acquire and Analyze data from XIA Pixie16 modules
GNU General Public License v3.0
2 stars 7 forks source link

Provide ROOT script to allow online histogramming in ROOT #126

Closed spaulaus closed 6 years ago

spaulaus commented 6 years ago

Expected Behavior

We provide some kind of wrapper macro to display histograms in root.

Current Behavior

Trying to view a histogram in a TFile while it's running can be....tricky. You have to manually execute a number of commands. Every 1 M events, the TFile is updated, but this destroys the pointer to the histogram.

Context

We're unable to view the online histograms at this juncture.

Possible Solution (optional)

Provide a script with a function that updates the histogram keys. This thread provides the function we need.

Acceptance Criteria

  1. A ROOT macro allows users to view histograms while the acquisition is scanning data.
spaulaus commented 6 years ago

@jjvz says there are some issues with his Experiment processor when trying to view the histograms online. I investigated and found that the issue probably lies in how the TTree is handled. I created and fixed Issue #137 to address this. Now retesting.

jjvz commented 6 years ago

I offer this script, viewLoopv2.C which is adapted from @spaulaus's code viewOnline-v4.C. This script, when executed in root with .x viewLoopv2.C("","",dimention,xmin,xmax), e.g. .x viewLoopv2.C("out.root","h1206",1,500,1500), will continuously update a selected histo until the user quits ROOT via the drop-down menu. It allows the user to re-scale x-axis, albeit crudely, and the user does not have to constantly recall any commands to update the plot. This is not at all ideal, but it gets the job done. If I was a better programmer, this script would've been be prettier! viewLoopv2.txt

spaulaus commented 6 years ago

This issue was moved to spaulaus/paass#126

spaulaus commented 6 years ago

Completed as part of the Root Histogram GUI project