https://github.com/root-project/root
Raw File
Tip revision: 1d3fcd975eb2957d69334911e994a25b7e1aa50c authored by Fons Rademakers on 05 November 2010, 14:42:46 UTC
tag patch release v5-27-06b.
Tip revision: 1d3fcd9
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