I would need some help about reading an histogram which is a leaf of a TBranch (‘depositedEnergy’) on a TTree.
I would like to get the standard deviation. Here is a snippet of my C++ code inside a macro :
TFile f("myROOTfile"); //open the root file
Double_t temp; // define the variables to hold the read values
TTree *T = (TTree*)f.Get("Detector_PV_Detector_PV_depositedEnergy"); //open my tree
T->SetBranchAddress("depositedEnergy",&depositedEnergy); //branch name + address of the variable
cout << T->GetStdDev() << " " << T->GetEntries() << endl;
Without any surprise I have an error message saying that “T” is a TTree and the method GetStdDev() doesn’t belong to that class (you can only apply it to a TH1F).
How should one use the Tree->GetHistogram() method please ?
AH ok sorry it’s not what I wanted to ask.
It 's just that I have that error message : error: no member named ‘RDataFrame’ in namespace ‘ROOT’ and I don’t know how to proceed ? I cannot find any header with that name…