Other sop/tables/CalibPmtFineGain

Table Of Contents

Previous topic

Table Specific Instructions

Next topic

DB Table Writing

This Page

Daya Bay Links

Content Skeleton


The source of this section is dybgaudi:Documentation/OfflineUserManual/tex/sop/tables/CalibPmtFineGain.rst

Below sub-sections outline steps required to prepare, verify and perform updates of the CalibPmtFineGain table.

Environment setup

Have nuwa environment setup.:

cd $ROLLINGGAINROOT/aileron  ##  or equivalent dir with RollingGain/aileron checkout where you have write permission.
svn update                   ##  ( Make backup if necessary )

Make temporary copy of offline_db

Prepare a tmp_offline_db copy of offline_db:

db.py offline_db dump offline_db.sql
db.py tmp_offline_db load offline_db.sql

Prepare dybaux svn checkout:

setenv CSVCAT http://dayabay.ihep.ac.cn/svn/dybaux/catalog
svn co $CSVCAT/tmp_offline_db tmp_offline_db

Verify that the contents of tmp_offline_db matches the dybaux checkout:

db.py tmp_offline_db rdumpcat tmp_offline_db/
svn diff tmp_offline_db/


No difference should be observed.

Validation and uploading to tmp_offline_db

Modify objLocations in ScanFrames.py to have the data table list

Before uploading to tmp_offline_db validation

The first round is to generate channel plots for validation. In ScanFrames.py set:

  1. runMode to ErrorCheck
  2. PsOutput to True
nuwa.py --dbconf tmp_offline_db -m ScanFrames

Look through the generated frames.ps

Perform tmp_offline_db uploading

Again in ScanFrames.py set:

  1. runMode to DbCommit
  2. PsOutput to False
nuwa.py --dbconf tmp_offline_db -m ScanFrames

Valdation after uploading to tmp_offline_db

cd $ROLLINGGAINROOT/tests     ##  or an equivalent dir with RollingGain/tests checkout where you have write permission.
svn update
setenv DBCONF tmp_offline_db
nosetests -v test_RG.py

NB. this step must be done within half a day of the database uploading.


No failure is allowed.

Commit to dybaux SVN

Write out the DB as CSV files into the catalog working copy:

db.py tmp_offline_db rdumpcat tmp_offline_db/
cd tmp_offline_db/
svn status

Prepare annotation for the update

Edit and commit dybgaudi:Calibration/DBUpdate/UPDATES.txt Remember the revision number and use it in the commit message:

svn ci tmp_offline_db -m "dybsvn:source:dybgaudi/trunk/Calibration/DBUpdate/UPDATES.txt@15615"