Communication between plugins

Hi all,

I’am writting a standalone application with TRootBrowser in order to create the GUI. Using the plugins system I added a TGFileBrowser (I will add later other plugins).
The problem is : I don’t know how to create the link between the TRootBrowser and the TGFileBrower plugin (using the HandleMenu method of TRootBrowser) in order to load a file in the TGFileBrowser opened through the Menu file of the TRootBrowser.


Here is the code :

#include “Spectroscopy.h”

#include “TRootBrowser.h”
#include “TBrowser.h”
#include “TApplication.h”
#include “TROOT.h”
#include “TStyle.h”
#include “TGTab.h”


using namespace std;

Spectroscopy::Spectroscopy(const TGWindow *p,UInt_t w,UInt_t h) : TGMainFrame(p,w,h)
fRootBrowser = new TRootBrowser(fBrowser, “Spectroscopy Analysis Tool”,0,0,1640,900,“FI”);
//fRootBrowser->ExecPlugin(“Calibration”, “Calibration.C”);
//fRootBrowser->ExecPlugin(“Background”, “Background.C”);
//fRootBrowser->ExecPlugin(“Deconvolution”, “Deconvolution.C”);
//fRootBrowser->ExecPlugin(“Fit”, “Fit.C”);

//Signal/slot between TRootBrowser and TGFileBRowser ??
int main(int argc, char **argv)
TApplication theApp(“App”, &argc, argv);

if (gROOT->IsBatch())
	fprintf(stderr, "%s: cannot run in batch mode\n", argv[0]); return 1;
Spectroscopy Spectro(gClient->GetRoot(),1024,768);


return 0;



I’m not sure what you are trying is right method, but you can take a look at the “New ROOT Browser” paragraph in these release notes
Note you can look at simpler examples, e.g. the “List Directory…” and “File List…” menu entries in the “Test” menu of $ROOTSYS/tutorials/gui/guitest.C

Cheers, Bertrand.