https://github.com/root-project/root
Raw File
Tip revision: b24472e60edf72c2d249328a29bbb7a06be03c5f authored by Unknown Author on 22 December 2005, 00:54:28 UTC
This commit was manufactured by cvs2svn to create tag 'v5-08-00a'.
Tip revision: b24472e
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