Online Calibration and Alignment scheme

The following picture shows the current scheme for the online distribution of the calibration & alignment and detector configuration constants to the trigger (SLT) and online reconstruction farms (4LT).

A more detailed picture:

Brief description of the scheme:

    At startup (in the SMC transition from INITIALIZED to CONFIGURED), the formatted table consumers (SLPs, FLT processes) send a message to the CNA manager informing about the tables consumed by them (formatted tables). The message include the formatter name in the nameserver and the formatted table name. Those messages are forwarded by the CNA manager to the appropriate formatters. The formatters subscribe in the CNA manager for raw tables updates (those tables stored in the subdetector databases needed to build up the formatted tables).

      The CNA manager subscribes in the keytable database for keytable updates. The keytable contains the names, versions and database server names of all the CNA raw tables .  The version of the keytable (major number) is called the "key" of the set of CNA tables in use online. This key is written in all the events.
The key database is subscribed in the subdetector databases for updates of the CNA raw tables. Every time a CNA table is updated, the key database gets informed and a new version of the keytable is produced.  Then, the CNA manager is informed of the update by the key database. Every time the CNA manager gets a new key, the distribution process of the updated table(s) is triggered:

    The new version(s) of the updated raw table(s) is published to the formatters. The formatters get the appropriate raw table(s) from the subdetector databases to produce updated formatted table(s). Once all the updated formatted tables are ready to be distributed, the CNA manager contacts the EVC to pause the run and tell the SLPs to delete the events in their buffers. Then, it sends to the formatted table consumers (to the SLPs via the distributor) the message "begin of distribution".  This message contains the new CNA key. The CNA manager asks the formatters to distribute sequencially the updated formatted tables and finally sends to the EVC the message "end of update" to resume the event processing.

    The 4LPs looking at the key in the event record will figure out when a new key has arrived. In this case, they request to the cache db the key-table to figure out which tables have changed with respect to the tables in use. They will request the updated tables to the cache db.

    At the beginning of the run all the calibration and alignment tables used by the consumes are distributed. The geometry constants and other configuration detector constants are distributed as well.