Difference between revisions of "PVDB"

From PREX Wiki
Jump to: navigation, search
Line 2: Line 2:
  
 
Parity Run Database (also called PVDB) stores run related information using mysql. DB is running on cdaqdb1 (alias of cdaqfs1) and mirrored over to hallcdb (read-only
 
Parity Run Database (also called PVDB) stores run related information using mysql. DB is running on cdaqdb1 (alias of cdaqfs1) and mirrored over to hallcdb (read-only
slave of the cdaqdb1 master). There are a-rcdb and c-rcdb for Hall A and Hall C, respectively. It utilizes existing rcdb framework that has been developed and used for Hall D. While we keep the default conditions from the rcdb, we also added some parity conditions such as helicity and spin rotator information. For questions, please contact sanghwa@jlab.org.
+
slave of the cdaqdb1 master). There are a-rcdb and c-rcdb for Hall A and Hall C, respectively. It utilizes existing rcdb framework that has been developed and used for Hall D. While we keep the same schema from the rcdb, we added some parity conditions such as helicity and spin rotator information. For questions, please contact sanghwa@jlab.org.
  
 
= General information =  
 
= General information =  
 +
* Hall A rcdb home page: (accessible on-site and off-site)
 
* PVDB git repository: https://github.com/JeffersonLab/pvdb
 
* PVDB git repository: https://github.com/JeffersonLab/pvdb
 
* RCDB git repository: https://github.com/JeffersonLab/rcdb
 
* RCDB git repository: https://github.com/JeffersonLab/rcdb
  
DB information is filled at the Start/End of a run and after the prompt analysis. For adaq machines, the connection string is set to:<br>
+
Run information is filled at the Start/End of each run as well as after the prompt analysis. For adaq machines, the connection string is set to:<br>
 
RCDB_CONNECTION: mysql://apcoda@cdaqdb1.jlab.org:3306/a-rcdb
 
RCDB_CONNECTION: mysql://apcoda@cdaqdb1.jlab.org:3306/a-rcdb
  
Line 25: Line 26:
 
Deployment log:
 
Deployment log:
 
* May 2019:
 
* May 2019:
pvdb successfully tested with the parity DAQ. The wrapper scripts are integrated into halogRunStart_parity and halogRunEnd_parity.
+
- pvdb successfully tested with the parity DAQ. The wrapper scripts are integrated into halogRunStart_parity and halogRunEnd_parity.
  
Modified login script to set the environment variables for the connection string and pvdb home on adaq machines.
+
- Modified login script to set the environment variables for the connection string and pvdb home on adaq machines.
  
 
* June 10, 2019
 
* June 10, 2019
After the transition from hcrcdb to cdaqdb1, we set up the database again.
+
- After the transition from hcrcdb to cdaqdb1, we set up the database again. New the database name is a-rcdb.
  
 
Login as root: (if you don’t know the password and you think you have a reason why you need it, contact [mailto:sanghwa@jlab.org Sanghwa Park], [mailto:brads@jlab.org Brad Sawatzky].
 
Login as root: (if you don’t know the password and you think you have a reason why you need it, contact [mailto:sanghwa@jlab.org Sanghwa Park], [mailto:brads@jlab.org Brad Sawatzky].
Line 36: Line 37:
 
DB user ‘pvdb’ created accessible from jlab subnet and granted all previlieges on a-rcdb:
 
DB user ‘pvdb’ created accessible from jlab subnet and granted all previlieges on a-rcdb:
  
> GRANT ALL PRIVILEGES ON `a-rcdb`.* TO ‘pvdb’@’%.jlab.org’;
+
> GRANT ALL PRIVILEGES ON `a-rcdb`.* TO ‘pvdb’@’%.jlab.org’;
> SHOW GRANT for pvdb@’%.jlab.org’;
+
> SHOW GRANTS for pvdb@’%.jlab.org’;
  
adaq user account already exists. Granted ALL privileges on a-rcdb.
+
- adaq user account already exists (apcoda - no pw, apar - pw required). Granted ALL privileges on a-rcdb.
 
 
DB structure created:
+
- DB structure created:
 
   1) Use get_started.py
 
   1) Use get_started.py
 
   To create both default rcdb condition types and parity default types (defined in parity_rcdb)
 
   To create both default rcdb condition types and parity default types (defined in parity_rcdb)
Line 54: Line 55:
 
   ConditionType created with name='my_value', type='string', is_many_per_run='False
 
   ConditionType created with name='my_value', type='string', is_many_per_run='False
  
 +
- Added condition type "experiment"
  
  
 
----
 
----
 
back to [[Weekly Analysis Coordinator | WAC]]
 
back to [[Weekly Analysis Coordinator | WAC]]

Revision as of 16:34, 10 June 2019

PREX Main >> Weekly Analysis Coordinator

Parity Run Database (also called PVDB) stores run related information using mysql. DB is running on cdaqdb1 (alias of cdaqfs1) and mirrored over to hallcdb (read-only slave of the cdaqdb1 master). There are a-rcdb and c-rcdb for Hall A and Hall C, respectively. It utilizes existing rcdb framework that has been developed and used for Hall D. While we keep the same schema from the rcdb, we added some parity conditions such as helicity and spin rotator information. For questions, please contact sanghwa@jlab.org.

General information

Run information is filled at the Start/End of each run as well as after the prompt analysis. For adaq machines, the connection string is set to:
RCDB_CONNECTION: mysql://apcoda@cdaqdb1.jlab.org:3306/a-rcdb

A wrapper script is located at:
~adaq/scripts/addRunStart2pvdb
~adaq/scripts/addRunEnd2pvdb

  • Scripts that are executed at the Start/End of a run:

Instruction for analyzers

  • How to read from the DB:
  • How to add/modify comments to the DB:

Expert tool

Deployment log:

  • May 2019:

- pvdb successfully tested with the parity DAQ. The wrapper scripts are integrated into halogRunStart_parity and halogRunEnd_parity.

- Modified login script to set the environment variables for the connection string and pvdb home on adaq machines.

  • June 10, 2019

- After the transition from hcrcdb to cdaqdb1, we set up the database again. New the database name is a-rcdb.

Login as root: (if you don’t know the password and you think you have a reason why you need it, contact Sanghwa Park, Brad Sawatzky.

DB user ‘pvdb’ created accessible from jlab subnet and granted all previlieges on a-rcdb:

> GRANT ALL PRIVILEGES ON `a-rcdb`.* TO ‘pvdb’@’%.jlab.org’;
> SHOW GRANTS for pvdb@’%.jlab.org’;

- adaq user account already exists (apcoda - no pw, apar - pw required). Granted ALL privileges on a-rcdb.

- DB structure created:

 1) Use get_started.py
 To create both default rcdb condition types and parity default types (defined in parity_rcdb)
 > python get_started.py
 Check with rcnd command:
 > rcnd (should print conditions)
 2) To add new conditon types:
 Use add_condition_type.py
 Using CLI (rcnd):
 >rcnd --create my_value --type string --description "This is my value"
 ConditionType created with name='my_value', type='string', is_many_per_run='False

- Added condition type "experiment"



back to WAC