21 std::cout <<
"Usage: tagConditionsTableInDB [options]" << std::endl;
22 std::cout <<
"options:\n";
23 std::cout <<
"\t -h (--host) [dB host, REQUIRED]" << std::endl;
24 std::cout <<
"\t -n (--name) [dB name, REQUIRED]" << std::endl;
25 std::cout <<
"\t -p (--port) [dB port, REQUIRED]" << std::endl;
26 std::cout <<
"\t -d (--detector) [detector name, REQUIRED]" << std::endl;
27 std::cout <<
"\t -T (--tablename) [table name, REQUIRED]" << std::endl;
28 std::cout <<
"\t -t (--tag) [tag name, REQUIRED]" << std::endl;
29 std::cout <<
"\t -o (--override)" << std::endl;
40 struct option long_options[] = {
44 {
"detector", 1, 0,
'd'},
45 {
"tablename", 1, 0,
'T'},
47 {
"override", 1, 0,
'o'},
53 int c = getopt_long(argc,argv,
"t:h:p:n:d:f:o",long_options,&optindx);
86 std::cerr <<
"Unrecognized argument." << std::endl;
92 std::cerr <<
"No tag name provided. Aborting." << std::endl;
97 std::cerr <<
"No value set for dB host. Aborting." << std::endl;
101 std::cerr <<
"No value set for dB port. Aborting." << std::endl;
105 std::cerr <<
"No value set for dB name. Aborting." << std::endl;
109 std::cerr <<
"No value set for table name. Aborting." << std::endl;
118 int main(
int argc,
char *argv[])
128 catch (std::runtime_error&
e) {
129 std::cerr << e.what() << std::endl;
133 std::cerr <<
"Tagging validity dB table " <<
dbName <<
" in database with tag " 137 std::cerr <<
"Tag failed!" << std::endl;
bool ParseCLArgs(int argc, char *argv[])
int main(int argc, char *argv[])