DAQ Expert -- Ending a Run a posteriori
If a physics run ends abormally, and the RunControl does not
go through the END, ABORT, or RESET transitions after data taking
has ceased, then you may have to set the end of run by hand in
the Run Database. Here are some instructions on how to do this:
Check the RunSummary page for the run of interest; e.g. the link
for run is at:
Make sure the TerminateTime is really null before proceeding
Click on the
link for the given run to see the RunControl log file
Search the log file to find a sensible termination time. Search for
the string "Run Number:" to find the first reference to a runNumber;
search for the string "Transition:" for the
first reference to a given transition with a run; make sure the termination
time chosen is before the next run begins. Often a logical time
to choose is the last one in the file, if RunControl were terminated
The exact time of the termination is not important!
Update the database with the termination time:
UPDATE RUNCONFIGURATIONS SET TERMINATETIME=
TO_DATE('2005.06.07 06:09:02','YYYY.MM.DD HH24:MI:SS') WHERE RUNNUMBER=199060;
Don't forget the WHERE clause! Use the rundb_admin account for these updates.
The above update will trigger and and end-of-run email to the Shiftcrew
e-log and to the email@example.com mailing list; ShiftCrew are often
alarmed at this, so make an entry in the e-log saying what you did.
Chances are that the end-of-run comment box was also not filled
out in the run -- check the "ANA" or "SHIFTCREW_STATUS" bit to see
if it is set for the run.
If not, enter the SQL update:
UPDATE RUN_STATUS SET SHIFTCREW_STATUS=1 WHERE RUNNUMBER=199060;
Don't forget the WHERE clause! And a shiftcrew e-log entry would
Now check the Store summary page to make sure the luminosity for
those runs is included in the total:
To see the individual run luminosities, click on the store number
check box (on the left) and then press the "GoodRunSummary" button; compare
the luminosity there and on the TevStore page.
To include the run's live luminosity in the store totals, issue
the SQL command:
UPDATE STORE_SUMMARY SET B0INTEGRATEDLIVELUMI=B0INTEGRATEDLIVELUMI+
(SELECT B0INTEGRATEDLIVELUMI FROM RUNCONFIGURATIONS WHERE
RUNNUMBER=199060) WHERE TEVSTORE=4195;
Note the tricky "nested" SQL statement and also that the B0INTEGRATEDLIVELUMI
column is being incremented.
When issuing SQL UPDATEs always watch for the
"1 row udpated" notification; if there are more than one row,
you probably have a mistake in your WHERE clause. In this
case, do not COMMIT, but type:
to undo the changes. Once COMMIT is issued, the change is permanent.