#include <iostream>
#include <iomanip>
#include <vector>
#include <cstdlib>
#include <ctime>
#include <getopt.h>
#include <string>
#include "nutools/IFDatabase/Table.h"
Go to the source code of this file.
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 118 of file tagConditionsTableInDB.cc.
128 catch (std::runtime_error&
e) {
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[])
QTextStream & endl(QTextStream &s)
bool ParseCLArgs |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 33 of file tagConditionsTableInDB.cc.
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;
QTextStream & endl(QTextStream &s)
Definition at line 19 of file tagConditionsTableInDB.cc.
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;
QTextStream & endl(QTextStream &s)