Difference between revisions of "How to Add Constants"

From GlueXWiki
Jump to: navigation, search
(Created page with "__TOC__ ==General Issues==")
 
Line 2: Line 2:
  
 
==General Issues==
 
==General Issues==
 +
 +
The calibration constant database used by GlueX is the [[Calibration Database | CCDB]] software package.  The CCDB provides a feature-rich package for managing calibration constants, . Two different database backends are supported.  The master database is stored in a MySQL database, which is accessible both inside and outside JLab.  Standalone SQLite files are also supported for a variety of uses, including testing and running on batch farms.  Directions for managing SQLite files can be found here.
 +
 +
To run the CCDB program with a standalone SQLite DB, the CCDB_CONNECTION environmental variable should be set like this: (Note: csh syntax is used in this page)
 +
<syntaxhighlight>
 +
setenv CCDB_CONNECTION sqlite:////path/to/sqlite.ccdb
 +
</syntaxhighlight>
 +
To connect to the main MySQL database, set CCDB_CONNECTION like:
 +
<syntaxhighlight>
 +
setenv CCDB_CONNECTION mysql://ccdb_user@hallddb.jlab.org/ccdb
 +
</syntaxhighlight>
 +
 +
The creation of database tables is the beyond the scope of this page.  For now, the best documentation is the excellent online help, which can be seen with the command "ccdb help mktbl".  Please exercise caution since by design CCDB tables should not be deleted, and make such changes in consultation with the Calibration and Software Coordinators.
 +
 +
==Adding Constants==
 +
 +
<syntaxhighlight>
 +
ccdb add /FCAL/gains new_gains_file
 +
</syntaxhighlight>
 +
 +
==Digi-level Constants==

Revision as of 21:59, 27 July 2014

General Issues

The calibration constant database used by GlueX is the CCDB software package. The CCDB provides a feature-rich package for managing calibration constants, . Two different database backends are supported. The master database is stored in a MySQL database, which is accessible both inside and outside JLab. Standalone SQLite files are also supported for a variety of uses, including testing and running on batch farms. Directions for managing SQLite files can be found here.

To run the CCDB program with a standalone SQLite DB, the CCDB_CONNECTION environmental variable should be set like this: (Note: csh syntax is used in this page)

setenv CCDB_CONNECTION sqlite:////path/to/sqlite.ccdb

To connect to the main MySQL database, set CCDB_CONNECTION like:

setenv CCDB_CONNECTION mysql://ccdb_user@hallddb.jlab.org/ccdb

The creation of database tables is the beyond the scope of this page. For now, the best documentation is the excellent online help, which can be seen with the command "ccdb help mktbl". Please exercise caution since by design CCDB tables should not be deleted, and make such changes in consultation with the Calibration and Software Coordinators.

Adding Constants

ccdb add /FCAL/gains new_gains_file

Digi-level Constants