On Wed, Sep 7, 2011 at 5:01 PM, Jordi Nadal <jnadal_at_ifae.es> wrote:
> Hello experts,
>
> Basically what I want to do is:
>
> TFile *file = TFile::Open("PSE/JO_muon_PSE_RbFree/sumRootFile.root");
> TTree* HangingTree = (TTree*) file->Get("HangingTree");
> HangingTree->Draw(raw+">>histo");
>
> is there a better way to "get " this histo?
>
> I would like to do is histo->GetMean() and doing it like above I get wrong numbers…
>
This should work:
TH1D *histo = (TH1D*) gROOT->FindObject("histo"); histo->GetMean();
-- Suvayu Open source is the future. It sets us free.Received on Wed Sep 07 2011 - 17:49:41 CEST
This archive was generated by hypermail 2.2.0 : Wed Sep 07 2011 - 23:50:01 CEST