void getMaxRun(TString rootfile){ // TString rootfile = "data44_dskim_evtstore.root"; TString tree_ntp = "dnt"; TChain *ch_ntp = new TChain(tree_ntp); ch_ntp->Add(rootfile); Int_t run ; ch_ntp->SetBranchAddress("run", &run); ch_ntp->GetEntry(ch_ntp->GetEntries()-1); cout << "Max Run: " << run << endl; }