Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:57:46

0001 //--------------------- EcnaGuiEB.cc -----------------
0002 //
0003 //         E.C.N.A.  dialog box (GUI) for Barrel
0004 //
0005 //         Update: 21/10/2010
0006 //
0007 //----------------------------------------------------
0008 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaGui.h"
0009 #include <cstdlib>
0010 
0011 #include "Riostream.h"
0012 #include "TROOT.h"
0013 #include "TGApplication.h"
0014 #include "TGClient.h"
0015 #include "TRint.h"
0016 
0017 #include <stdlib.h>
0018 #include <string>
0019 #include "TSystem.h"
0020 #include "TObject.h"
0021 #include "TGWindow.h"
0022 
0023 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParPaths.h"
0024 
0025 extern void InitGui();
0026 VoidFuncPtr_t initfuncs[] = {InitGui, 0};
0027 TROOT root("GUI", "GUI test environnement", initfuncs);
0028 
0029 using namespace std;
0030 
0031 int main(int argc, char** argv) {
0032   TEcnaObject* MyEcnaObjectManager = new TEcnaObject();
0033   TEcnaParPaths* pCnaParPaths = new TEcnaParPaths(MyEcnaObjectManager);
0034   if (pCnaParPaths->GetPaths() == kTRUE) {
0035     std::cout << "*EcnaGuiEB> Starting ROOT session" << std::endl;
0036     TRint theApp("App", &argc, argv);
0037 
0038     std::cout << "*EcnaGuiEB> Starting ECNA session" << std::endl;
0039     TEcnaGui* mainWin = new TEcnaGui(MyEcnaObjectManager, "EB", gClient->GetRoot(), 395, 710);
0040     mainWin->DialogBox();
0041     Bool_t retVal = kTRUE;
0042     theApp.Run(retVal);
0043     std::cout << "*EcnaGuiEB> End of ECNA session." << std::endl;
0044     delete mainWin;
0045 
0046     std::cout << "*EcnaGuiEB> End of ROOT session." << std::endl;
0047     theApp.Terminate(0);
0048     std::cout << "*EcnaGuiEB> Exiting main program." << std::endl;
0049     exit(0);
0050   }
0051 }