Hi, I’m a beginner in ROOT and I’m having trouble to interpret a .xml data from a TH3F ROOT file.
Here is the macro
void dump(const char *fname = "resultwaterboneEdep.root",
const char *nname = "histo")
{
if (!fname || !(*fname) || !nname || !(*nname)) return; // just a precaution
TFile *f = TFile::Open(fname, "READ");
if (!f) return; // just a precaution
TH3F *t; f->GetObject(nname, t);
if (!t) { delete f; return; } // just a precaution
// See:
// http://root.cern.ch/root/html/TTreePlayer.html#TTreePlayer:Scan
// http://root.cern.ch/root/html/TTree.html#TTree:Scan
TAxis *xaxis = t->GetXaxis();
// See:
// http://root.cern.ch/root/html/TObject.html#TObject:SaveAs
t->SaveAs("dumpX.xml");
// t->SaveAs(TString::Format("%s.xml", nname));
delete f; // no longer needed (automatically deletes "t")
}
This code gives me a .xml file
(...)
<TArrayF>
<Int_t v="778688"/>
<Array>
<Float_t v="0.000000e+00" cnt="194811"/>
<Float_t v="2.422105e-03"/>
<Float_t v="0.000000e+00" cnt="261"/>
<Float_t v="4.438538e-03"/>
<Float_t v="0.000000e+00" cnt="5"/>
<Float_t v="3.366382e-02"/>
(...)
What is v? and cnt? and why there is a zero and a number in sequence (for the most part)?