#include "SPDMood.h"
#include <TROOT.h>
#include "TApplication.h"
#include <TPluginManager.h>
#include "TMMainFrame.h"

// globals
pthread_mutex_t gMutex;
TString         gVERSION;


int main(int argc, char **argv) {
  
  gROOT->GetPluginManager()->AddHandler("TVirtualStreamerInfo",
					"*",
					"TStreamerInfo",
					"RIO",
					"TStreamerInfo()");
  
  gVERSION="v4.07";
  
  pthread_mutex_init(&gMutex,NULL);

  TApplication theApp("App", &argc, argv);
  
  TMMainFrame::Instance()->CreateFrame();
  
  if (argc>1 && !strcmp(argv[1],"GRID")) {
    TMMainFrame::Instance()->ProcessGridConnect();
  }

  theApp.Run();
  
  return 0;
}
