HOWTO use the CCDB on the JLab CUE

From GlueXWiki
Jump to: navigation, search

There are several "official" builds of the CCDB client software, which live in the following location

/group/halld/Software/builds/ccdb/

Python 2.7 is required to run the CCDB client software after version 1.0. An example .cshrc snippet that configures the environment to run this software is:

## CCDB
setenv CCDB_HOME /group/halld/Software/builds/ccdb/Linux_CentOS6-x86_64-gcc4.4.6/ccdb_1.03
if ( -e $CCDB_HOME/environment.csh ) then
  source $CCDB_HOME/environment.csh
endif
 
## python2.7
setenv PATH /apps/python/PRO/bin:$PATH
setenv LD_LIBRARY_PATH /apps/python/PRO/lib:$LD_LIBRARY_PATH

Testing should be done with an private copy of the database. There are two ways to do this:

  1. SQLite Database. Instructions on how to obtain one can be found here: SQLite-form of the CCDB database. The CCDB_CONNECTION environment variable is used to tell the client program which database to connect to. Example connection strings to access a local SQLite file or the primary database are:
    ## SQLite file
    setenv CCDB_CONNECTION sqlite:////path/to/the/sqlite.ccdb
    ## Primary MySQL DB
    setenv CCDB_CONNECTION mysql://ccdb_user@hallddb.jlab.org/ccdb
  2. Private Variation in the main MySQL database. This must be done at JLab.