FACT++  1.0
void SetupConfiguration ( Configuration conf)

Definition at line 15 of file rootifysql.cc.

References Configuration::AddOptions(), po_switch(), and Configuration::SetArgumentPositions().

Referenced by main().

16 {
17  po::options_description control("Rootify SQL");
18  control.add_options()
19  ("uri,u", var<string>()->required(), "Database link as in\n\tuser:password@server[:port]/database.")
20  ("query,q", var<string>(""), "MySQL query (overwrites --file)")
21  ("file", var<string>("rootify.sql"), "An ASCII file with the MySQL query (overwrites --query)")
22  ("ignore-null,i", po_switch(), "Do not skip rows containing any NULL field")
23  ("out,o", var<string>("rootify.root"), "Output root file name")
24  ("force,f", po_switch(), "Force overwriting an existing root file ('RECREATE')")
25  ("update", po_switch(), "Update an existing root file with the new tree ('UPDATE')")
26  ("compression,c", var<uint16_t>(1), "zlib compression level for the root file")
27  ("tree,t", var<string>("Result"), "Name of the root tree")
28  ("display,d", po_switch(), "Displays contents on the screen (most usefull in combination with mysql statements as SHOW or EXPLAIN)")
29  ("null,n", po_switch(), "Redirect the output file to /dev/null")
30  ("delimiter", var<string>(""), "The delimiter used if contents are displayed with --display (default=\\t)")
31  ("verbose,v", var<uint16_t>(1), "Verbosity (0: quiet, 1: default, 2: more, 3, ...)")
32  ;
33 
34  po::positional_options_description p;
35  p.add("file", 1); // The 1st positional options
36  p.add("out", 2); // The 2nd positional options
37 
38  conf.AddOptions(control);
39  conf.SetArgumentPositions(p);
40 }
po::typed_value< bool > * po_switch()
void SetArgumentPositions(const po::positional_options_description &desc)
void AddOptions(const po::options_description &opt, bool visible=true)
Definition: Configuration.h:92
double p
Definition: palObs.c:169

+ Here is the call graph for this function:

+ Here is the caller graph for this function: