How to freeze cond22boot


[ BaBar-Conditions ]

Cond22boot was created as a mirror of the MASTER which means that all the constants that were loaded to the MASTER will also be seen in cond22boot. However, new constants for the 24-series are loaded to the MASTER and must not be used by an analysis based on a 22-series release. Therefore, cond22boot has been modified (or frozen) by changing its identity. It's local-name has been changed from master-core to analysis22-core.

The local-name of a federation is the value of FDB_LOCAL_NAME used at the time a federation was created. This name is stored in a special data structure inside the federation. It is used by CDB to identify it self. The view on the conditions provided by a federation depends on its local-name. This feature has been used to freeze cond22boot. The local-name can be changed after a federation has been created, and therefore there are two possibilities to freeze cond22boot, either create a new one with the correct local-name or change the local-name of an existing fdb.

Will cond22boot be updated in the future? So far there are no plans to update cond22boot. However, it is possible to load new constants into the MASTER, but they have to be made visible by updating the view for cond22boot. Is it safe to update cond22boot? Yes, as long as the federation has been frozen as described in this document. The update will be very simple. All that has to be done is to load a new official CDB snapshot even if this snapshot contains new constants that must not be used in cond22boot.

There are two possibilities to create a cond22boot federation.
  1. Reinstall a new federation from scratch.
  2. Modify an existing cond22boot federation.

Reinstall a new federation from scratch

  1. Prepare a .bbobjy file with the following line (in addition to whatever other parameters you put into):
    FDB_LOCAL_NAME=analysis22-core
  2. Make sure that your local installation of the BABAR software has the most recent version (dated by December, 2007) of the following file:
    $BFROOT/Bdb/Production/global/export/global.bdb
    If not then make a copy of this file from the same location at SLAC. BTW, at SLAC BFROOT translates into:
    /afs/slac.stanford.edu/g/babar/

  3. Proceed with the normal database creation and initialization procedure, namely:
      % gmake database.import
      % gmake database.load SNAPSHOT_DIR=<most_recent_snapshot_dir>
      
    A full snapshot is found at:
    /nfs/objyserv03/objy/databases/snapshots/master/full/current
    The snapshot has to be taken after (cat snapshotDate in snapshot directory) 20071121.
  4. Verify the quality of the installation by running the following test, which must produce exactly the same result as shown below (if you get a more recent snapshot the view might have changed.) :
      % CdbBrowser views | grep DEFAULT
       NAME="ANALYSIS22::End_of_Run6"  ID=269::1  STATUS=FROZEN,DEFAULT
      (if cond22boot gets updated the view will change so the name
       shown here might be out of date.) 
      

Modify an existing cond22boot

In this case cond22boot already exists, but it is still a mirror of the master (local name = master-core). The second scenario doesn't require to reinstall the federation from scratch, but it requires some little manipulation of the federation. Here is how this can be done:
  1. Make sure nobody is accessing the federation.
  2. Refresh a database installation from the most recent snapshot of the MASTER.

    Note, that at this point your CDB will turn into COND22BOOT like CDB, unless you complete two remaining steps explained below.

    The latest CDB snapshot is found currently in

    /nfs/objyserv03/objy/databases/snapshot2/master/analysis/current

  3. Update the "global.bdb" (by substituting the file image with its more recent version) of your CDB federation from the following source at SLAC:
    /afs/slac.stanford.edu/g/babar/Bdb/Production/global/export/global.bdb
    You can check that the right dbid's are allocated running:
        % allocateDbId
        .......
        Allocation for "analysis22-core" is [5976, 5991].
        .......
      
    You have to see the line about analysis22-core.
  4. Turn your CDB from being a cond22boot back into cond22boot by:
    % BdbSetupLocalDb "analysis22-core"
    to test if the local name was changed run:
      % manageDbId -e
      Using the "evs" domain.
    
      Federation Local Name is: analysis22-core
      Total number DbIds allocated: 16
      Number of DbIds used: 0
      Percentage of DbIds used: 0%
      
    and
      % CdbBrowser local_origin
      "ANALYSIS22" (ID=269)
      
  5. Verify the quality of the installation by running the following test, which must produce exactly the same result as shown below:
      % CdbBrowser views | grep DEFAULT
       NAME="ANALYSIS22::End_of_Run6"  ID=269::1  STATUS=FROZEN,DEFAULT
      (if cond22boot gets updated the view will change so the name
       shown here might be out of date.) 
      

Last modified: Mon Nov 26 07:24:46 PST 2007