https://github.com/lmoneta/root
Raw File
Tip revision: 6d5013a3f68a8ee809bc71b89b1549beaedf6fd9 authored by moneta on 15 March 2024, 09:43:18 UTC
[tmva][pymva] Changes for new version (1.4) of scikit-learn
Tip revision: 6d5013a
fileopen.C
// @(#)macros:$Id$
// Author: Axel Naumann, 2008-05-22
//
// This script gets executed when double-clicking a ROOT file (currently only on Windows).
// The file that got double clicked and opened is accessible as _file0.

void onBrowserClose() {
   gApplication->Terminate(0);
}

void fileopen()
{
   TBrowser *b = new TBrowser;
   // or, to only browse the file:
   // new TBrowser(_file0);

   // Quit ROOT when the browser gets closed:
   TBrowserImp *bi = b->GetBrowserImp();
   if (dynamic_cast<TRootBrowser *>(bi) || dynamic_cast<TRootBrowserLite *>(bi))
      bi->GetMainFrame()->Connect("CloseWindow()", 0, 0, "onBrowserClose()");
}
back to top