Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

DataDisplayerMainRootHelper.cxx

00001 #include <TApplication.h>
00002 
00003 #include "DataDisplayerMainRootHelper.h"
00004 #include "DisplayManager.h"
00005 
00006 /* 
00007    Very strange symptom:
00008     Apparently if TString.h gets included (gets included by TApplication) then 
00009     the ofstream constructor fails with -O3 (the overloading of (char* + int) 
00010     confuses the compiler).
00011 
00012     I'm not sure whether this is ROOT's fault or the compiler's... though would 
00013     certainly help if the TString stuff was in a different namespace.
00014 
00015    Solution:
00016     Put access to TApplication in a separate file (this one)
00017  */
00018 
00019 using namespace SctDataDisplay;
00020 
00021 namespace SctDataDisplayHelper {
00022   TApplication* myapp=0;
00023 
00024   void createApp(bool batch) {
00025     //Create TApplication - necessary to prevent batch mode and no graphics on later ROOT versions
00026     if (!batch) myapp=new TApplication("myapp", 0, 0);
00027   }
00028 
00029   void runCanvas() {
00030     if (myapp) { 
00031       myapp->Run();
00032     } else {
00033       DisplayManager::OutputCanvases();
00034     }
00035   }
00036 }

Generated on Thu Dec 22 20:16:59 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5