How to add scripts to Start/End of run process

From PREX Wiki
Jump to: navigation, search

Scripts added

As of June 11, 2019, below scripts are now enabled for all four parity daq configurations.

  • Go:
/adaqfs/home/apar/scripts/fastEpicsLogger
/adaqfs/home/apar/scripts/halogRunStart_parity
  • End:
/adaqfs/home/apar/scripts/halogRunEnd_parity
/adaqfs/home/apar/scripts/halogRunEnd_parity/end_clean
  • fastEpicsLogger: write epics information into data
  • end_clean: kill processes, main routine includes fastEpicsLogger and caget
  • halogRunStart_parity, halogRunEnd_parity: Both scripts make HALOG entry and push run information to the parity Run Database (PVDB) at the Start and End of each run. They also have TEST mode and it's encouraged for any test and development. To do that, simply set "TESTPRINT" variable to 1 in the script. It will then just print out a halogfile.


HALOG entries:
https://logbooks.jlab.org/entry/3684410
https://logbooks.jlab.org/entry/3687071
https://logbooks.jlab.org/entry/3687308

HOW-TO

  • Bob's instruction in Hall A wiki is valid and accurate (as of May 3, 2019). First, read this.

Note: Any work here should be consulted with the DAQ experts first (Bob, Paul K, Cameron, ..)

  • Example: adding fastEpicsLogger script to start process:

Our script is located at /adaqfs/home/apar/scripts/

0. Before start editing, it would be safer to make a copy of the current msql.

   > msqldump parity > ~/pking/msql_dump/parity_<date><a-z>.sql
  (We may want to decide more general place to collect these copies later...)

1. Add scripts to msql database

   > cedit
   Go to File -> Open -> Select Run type (here we selected ALL_PREX)
   Cedit.png

   Select where you want to run your script, double click will open a window. 
   Go to scripts and add your script. To run the script in the background, add & at the end. Once done, click Ok. 
   ScriptsWindow.png
   Save and exit.

2. Make a copy of the current msql database

   (We may want to decide more general place to collect these copies later...)
   > msqldump parity > ~/pking/msql_dump/parity_<date><a-z>.sql

3. Once done with msql database, do the translation to COOL database. This has to be done every time you change the msql database for the configuration.

   In rcgui, Options -> Coda2 Database -> Select Run types. It will open DB2COOL window. Select your run type and click OK.

4. restart coda