X-mode Calibrations and Consumers
 
 last updated 2/8/2001 by Jack Cranshaw (cranshaw@fnal.gov)

Code support by Bill Orejudos (orejudos@fnal.gov)

 
Definition: X-mode calibrations are calibrations where the data is collected and analyzed in the crate. The results of the analysis are then shipped up through the DAQ as a C-bank or set of C-banks constituting one event which are received by a consumer and written to the database. The term 'X-mode' is a relic of Run 1 where calibrations were done in a similar mode and the results were shipped up in banks ending in X.

Data Path: There are two paths which the C-banks can follow and shown in the DAQ Data flow and format diagram .

The current rule of thumb is that D-mode calibrations use the hardware event builder while X-mode calibrations use the software event builder. Both event builder routes feed the data to the consumer-server-logger which passes them to the consumers.

Bank Access: The consumers access the banks as EDM2 objects. The input module handles any needed conversions.

Bank Definition: Not all C-banks have been defined. The procedure is to contact David Dagenhart (wdd@cdfsga.fnal.gov) and give him a Latex description of the data format and channel identifiers. Helpful information is at  Dave's 4152 page . All new banks will be defined as Storable Banks only. The Banks package is being phased out. Here is the  schedule of implementation .

CalibConsumer Modules: X-mode consumers are part of the CalibConsumer package in the Run2 CVS repository. They are responsible for unpacking the C-banks and putting the information into the calibration database. No histogramming is done in the consumer. Analysis is done directly on the database using DBANA. Propagation of error conditions will be done using the same mechanism as other consumers.

Since this procedure is the same for all X-mode calibrations involving C-banks, a standardization has been done using an intermediate class. AC++ modules all inherit from AppModule. All CalibConsumer modules inherit from CalibModule which handles all the tasks which are common to X-mode calibrations. CalibModule then inherits from AppModule, so that any CalibConsumer module can be included as a module in an AC++ executable.

As of 5/4/00 there are two X-mode CalibConsumer executables with one module each.

Writing CalibConsumer Modules: As stated above, the X-mode consumer code is in the CalibConsumer package in the run2 CVS repository. It follows the general conventions for package definition. Header files with class definitions are in the packagename/packagename directory, e.g. CalibConsumer/CalibConsumer. Code for binaries is in the CalibConsumer/src directory. The X-mode modules are in the CalibConsumer/mods directory and they are compiled into a library libCalibConsumer.a. For outdated documentation look in CalibConsumer/doc. Below is a description of the steps one would take to create a new CalibConsumer executable. Each consumer should have a person responsible for committing changes to CVS.

Create a test release and check out the CalibConsumer package. Take CttCalibConsumer as an example.