Control Room

Under:
We use a crontab on emc01.starp.bnl.gov to update the trigger database tables as well as the "offline" pedestals throughout the run.  Here's the relevant portion of /etc/crontab:

00 4 * * * emc /home/emc/online/emc/pedestal/job

00 * * * * emc /home/emc/online/emc/trigger/job
10 * * * * emc /home/emc/online/emc/trigger/job
20 * * * * emc /home/emc/online/emc/trigger/job
30 * * * * emc /home/emc/online/emc/trigger/job
40 * * * * emc /home/emc/online/emc/trigger/job
50 * * * * emc /home/emc/online/emc/trigger/job


Pedestal Job

The job runs every day at 4:00 AM and executes the script

$EMCONLINE/pedestal/updateOnlinePed 

which in turn calls the root4star macro

$EMCONLINE/pedestal/makeOnlinePed.C

This macro calculates pedestals for all 4 subdetectors and uploads the tables to the STAR database.  A local backup copy of each table is stored in

$EMCONLINE/pedestal/tables/tables/


Trigger Job

The job runs $EMCONLINE/trigger/updateTriggerDB every ten minutes.  If the file $EMCONLINE/trigger/RUNMODE contains STOP, the job will do nothing.  $EMCONLINE/trigger/startTriggerDB and $EMCONLINE/trigger/stopTriggerDB can be used to change the content of RUNMODE.  The updateTriggerDB shell script contains some decent documentation which I've reproduced here:

# this script checks if ANY of the BEMC trigger
# configuration had changed. If so, it updated the
# database with the new trigger configuration
#
# it runs as a cronjob every 5-10 minutes in the star01
# machine
#
# this script follows the steps bellow
#
# 1. check the file RUNMODE. If content is STOP, exit the
# program. This is done if, for some reason, we
# want to stop the script from updating the DB
#
# 2. SCP the config_crate* and pedestal_crate* files
# from sc3.starp.bnl.gov machine
#
# 3. SCP the trigegr masks from startrg2.starp.bnl.gov machine
#
# 4. Copy these files to the sc3 and startrg2 directories
#
# 5. Compare these files to the files saved in the sc3.saved
# and startrg2.saved directories
#
# 6. If there is no difference, clear the sc3 and startrg2
# directories and exit
#
# 7. If ANY difference was found, copy the contents of the
# sc3 and startrg2 directories to sc3.saved and startrg2.saved
# Also saves the directory with timestamped names in the
# backup directory
#
# 8. runs the root4star macro that create the tables from
# the files in those directories and save them to the DB
# It also creates plain text file bemcStatus.txt with the same information
# for the trigger people and Pplots
#
# 9. clear the sc3 and startrg2 directories and exit
#
# you can also run it by hand with the command
#
# updateTriggerDB TIMESTAMP FORCE
#
# where TIMESTAMP is on the format
#
# YYYYMMDD.hhmmss
#
# if FORCE = yes we force saving the DB
#
# this procedure overwrites the RUNMODE variable
#
# AAPSUAIDE, 12/2004
#

Basically the job is always checking for changes to the trigger pedestals, status tables, and LUTs and uploaded a new table if any changes are found.