Now I make up a dummy study of your ntuple: I hope you can start copy and pasting from it I do that with RDataFrame: you can visit the link to go through the doc of the utility.
// Create a data frame to access the dataset
root [1] ROOT::RDataFrame rdf("lemma", "si-500330.root");
// Now, a couple of histograms and simple data manipulation
// Simple histo of the number of hits
auto hNhits = rdf.Histo1D("nhits");
// Simple histo of the energy deposition for number of hits greater than 12
auto hCaloEnDep = rdf.Filter("nhits > 12").Histo1D("Calo_EnDep");
TCanvas c;
c.Divide(2,1);
c.cd(1);
hNhits->Draw();
c.cd(2);
hCaloEnDep->Draw();
Hi, first of all thanks for your reply. I had root 5.3436, I used your code but it didn’t work…I searched on internet then I read that it works just on root 6, then I downloaded it …but I get the error in the print screen…
I don’t know how to help here… I am confused by the error message which does not tell me much
Did you try reducing code reproducing the issue to the minimum?
Hi…the error in the previous screen is not due to your code…I get it just opening Root 6! (I used Root 5, but given that works in your code need Root 6 I installed it).
Maybe I must open a New topic asking help to install Root 6, then I Will try tour code!
Hi bellenot, thank for your help, it worked! just last question, please…what can I use in Root 5 to read the tree as Dpapir did in Root 6 using the command
Hi pcanl, sorry for late reply. I’d like to do what dpapiro did using this code (read the tree content)
> rootls -lt si-500330.root:lemma
by using a Root 5 code (the code used by dpapiro just work using root 6, but I want to read the “lemma” content using Root 5 (Root 6 doesn’t workon my computer).
Hi wile, thanks again for your help.
I can’t use an interactive ROOT 5 session, because, I’m writing the macro (I’ve more files). Anyway, it isnt’ important so important to write the tree content.
I wroote the macro (see attachment), it works, but I get errors trying to modify the labels (title, fonts, size, offset etc.). I commented the code that gives the errors.
Can you (or someone else) look it? calor.cpp (2.6 KB)