Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
//------------------------- EcnaGuiEE.cc ------------------------
//
//         E.C.N.A.  dialog box (GUI) for Endcap
//
//         Update: 21/10/2010
//
//---------------------------------------------------------------
#include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaGui.h"
#include <cstdlib>

#include "Riostream.h"
#include "TROOT.h"
#include "TGApplication.h"
#include "TGClient.h"
#include "TRint.h"

#include <stdlib.h>
#include <string>
#include "TSystem.h"
#include "TObject.h"
#include "TGWindow.h"

#include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParPaths.h"

extern void InitGui();
VoidFuncPtr_t initfuncs[] = {InitGui, 0};
TROOT root("GUI", "GUI test environnement", initfuncs);

using namespace std;

int main(int argc, char** argv) {
  TEcnaObject* MyEcnaObjectManager = new TEcnaObject();
  TEcnaParPaths* pCnaParPaths = new TEcnaParPaths(MyEcnaObjectManager);
  if (pCnaParPaths->GetPaths() == kTRUE) {
    std::cout << "*EcnaGuiEE> Starting ROOT session" << std::endl;
    TRint theApp("App", &argc, argv);

    std::cout << "*EcnaGuiEE> Starting ECNA session" << std::endl;
    TEcnaGui* mainWin = new TEcnaGui(MyEcnaObjectManager, "EE", gClient->GetRoot(), 395, 710);
    mainWin->DialogBox();
    Bool_t retVal = kTRUE;
    theApp.Run(retVal);
    std::cout << "*EcnaGuiEE> End of ECNA session." << std::endl;
    delete mainWin;

    std::cout << "*EcnaGuiEE> End of ROOT session." << std::endl;
    theApp.Terminate(0);
    std::cout << "*EcnaGuiEE> Exiting main program." << std::endl;
    exit(0);
  }
}