/usr/share/doc/root/test/GetWebHistogram.C is in root-system-doc 5.34.30-0ubuntu8.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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);
}
|