PQ2-PUT(1)

NAME
pq2-put - Register one or more datasets in a dataset meta-repository based on ROOT files

SYNOPSIS
pq2-put [options] datasetfile

DESCRIPTION
This manual page documents briefly the pq2-put program.

pq2-put is a script invoking the pq2 ROOT application to register one or more datasets in a dataset meta-repository based on ROOT files; the repository can be accessed via the local file system or a remote file server daemon or a PROOF facility.

More details about the underlying 'pq2' application can be found in the man page pq2(1).

ARGUMENTS

datasetfile
    Path to the file with the list of files in the dataset or directory with the files containing the file lists of the datasets to be registered; in the first case wildcards '*' can be specified in the file name, i.e. '<dir>/fil*' is ok but '<dir>/*/file' is not. In all cases the name of the dataset is the name of the file finally used. The format of the file is described below.

OPTIONS

-h, --help
    Display help information.

-k, --keep
    Keep the temporary files created during the analysis under $TMPDIR

-v  Verbose mode

-d <datasetfile>, --dataset <datasetfile>
    Alternative way to define path to the file with the list of files.

-o <options>
    Options for registering datasets; a combination of:
         O   overwrite existing dataset
         U   add information to existing dataset, if any or create a new one
         T   Trust the information already present in the dataset
         V   verify (scan) information in the dataset (can be very slow)

--overwrite
    Alternative to '-o O'.

--update
    Alternative to '-o U'.

--trust
    Alternative to '-o T'.

--tree=<default-tree-name>
    Set the name of the default tree name to 'default-tree-name' (option 'T' or --trust only); this allows to skip the tree name specification during Process when more TTree (or derivative) objects are available in the files.

--staged
    Assume all files online or staged (option 'T' or --trust only).

-u <serverurl>, --url=<serverurl>
    URL of the PROOF master or data server providing the information; for data servers, it must include the directory. Can also be specified via the environment variables PQ2PROOFURL or PQ2DSSRVURL (see ENVIRONMENT VARIABLES)."

-t <dir>, --tmpdir=<dir>
    Directory for temporary files; defualt is /tmp/<username>.

FORMAT OF THE FILES
The name of the file defining the dataset is the name of the dataset. The files must contain one line per each file in the dataset with the full file URL. If available, additional information can be specified on the same line with the following keywords:
   sz:<size>                            size of the file in bytes
   md5:<md5_ascii>                      MD5 sum of the file in ASCII form
   uuid:<uuid>                          UUID of the file
   tree:<name>,<entries>,<first>,<last> meta-information about a tree in the file; the should be in the form
                                        <subdir>/tree-name;'entries' is the number of entries in the tree;
                                        'first' and 'last' define the entry range.
   obj:<name>,<class>,<entries>         meta-information about a generic object in the file; the should be in
                                        the form <subdir>/obj-name; 'class' is the object class; 'entries' is
                                        the number of occurences for this object.
Multiple occurences of 'tree:' or 'obj:' can be specified.

EXAMPLES
The following examples show how to register information corresponding to the H1 example of the ROOT tutorials.

Minimal information
    In this example the files are read from the ROOT HTTP server. Detailed information about the content of the files is not available, so only the URLs are given. If the file is called h1-http, we get
       $ cat h1-http
       http://root.cern.ch/files/h1/dstarmb.root
       http://root.cern.ch/files/h1/dstarp1a.root
       http://root.cern.ch/files/h1/dstarp1b.root
       http://root.cern.ch/files/h1/dstarp2.root
    The dataset is registered and verification required:
       $ pq2-put -o "V" h1-http
       pq2-put: 1 dataset(s) registered

Full information
    In this example the files are read from the local /data/h1 directory. Detailed information about the content of the files is available. If the file is called h1-local, we get
       $ cat h1-local
       file:/data/h1/dstarmb.root  sz:21330730 md5:0a60055370e16d954f90fb50c2d1a801 tree:h42,21920,0,-1
       file:/data/h1/dstarp1a.root md5:e2f959b15235214be3c973c3e7a9ff2c sz:71464503 tree:h42,73243
       file:/data/h1/dstarp1b.root md5:169ea4799661696a25e73257fe8a833d sz:83827959 tree:h42,85597
       file:/data/h1/dstarp2.root md5:907d10b401a35c0240cfa76bedc31420 sz:100675234 tree:h42,103053
    The dataset is registered trusting the passed information:
       $ pq2-put -o T --tree=h42 --staged h1-local
       pq2-put: 1 dataset(s) registered

ENVIRONMENT VARIABLES
See setup-pq2(1).

SEE ALSO
pq2(1), setup-pq2(1), pq2-ls(1), pq2-ls-files(1), pq2-ls-files-server(1), pq2-info-server(1), pq2-ana-dist(1), pq2-verify(1), pq2-rm(1), pq2-cache(1)

For more information on the ROOT system, please refer to http://root.cern.ch (http://root.cern.ch/)

ORIGINAL AUTHORS
Gerardo Ganis for the ROOT team.

COPYRIGHT
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

AUTHOR
This manual page was originally written by Gerardo Ganis <gerardo.ganis@cern.ch>, for ROOT version 5.