SLAC PEP-II
BABAR
SLAC<->RAL
Babar logo
HEPIC E,S & H Databases PDG HEP preprints
Organization Detector Computing Physics Documentation
Personnel Glossary Sitemap Search Hypernews
Unwrap page!
Comp. Search
Who's who?
Meetings
FAQ Homepage
Archive
Environment
Administration
New User Info.
Web Info/Tools
Monitoring
Training
Tools & Utils
Programming
C++ Standard
SRT, AFS, CVS
QA and QC
Remedy
Histogramming
Operations
PromptReco
Simulation Production
Online SW
Dataflow
Detector Control
Evt Processing
Run Control
Calibration
Databases
Offline
Workbook
Coding Standards
Simulation
Reconstruction
Prompt Reco.
BaBar Grid
Data Distribution
Beta & BetaTools
Kanga & Root
Analysis Tools
RooFit Toolkit
Data Management
Data Quality
Event display
Event Browser
Code releases
Databases
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)
Building maps to navigate down the configuration tree
George Zioulas, Yury Kolomensky
8 April 1998

To build maps in the configuration database see the following example:

Suppose you want to retrieve the object file.txt with key 1 from the OEP configuration database during a CONFIG transition with master key 1 using the path:

    Top -> Oep -> Files -> file.txt   (Oep/Files/file.txt)
To do that, you need to create the maps Oep and Files in the Oep database and a map in the Top database. If these maps already exists see below how to modify a map. The program that builds the maps for Oep is OepConfigMapBuild. The Oep BdbConfig class for storing files is OepBdbConfigFile.
  • Run OepConfigMapBuild and select 3 (Create new map in Tla database). The entries are in bold characters:
    giorgos@percheron $ OepConfigMapBuild 
    
     Map creation menu: 
    
       1 - Create new map in Top database 
       2 - Modify map in Top database 
       3 - Create new map in Tla database 
       4 - Modify map in Tla database 
       q - quit 
    3
    
    BdbConfig::BdbConfig: 
      Bootfile = /nfs/objyserv1/u3/ec/stage/objy/giorgos/test/BaBar
      Host     = percheron
      RootPath = /nfs/objyserv1/u3/ec/stage/objy/giorgos/test/online/configurations
    
  • Enter the subsystem name (Oep) and the name of the map you want to create (Files). The program lists the containers in the Tla (Oep) database.
    Enter subsystem for Map update in Tla format: Oep
    Enter name for Map: Files
    List of container names: 
    _ooDefaultContObj
    OepBdbConfigFile:file.txt
    _scratchContainer
    BdbConfigMap:Files
    
  • Next you need to fill the elements of the map. Each element points to an object. The object is identified by its container and configuration key. The container name is class name : secondary key. In this case, the container name is OepBdbConfigFile:file.txt
    Enter class name: OepBdbConfigFile
    Enter secondary key: file.txt
    Enter configuration Key: 1
    
    searching for Object...
    Found object #9-4-3-7 in container OepBdbConfigFile:file.txt:
    Object ID     : #9-4-3-7
    Type          : OepBdbConfigFile
    Config Key    : 1
    Creation Info : 
         Time        : 04/08/98 13:30:40 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Filename : file.txt
    Size     : 19
    
  • Confirm that you want to add this object to the map and give it a name. The default is the container name. Give a name that is simple and easy to remember, like the secondary key in the Oep example.
    Add this object to the map ? (y/n) y
    
    Enter name for this object (cr=OepBdbConfigFile:file.txt) file.txt
    Object file.txt added to map.
    
    New map:
    Object ID     : #9-7-3-7
    Type          : BdbConfigMap
    Config Key    : 1
    Creation Info : 
         Time        : 04/08/98 13:31:48 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Map contents : 
      file.txt -> OID = #9-4-3-7, Key = 1
    
  • Continue adding more elements to map or skip to Main menu if you are done.
    Add more objects to map ? (n=no)n
    
     Map creation menu: 
    
       1 - Create new map in Top database 
       2 - Modify map in Top database 
       3 - Create new map in Tla database 
       4 - Modify map in Tla database 
       q - quit 
    3
    
  • Create the master map in the Tla (Oep) database following the same procedure. The name of the master map should be the name of the subsystem (Oep).
    Enter subsystem for Map update in Tla format: Oep
    Enter name for Map: Oep
    List of container names: 
    _ooDefaultContObj
    OepBdbConfigFile:file.txt
    BdbConfigMap:Files
    _scratchContainer
    BdbConfigMap:Oep
    
  • This map will point to the Files map. All the map objects belong to class BdbConfigMap. Enter class, secondary key and configuration key, then confirm and name the new element.
    Enter class name: BdbConfigMap
    Enter secondary key: Files
    Enter configuration Key: 1
    
    searching for Object...
    Found object #9-7-3-7 in container BdbConfigMap:Files:
    Object ID     : #9-7-3-7
    Type          : BdbConfigMap
    Config Key    : 1
    Creation Info : 
         Time        : 04/08/98 13:31:48 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Map contents : 
      file.txt -> OID = #9-4-3-7, Key = 1
    Add this object to the map ? (y/n) y
    
    Enter name for this object (cr=BdbConfigMap:Files) Files
    Object Files added to map.
    
    New map:
    Object ID     : #9-9-3-7
    Type          : BdbConfigMap
    Config Key    : 1
    Creation Info : 
         Time        : 04/08/98 13:44:09 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Map contents : 
      Files -> OID = #9-7-3-7, Key = 1
    
    Add more objects to map ? (n=no)n
    
  • Now create the Top map in the Top database. This is the master map for the experiment. The configuration key for this map is the master key that is passed during a CONFIG transition.
     Map creation menu: 
    
       1 - Create new map in Top database 
       2 - Modify map in Top database 
       3 - Create new map in Tla database 
       4 - Modify map in Tla database 
       q - quit 
    1
    
    Making /nfs/objyserv1/u3/ec/stage/objy/giorgos/test/online/configurations/Top
    
  • Fill the elements of the Top map. Each element points to the master map of a subsystem.
    Enter subsystem name in Tla format: Oep
    Enter configuration Key for subsystem master map: 1
    
    searching for the Map...
    Found map #9-9-3-7:
    Object ID     : #9-9-3-7
    Type          : BdbConfigMap
    Config Key    : 1          <- Note the master config key number!
    Creation Info : 
         Time        : 04/08/98 13:44:09 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Map contents : 
      Files -> OID = #9-7-3-7, Key = 1
    Add this to the Top Map ? (y/n) y
    Configuration Oep added .
    
    New map:
    Object ID     : #10-4-3-7
    Type          : BdbConfigMap
    Config Key    : 1
    Creation Info : 
         Time        : 04/08/98 13:48:54 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Map contents : 
      Oep -> OID = #9-9-3-7, Key = 1
    
    Add more subsystems to Top Map ? (n=no) n
    
     Map creation menu: 
    
       1 - Create new map in Top database 
       2 - Modify map in Top database 
       3 - Create new map in Tla database 
       4 - Modify map in Tla database 
       q - quit 
    q
    
