TDataSet *DB = GetInputDB("Calibrations/emc/trigger");
St_emcTriggerStatus *table = (St_emcTriggerStatus*) DB->Find("bemcTriggerStatus");
emcTriggerStatus_st *struct = table->GetTable();
/*
*
* Table: emcCalib
*
* description: //: Table which contains the trigger masks
*/
struct emcTriggerStatus
{
octet PatchStatus[300]; // Patch sum masks. the index is the patch number
octet HighTowerStatus[300]; // High tower masks. the index is the patch number
octet TowerStatus[30][160]; // Single masks. the indexex are the crate number and position in crate
};
/*
*
* Table: emcTriggerPed
*
* description: * //: Table which contains pedestal information and 6 bits conversion used in trigger
*/
struct emcTriggerPed
{
unsigned long PedShift; // pedestal shift
unsigned long BitConversionMode[30][10]; // 6 bits conversion mode. the indexex are the crate number and position in crate
unsigned long Ped[30][160]; // pedestal value. the indexex are the crate number and position in crate
};
/*
*
* Table: emcTriggerLUT
*
* description: * //: Table which contains each patch LUT information
*/
struct emcTriggerLUT
{
unsigned long FormulaTag[30][10]; // formula tag for each [crate][patch]
unsigned long FormulaParameter0[30][10]; // Parameter 0 for the LUT formula in [crate][patch]
unsigned long FormulaParameter1[30][10]; // Parameter 1 for the LUT formula in [crate][patch]
unsigned long FormulaParameter2[30][10]; // Parameter 2 for the LUT formula in [crate][patch]
unsigned long FormulaParameter3[30][10]; // Parameter 3 for the LUT formula in [crate][patch]
unsigned long FormulaParameter4[30][10]; // Parameter 4 for the LUT formula in [crate][patch]
unsigned long FormulaParameter5[30][10]; // Parameter 5 for the LUT formula in [crate][patch]
};
During data taking the BEMC trigger information is monitored, and changes in the configuration (new pedestals, masks, etc.) are recorded. The code relevant to this online trigger monitoring was developed by Oleksandr, and is checked into CVS here (usage instructions in the README file). The scripts execute via a cronjob on the online machines on the starp network. In particular, there exists directories with results from previous years at /ldaphome/onlmon/bemctrgdb20XX/ on onl08.starp.bnl.gov.
The final location for this information is in the offline DB, and the definitions for the tables are given here. These DB tables are used by the StBemcTriggerSimu in the StTriggerUtilities package to replicate the BEMC trigger conditions for a particular timestamp.
The DB tables can be uploaded while taking data or stored in ROOT files to be uploaded after data taking is complete. To upload all the tables stored in ROOT files during data taking only a simple script is needed employing StBemcTablesWriter to read in a list of files and upload their information to the DB. This script (uploadToDB.C) is checked into the macros directory of in CVS here.