Hey all,
Looking for some help with a root project!
Essentially, I have written a script that saves simulated data about the number of particles detected at certain detection point, modelled in a vector of integers, which is saved to a branch in the output file.
I run the sims on a high throughput compute cluster, and get the vector populated with around 10^9 entries, distributed from 1 to 30. Outputting the vector to a TBranch automatically puts it into a histogram that is acceptable to me. Next, I would like to save this branch (the histogram) as a pdf/png.
Currently, I’m doing this through a TBrowser, navigating to the branch and clicking Save As in the tool bar. However, since the compute cluster does not have graphics, I have to download the file onto my laptop and do this locally. With heavier simulations, this has become a problem as the output file is often more than 2-4GB and saturates the RAM on my laptop.
Is there anyway I can navigate to a vector branch and save the histogram that it automatically plots as a pdf/png through the command line, instead of graphically with TBrowser? This would allow me to just download the histograms as images from the cluster.
For reference, here are the relevant snippets of code:
TTree *tOut = new TTree("OutputTree", "OutputTree"); //output tree
vector<int> *data = 0; // initialises the vector
// some loop that populates the vector with around 10^9 entries
tOut->Branch("data", &data);
ROOT Version: 6.22/08
Platform: macOS
Compiler: Not Provided