I’m trying for a while to safe one single value in a root file.
The root file contains already two TTrees and a couple of histograms
All this data is related to one assembly and one measurement.
Now I want to save the voltage with the measured data in the same file.
I thought about using a new TTree with only one entry but I was hoping there would be a more elegant way to do that.
Thanks for your help
You can just write an object. See:
I would actually like to do the same.
Say, I have a
and later in the code
somevalue = 2;
I cant do
TFile* hfile = new TFile(filename,“RECREATE”,“BeamMonitor”);
Error: non class,struct,union object somevalue used with . or -> Bla.C:
So what’s the trick?
It seems, one can use this:
works for me.