Difference between revisions of "Specifying Alternate Versions of Calibration Constants in JANA"

From GlueXWiki
Jump to: navigation, search
(add web reference to legal DATETIME values)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
From Dmitry Romanov:
 
 
 
To specify an alternate version of calibration constants from CCDB, use the JANA_CONTEXT environment variable.
 
To specify an alternate version of calibration constants from CCDB, use the JANA_CONTEXT environment variable.
 
The value of JANA_CONTEXT is passed to CCDB as a text string. The string may contain
 
The value of JANA_CONTEXT is passed to CCDB as a text string. The string may contain
 
* variation=<variation_name>
 
* variation=<variation_name>
* calibtime=<time>
+
* calibtime=&lt;time&gt;
  
 
Examples:
 
Examples:
  
  JANA_CONTEXT="variation=john"
+
  JANA_CALIB_CONTEXT="variation=john"
 +
 
 +
JANA_CALIB_CONTEXT="calibtime=2014-05"
  
  JANA_CONTEXT="calibtime=2014-05"
+
  JANA_CALIB_CONTEXT="variation=john calibtime=2014-05"
  
JANA_CONTEXT="variation=john calibtime=2014-05"
+
There are many legal forms of the time; any [http://dev.mysql.com/doc/refman/5.7/en/date-and-time-literals.html acceptable definition of the MySQL DATETIME type] can be used.
  
JANA_CONTEXT can also be set as a command-line option to JANA, for example
+
JANA_CALIB_CONTEXT can also be set as a command-line option to JANA, for example
  
 
  ???
 
  ???

Latest revision as of 20:38, 14 December 2016

To specify an alternate version of calibration constants from CCDB, use the JANA_CONTEXT environment variable. The value of JANA_CONTEXT is passed to CCDB as a text string. The string may contain

  • variation=<variation_name>
  • calibtime=<time>

Examples:

JANA_CALIB_CONTEXT="variation=john"
JANA_CALIB_CONTEXT="calibtime=2014-05"
JANA_CALIB_CONTEXT="variation=john calibtime=2014-05"

There are many legal forms of the time; any acceptable definition of the MySQL DATETIME type can be used.

JANA_CALIB_CONTEXT can also be set as a command-line option to JANA, for example

???

Alternate versions can also be specified directly in C++ as an argument to the GetCalib function. The argument is a string of the form </path/to/data>:<run>:<variation>:

loop->GetCalib("FDC/params:::2014-05", containerObject);

rather than the usual

loop->GetCalib("FDC/params", containerObject);