At this point, you have created the Files, Oep and Top maps. The Files map has configuration key 1 and points to the files.txt object with config. key 1. The Oep map has config. key 1 and points to the Files map with config. key 1. The Top map has configuration key (master key) 1 and points to the Oep map with config. key 1.

How to modify a map

To add a new object (new configuration) you need to modify the previously created maps to point to the new object. Let's say you want the Top map with master key 2 to point to the object file file.txt with key 2 in the Oep database.
  • Run OepConfigMapBuild and select 4 (Modify map in Tla database).
    giorgos@percheron $ OepConfigMapBuild
    
     Map creation menu: 
    
       1 - Create new map in Top database 
       2 - Modify map in Top database 
       3 - Create new map in Tla database 
       4 - Modify map in Tla database 
       q - quit 
    4
    
    BdbConfig::BdbConfig: 
      Bootfile = /nfs/objyserv1/u3/ec/stage/objy/giorgos/test/BaBar
      Host     = percheron
      RootPath = /nfs/objyserv1/u3/ec/stage/objy/giorgos/test/online/configurations
    
  • Select the subsystem (Oep) and the map name you want to mofify. Enter the configuration key of the map you want to use as template.
    Enter subsystem for Map update in Tla format: Oep
    Enter map name: Files
    Enter configuration Key: 1
    
    searching for Map...
    Map found:
    Object ID     : #9-7-3-7
    Type          : BdbConfigMap
    Config Key    : 1
    Creation Info : 
         Time        : 04/08/98 13:31:48 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Map contents : 
      file.txt -> OID = #9-4-3-7, Key = 1
    
  • Choose the modification you want to do. In this case we want to modify the element "file.txt" of map Files to point to object file.txt with configuration key 2. Note that a map with a new configuration key (2) was created.
    1 - Add new elements to map
    2 - Modify elements of map
    3 - Delete elements
    q - Quit
    Enter choice: 2
    Map elements:
    Object ID     : #9-7-3-18
    Type          : BdbConfigMap
    Config Key    : 2
    Creation Info : 
         Time        : 04/08/98 14:15:30 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Map contents : 
      file.txt -> OID = #9-4-3-7, Key = 1
    
  • Enter the name of the element you want to replace (file.txt) and then the new object you want it to point to. Note that the class name and secondary key did not change. You only need to choose the configuration key (2) of the new object.
    Enter the element to be replaced: file.txt
    Enter object to replace file.txt with
    Enter class name: OepBdbConfigFile
    Enter secondary key: file.txt
    Enter new configuration Key: 2
    
    searching for Object...
    Found object #9-4-3-15 in container OepBdbConfigFile:file.txt:
    Object ID     : #9-4-3-15
    Type          : OepBdbConfigFile
    Config Key    : 2
    Creation Info : 
         Time        : 04/08/98 13:31:00 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Filename : file.txt
    Size     : 19
    Replace file.txt with this object ? (y/n) y
    Element replaced by new object.
    New Map:
    Object ID     : #9-7-3-18
    Type          : BdbConfigMap
    Config Key    : 2
    Creation Info : 
         Time        : 04/08/98 14:15:30 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Map contents : 
      file.txt -> OID = #9-4-3-15, Key = 2
    Replace more elements? (n=no)n
    
    1 - Add new elements to map
    2 - Modify elements of map
    3 - Delete elements
    q - Quit
    Enter choice: q
    
     Map creation menu: 
    
       1 - Create new map in Top database 
       2 - Modify map in Top database 
       3 - Create new map in Tla database 
       4 - Modify map in Tla database 
       q - quit 
    4
    
  • Continue modifying the rest of the maps (Oep and Top) moving up the configuration tree.
    Enter subsystem for Map update in Tla format: Oep
    Enter map name: Oep
    Enter configuration Key: 1
    
    searching for Map...
    Map found:
    Object ID     : #9-9-3-7
    Type          : BdbConfigMap
    Config Key    : 1
    Creation Info : 
         Time        : 04/08/98 13:44:09 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Map contents : 
      Files -> OID = #9-7-3-7, Key = 1
    
    1 - Add new elements to map
    2 - Modify elements of map
    3 - Delete elements
    q - Quit
    Enter choice: 2
    Map elements:
    Object ID     : #9-9-3-18
    Type          : BdbConfigMap
    Config Key    : 2
    Creation Info : 
         Time        : 04/08/98 14:25:34 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Map contents : 
      Files -> OID = #9-7-3-7, Key = 1
    
    Enter the element to be replaced: Files
    Enter object to replace Files with
    Enter class name: BdbConfigMap
    Enter secondary key: Files
    Enter new configuration Key: 2
    
    searching for Object...
    Found object #9-7-3-18 in container BdbConfigMap:Files:
    Object ID     : #9-7-3-18
    Type          : BdbConfigMap
    Config Key    : 2
    Creation Info : 
         Time        : 04/08/98 14:15:30 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Map contents : 
      file.txt -> OID = #9-4-3-15, Key = 2
    Replace Files with this object ? (y/n) y
    Element replaced by new object.
    New Map:
    Object ID     : #9-9-3-18
    Type          : BdbConfigMap
    Config Key    : 2
    Creation Info : 
         Time        : 04/08/98 14:25:34 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Map contents : 
      Files -> OID = #9-7-3-18, Key = 2
    Replace more elements? (n=no)n
    
    1 - Add new elements to map
    2 - Modify elements of map
    3 - Delete elements
    q - Quit
    Enter choice: q
    
     Map creation menu: 
    
       1 - Create new map in Top database 
       2 - Modify map in Top database 
       3 - Create new map in Tla database 
       4 - Modify map in Tla database 
       q - quit 
    2
    
    Enter Master configuration Key: 1
    
    searching for Top Map...
    Top Map found:
    Object ID     : #10-4-3-7
    Type          : BdbConfigMap
    Config Key    : 1
    Creation Info : 
         Time        : 04/08/98 13:48:54 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Map contents : 
      Oep -> OID = #9-9-3-7, Key = 1
    
    1 - Add new elements to Top Map
    2 - Modify elements of Top Map
    3 - Delete elements
    q - Quit
    > Enter choice: 2
    Map elements:
    Object ID     : #10-4-3-18
    Type          : BdbConfigMap
    Config Key    : 2           <- Note the new master config key number!
    Creation Info : 
         Time        : 04/08/98 14:32:18 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Map contents : 
      Oep -> OID = #9-9-3-7, Key = 1
    
    Enter the element to be replaced: Oep
    Enter object to replace Oep with
    Class name: BdbConfigMap
    Secondary key: Oep
    Enter new configuration Key: 2
    
    searching for Object...
    Found object #9-9-3-18 in container BdbConfigMap:Oep:
    Object ID     : #9-9-3-18
    Type          : BdbConfigMap
    Config Key    : 2
    Creation Info : 
         Time        : 04/08/98 14:25:34 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Map contents : 
      Files -> OID = #9-7-3-18, Key = 2
    Replace Oep with this object ? (y/n) y
    Element replaced by new object.
    New Map:
    Object ID     : #10-4-3-18
    Type          : BdbConfigMap
    Config Key    : 2        
    Creation Info : 
         Time        : 04/08/98 14:32:18 GMT 0 ns
         Username    : giorgos
         Hostname    : percheron
         Description : 
    Map contents : 
      Oep -> OID = #9-9-3-18, Key = 2
    Replace more elements? (n=no)n
    
    1 - Add new elements to Top Map
    2 - Modify elements of Top Map
    3 - Delete elements
    q - Quit
    Enter choice: q
    
     Map creation menu: 
    
       1 - Create new map in Top database 
       2 - Modify map in Top database 
       3 - Create new map in Tla database 
       4 - Modify map in Tla database 
       q - quit 
    q