22 "The FACT++ Graphical User Interfact (GUI).\n" 24 "Usage: fact [-c type] [OPTIONS]\n" 25 " or: fact [OPTIONS]\n";
38 po::options_description config(
"Program options");
40 (
"dns", var<string>(
"localhost"),
"Dim nameserver (overwites DIM_DNS_NODE environment variable)")
41 (
"host", var<string>(
""),
"Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)")
42 (
"pixel-map-file", var<string>(
"FACTmap111030.txt"),
"Pixel mapping file. Used here to get the default reference voltage.")
43 (
"CommentDB", var<string>(
""),
"")
46 po::options_description runtype(
"Run type configuration");
48 (
"run-type", vars<string>(),
"Names of available run-types")
49 (
"run-time", vars<string>(),
"Possible run-times for runs")
50 (
"run-count", vars<uint32_t>(),
"Number of events for a run")
53 conf.
AddEnv(
"dns",
"DIM_DNS_NODE");
54 conf.
AddEnv(
"host",
"DIM_HOST_NODE");
60 int main(
int argc,
const char* argv[])
71 cout <<
"LD_LIBRARY_PATH=" << gSystem->GetDynamicPath() << endl;
73 cout <<
"--- Starting QApplication ---" << endl;
74 QApplication app(argc, const_cast<char**>(argv));
76 cout <<
"--- Working around a root bug ---" << endl;
84 cout <<
"--- Instantiating GUI ---" << endl;
87 cout <<
"--- Show GUI ---" << endl;
90 cout <<
"--- Main loop ---" << endl;
92 const int rc = app.exec();
94 cout <<
"The end." << endl;
void SetupConfiguration(Configuration &conf)
void SetPrintUsage(const std::function< void(void)> &func)
T Get(const std::string &var)
void AddEnv(const std::string &conf, const std::string &env)
void Setup(const std::string &dns="", const std::string &host="")
int main(int argc, const char *argv[])
void AddOptions(const po::options_description &opt, bool visible=true)
Commandline parsing, resource file parsing and database access.
bool DoParse(int argc, const char **argv, const std::function< void()> &func=std::function< void()>())