Next: Adding a New
Up: The SNO Database: SNODB
Previous: Standard Update Propagation
This is a list of tools for use by local database maintainers,
calibrators, shifters, and the average user. While low level HEPDB
routines are of course available (see the HEPDB User
Manual[2] for details), we strongly recommend against
using them without great care. Generally speaking, we would prefer to
make a new tool at users' requests rather than have people crashing
around in the database with their own HEPDB-based code.
Here are the main tools:
- process_updates (called via snodb.perl -process_updates):
Processes updates waiting in the local todo/ directory by starting the
server, waiting for the updates to be placed in the local official database,
and finally stopping the server.
- sdb_input_titles (called via
/$SNODB_VER/exes/sdb_input_titles):
Accepts as input the name of a titles file
containing data which will be used to update the database.
A description of the CERN titles format is given in Appendix D.
The following input switches may be provided on the command line:
- -f -format /format /FORMAT
A titles format bank is also input into the database.
This is the default action.
- -n -no-format /noformat /NOFORMAT
No titles format bank is input into the database.
- -i -input /input /INPUT
The next entry in the command line is the name of the
titles file to be input.
- -l -list /list /LIST
The next entry in the command line is the name of the
file containing the list of titles files to be input.
- -d -directory /directory /DIRECTORY
The next entry in the command line is the full pathname
of the directory containing the titles file(s).
If this option is omitted, then the current working
directory is used.
- sdb_output_titles (called via
/$SNODB_VER/exes/sdb_output_titles):
Accepts as input the alias of a bank
and an instant of validity and outputs a titles bank containing
the requested bank.
- -d -data /data /DATA
The output file only contains the data stored in the
bank. Thus, all comments and titles control lines are
stripped out.
- -b -bank /bank /BANK
The next two entries in the command line are the name
and number of the bank to be output.
- -v -validity-inst /validity_inst/VALIDITY_INST
The next two entries are the date (YYYYMMDD) and
time (HHMMSS) for which the output bank is valid.
- -n -no-query /noquery /NOQUERY
Turns off the query for more output titles files at
the end (the default is for the query to take place).
- sncreate (called via snodb.perl -sncreate): Creates database files based on
the contents of the hepdb.names file. If a filename found in hepdb.names
already exists in the official database directory, it is not created.
- sndirs (called via snodb.perl -sndirs): Creates the database files'
internal structure one internal
directory at a time based on command line arguments, or for mulitiple
directories residing in multiple files according to
the contents of a file, e.g.,
/$SNODB_VER/dbs_tools_f/sndirs.dat by using
-l filename, -list filename, /list
filename or /LIST filename.
A sample sndirs.dat file, containing comments which
explain what information is needed to create internal directories,
is provided in
Appendix C.
- snalia (called via snodb.perl -snalia): Creates the aliases for
database banks on bank at a time
based on command line arguments, or for mulitiple
banks residing in multiple files according to
the contents of a file, e.g.,
/$SNODB_VER/dbs_tools_f/sndirs.dat, in the same manner as
specified for sndirs above.
A sample sndirs.dat file, containing comments which
explain what information is needed to create bank aliases,
is provided in
Appendix C.
- SNOMON/sdb++, the database monitor (under development).
Here are some additional tools which will probably find less
frequent usage. These tools are under development.
- obtaining a history of a given
bank, i.e., insertion time, validity range, effective
validity range, etc. Maybe just a nice printout of all the
keys does the trick,
- obtaining a history of a given
class of banks, i.e., calibration banks,
- obtaining deltas between two
versions of a given bank,
- seeing pictorially the overall
structure of the database, or for one file in the database,
- trimming a validity range, e.g.,
to change the upper validity range for a bank from infinity to
a finite value,
- determining which banks have changed since the last
time a given analysis was performed, and to obtain a printout
of the affected time intervals,
- a subroutine which could be called repeatedly and which, on
each call, returned the keys of the next bank in the database.
This subroutine could also accept a bank name or perhaps a
2-character database abbreviation with which to limit the looping.
Next: Adding a New
Up: The SNO Database: SNODB
Previous: Standard Update Propagation