#include "TCanvas.h" #include "TROOT.h" #include "TH1D.h" #include "TFile.h" void macro() { TFile* f = new TFile("data.root"); TH1D* h; f->GetObject("combined", h); std::cout << h->GetEntries() << std::endl; h->Draw(" A "); } int main() { macro(); }