This page will teach you how to use the emcDB program to write calibration data ASCII files into the PHENIX EMCAL Objectivity databases.
Disclaimer: the emcDB program is only a convenient tool to update/dump the EMCAL databases. It is not a bullet-proof program ! It can for sure be improved. If you have special requests, do not hesitate to contact me (aphecetc@in2p3.fr).
So far, we have 16 EMCAL calibration databases, corresponding to 8 calibration data "flavours" (there are 2 DBs per flavour : one tag-DB and one data-DB). The database names are of the form : calib.emc.XYZ.pdb, where X is the data flavour :
Y is Tag (for Tag-DB) or Cal (for data-DB), and Z is a sequence number (0000 for the moment).
In the following, databases are referred to by the flavour name (e.g. Gains).
You must set the OO_FD_BOOT environment variable to the PHENIX Federation boot file :
setenv OO_FD_BOOT ${PHENIX_FD_BOOT}
You can get the syntax by doing:
> emcDB --help emcDB --dump [db full name] Dump DB on screen. --bankID [int] (use with --dump only) Specify a bankID to look for --update [directory name] Read all calibration data files in the directory and write them into DB. --forceDate "year,month,day,hour,minute,second]" used with --update : specify the start-of-validity of all the data to be read from file and written into DB. --batch Non-interactive mode. Nothing asked to the user. --help This message. Examples: emcDB --dump calib.emc.Gains emcDB --update /afs/rhic/phenix/phnxemc/EMC/m_080701/ToF --forceDate "2001,08,01,12,45,00" emcDB --help
Use the following syntax :
emcDB --dump calib.emc.[flavourName]where flavourName is one of Gains, Pedestals, Pedestals5 (for the RunII pedestals), QAs, LCTofs, WalkTofs, TofT0s. Note that flavours are case-sensitive.
The general syntax is :
emcDB --update directory
where directory is the path to the calibration data files. Please note that official ASCII calibration files are usually to be found somewhere under /afs/rhic/phenix/phnxemc.
The above command will read all calibration files to be found under directory and will put them into the relevant database.
Special note on pedestals : depending on the number of pedestal-calibration files for one FEM (3 or 5), a different database will be filled (calib.emc.Pedestals or calib.emc.Pedestals5). It should be automatic.
31-Aug-2001 Due to a possible problem in PHTimeStamp::operator >> , please always use the --forceDate option (see below), as the timestamp specified in the ASCII files themselves is currently not properly read out.
The ToF directory usually contains 3 calibration flavours : the walk corrections, least-count, and t0-drift ones. If you'd like to update only one of them, here's the procedure to follow :
cp /yourplace/ToF/*WALK* somewhere/ToF
emcDB --forceDate "year,month,day,hour,minute,second" --update somewhere/ToF
Usually, start-of-validity dates for the calibration data are fetch from the ASCII files themselves. If you want to override those, use the --forceDate option of the emcDB program. It takes a date string, in a format which is the one of the PHTimeStamp constructor :
> emcDB --forceDate "2001,08,01,12,45,00" --update /afs/rhic/phenix/phnxemc/EMC/m_080701