Difference between revisions of "Mktbl Help Text"
From GlueXWiki
(Created page with "<pre> MakeTable or mktbl - create type table with the specified namepath and parameters usage: mktbl <name> -r <rows_number> <columns> #<comments> name - ...") |
(No difference)
|
Latest revision as of 12:06, 8 January 2014
MakeTable or mktbl - create type table with the specified namepath and parameters usage: mktbl <name> -r <rows_number> <columns> #<comments> name - is a /name/path rows_number - number of rows columns - see 'columns format' comments - are comments... columns format: minimal columns format: <name1> <name2> ... <nameN> - create N columns, with names name1 ... nameN of type double (by default) full format for each column: <quantity><name><start_index>=<type> where: quantity - number of columns with such name type - type of the column (int, double, string) name - name of the column - the only required part start_index - if quantity is defined set start index for auto-naming It is simple! Just look at examples: 1) 'x y z' - create 3 columns with names "x", "y", "z". The type is considered to be 'double' by default 2) 'index=int digit=double descr=string' - create 3 columns: 'index', 'digit' and 'descr' of types int, double and string Imagine, one needs to create 50 columns for 50 channels? 3) '50channel' - create 50 columns channel0,channel1, ..., channel49. The type is considered to be 'double' by default 4) '50channel=int' - create 50 columns channel0,channel1, ..., channel49 of type (int) The last one is change start index of auto naming the colums 5) '50channel1' - create 50 columns channel1,channel1, ..., channel50 6) '3item_15=long - create item_15, item_16, item_17 of type long / \ \ \__________ / \ \ \ <quantity><name><start_index>=<type> * You can disable quantity logic with --no-quantity flag (see --no-quantity details) examples: 1) mktbl /test/mytable x y z creates in a directory "/test" a table with name "mytable" with 1 row (by default) and 3 columns "x", "y", "z" of type double 2) mktbl /test/mytable -r 2 x y z #"This is comment for my table" the same as in first example, but with 2 rows and comment 3) mktbl /test/table2 5val2=int creates in a directory "/test" a table with name "table2" with 5 columns "val2", "val3" ... "val6" of type int. keys: -r <N> or --rows <N> Number of rows -c <N> or --columns <N> Number of columns -I or --interactive Interactively ask information that is not provided (rows number, comments) (This option is switched ON by default if ccdbcmd is in interactive mode) -nq or --no-quantity if set digits before column names are NOT treated as quantities i.e mktbl ... 10val - creates 10 columns named 'val0' ... 'val9' mktbl -nq ... 10val - creates 1 column named '10val'