To get the most recent code for the Configuration database, you need the following:
Create a test release based on 6.7.2
Make sure your BFARCH environment variable has no suffix (-native or -native-Objy)
Create a file in your release directory called .bbobjy. It should normally contain one line:
FD_NUMBER = your-FDDB-number
where your-FDDB-number is in the range returned by command GetFDID on SLAC computers (this command was recently added, don't forget to type rehash if you logged in a long time ago).
Add the following packages:
addpkg BdbConfig V00-02-04
addpkg BdbConfigTests V00-02-02
You may also find this package useful (as a reference):
addpkg OepConfig V00-02-02
Set OO_FD_BOOT environment variable. At SLAC, it should point to /nfs/objyserv1/u3/ec/stage/objy/${USER}/BaBar
Now you can make a new FDDB file and the rest of the release:
gmake
Upon (successful) completion, run the test executables:
bin/${BFARCH}/BdbConfigWriteTest
and follow the prompts. You should get the output that looks like the following:
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
Object #11-4-3-14 generated with key 2 in container BdbConfigSampleObject:Default
Enter events to skip in ascending order, 0 to exit:
Event ? 7
Event ? 10
Event ? 80
Event ? 0
You have to build the Configuration tree maps, by running BdbConfigMapBuild, before you run the read application. See How to build the maps for an example that builds the Oep
configuration tree and the Top database. The following example assumes that the Top database already exists. It creates the Bdb map in the Bdb configuration database with an element that points to the previously created object (#11-4-3-14) and modifies
the Top map to add an element that points to Bdb map. The new Top map has master config key 3 because two other maps with keys 1 and 2 were already in the Top database.
The entries are in bold type.
$ BdbConfigMapBuild
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 subsystem for Map update in Tla format: Bdb
Enter name for Map: Bdb
List of container names:
_ooDefaultContObj
BdbConfigSampleObject:Default
_scratchContainer
BdbConfigMap:Bdb
Enter class name: BdbConfigSampleObject
Enter secondary key: Default
Enter configuration Key: 2
searching for Object...
Found object #11-4-3-14 in container BdbConfigSampleObject:Default:
Object ID : #11-4-3-14
Type : BdbConfigSampleObject
Config Key : 2
Creation Info :
Time : 04/09/98 10:33:04 GMT 0 ns
Username : giorgos
Hostname : percheron
Description :
Length : 3
Events : 7 10 80
Add this object to the map ? (y/n) y
Enter name for this object (cr=BdbConfigSampleObject:Default) Default
Object Default added to map.
New map:
Object ID : #11-7-3-7
Type : BdbConfigMap
Config Key : 1
Creation Info :
Time : 04/09/98 10:35:19 GMT 0 ns
Username : giorgos
Hostname : percheron
Description :
Map contents :
Default -> OID = #11-4-3-14, Key = 2
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
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: 1
Enter subsystem name in Tla format: Bdb
Enter configuration Key for subsystem master map: 1
searching for the Map...
Found map #11-7-3-7:
Object ID : #11-7-3-7
Type : BdbConfigMap
Config Key : 1
Creation Info :
Time : 04/09/98 10:35:19 GMT 0 ns
Username : giorgos
Hostname : percheron
Description :
Map contents :
Default -> OID = #11-4-3-14, Key = 2
Add this to the Top Map ? (y/n) y
Configuration Bdb added .
New map:
Object ID : #10-4-3-29
Type : BdbConfigMap
Config Key : 3 <- Note the new master config key number!
Creation Info :
Time : 04/09/98 10:37:22 GMT 0 ns
Username : giorgos
Hostname : percheron
Description :
Map contents :
Oep -> OID = #9-9-3-7, Key = 1
Bdb -> OID = #11-7-3-7, Key = 1
Add more subsystems to Top Map ? (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
To run the read application you need to give it the path of the configuration tree you created (Bdb/Default) and the master key of the Top map (3):
bin/${BFARCH}/BdbConfigReadTest Bdb/Default 3<key>
Below is the output:
Looking up BdbConfigSampleObject with key 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
Found object in container #11-4-3-1:
Object ID : #11-4-3-14
Type : BdbConfigSampleObject
Config Key : 2 <- Note this is the config key of the actual
Creation Info : object and not of the Top map (master key)
Time : 04/09/98 10:33:04 GMT 0 ns
Username : giorgos
Hostname : percheron
Description :
Length : 3
Events : 7 10 80
Found the same handle #11-4-3-14