#include <iostream.h>

#include <TROOT.h>
#include <TApplication.h>

#include "MStarguider.h"

/* ---------------------------------------------------------------------- */
//extern void InitGui();
//VoidFuncPtr_t initfuncs[] = { InitGui, 0 };

TROOT root("GUI", "GUI test environement"); //, initfuncs);

int main(int argc, char **argv)
{
    TApplication *app=new TApplication("Starguider", &argc, argv);

    Int_t channel = 0;
    for (int i=0; i<argc; i++)
    {
        TString arg(argv[i]);
        if (arg=="-d")
            channel = -1;
        if (arg=="-1")
            channel = 1;
        if (arg=="-0")
            channel = 0;
    }

    PixClient *client=new MStarguider(MObservatory::kMagic1, channel);
    app->Run(kTRUE);
    delete client;

    cout << "Application end... Exit." << endl;
    return 0;
}
