https://github.com/root-project/root
Raw File
Tip revision: 60178733194062eb2fbb693797195373290b855b authored by Axel Naumann on 25 August 2021, 12:35:56 UTC
"Update ROOT version files to v6.24/04."
Tip revision: 6017873
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