FACT++  1.0
int main ( int  argc,
const char *  argv[] 
)

Definition at line 60 of file fact.cc.

References Configuration::DoParse(), Configuration::Get(), PrintHelp(), PrintUsage(), Configuration::SetPrintUsage(), Dim::Setup(), and SetupConfiguration().

61 {
62  Configuration conf(argv[0]);
63  conf.SetPrintUsage(PrintUsage);
64  SetupConfiguration(conf);
65 
66  if (!conf.DoParse(argc, argv, PrintHelp))
67  return -1;
68 
69  Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host"));
70 
71  cout << "LD_LIBRARY_PATH=" << gSystem->GetDynamicPath() << endl;
72 
73  cout << "--- Starting QApplication ---" << endl;
74  QApplication app(argc, const_cast<char**>(argv));
75 
76  cout << "--- Working around a root bug ---" << endl;
77  {
78  // It seems sometimes TGQt::RegisterWid is called before
79  // fWidgetArray is initialized, so we force that to happen here
80 // TQtWidget(NULL);
81 // cout << "LD_LIBRARY_PATH=" << gSystem->GetDynamicPath() << endl;
82  }
83 
84  cout << "--- Instantiating GUI ---" << endl;
85  FactGui gui(conf);
86 
87  cout << "--- Show GUI ---" << endl;
88  gui.show();
89 
90  cout << "--- Main loop ---" << endl;
91 
92  const int rc = app.exec();
93 
94  cout << "The end." << endl;
95 
96  return rc;
97 }
void SetupConfiguration(Configuration &conf)
Definition: fact.cc:36
void PrintUsage()
Definition: fact.cc:19
void PrintHelp()
Definition: fact.cc:30
void Setup(const std::string &dns="", const std::string &host="")
Definition: DimSetup.cc:160
Commandline parsing, resource file parsing and database access.
Definition: Configuration.h:9

+ Here is the call graph for this function: