https://github.com/root-project/root
Raw File
Tip revision: 49ae85f5fe419209f949b04e8253a0015b8946a0 authored by Axel Naumann on 27 November 2023, 18:27:38 UTC
[foundation] Update version file to 6.30.02.
Tip revision: 49ae85f
GetWebHistogram.C
void GetWebHistogram()
{
   // example of script called from an Action on Demand when a TRef object
   // is dereferenced. See Event.h, member fWebHistogram

   const char *URL = "http://root.cern.ch/files/pippa.root";
   printf("GetWebHistogram from URL: %s\n",URL);
   TFile *f= TFile::Open(URL);
   f->cd("DM/CJ");
   TH1 *h6 = (TH1*)gDirectory->Get("h6");
   h6->SetDirectory(0);
   delete f;
   TRef::SetStaticObject(h6);
}
back to top