Configuration Database Utility
NOTE: BdbCfgToolLite app dissapeared in recent releases and was replaced with a script which forwards everything to BfbCfgTool.
Table of Contents
- Introduction
- Print List of Commands and Command Options
- Print List of Containers in Database
- Print List of Configuration Keys in Container
- Print the Numeric Configuration Tree
- Create or Modify Alias Tree
- Verify the Structure of Alias Tree
- Print List of Aliases
- Print the Alias Tree
- Make Alias Snapshot
- Create Numeric Tree
- Modify Alias Maps
- Appendix: Commands for MakeAliasTree
- Appendix: Example files for MakeAliasTree
- Appendix: Scripts which use BdbCfgTool
This page describes the configuration database utility program, BdbCfgTool. It supports following operations on the configuration data:
- print the list of databases and container in the configuration databases
- print the contents of the numeric databases in different formats
- print the contents of the alias databases
- modify the alias trees and verify their structure
- create numeric trees from alias trees
All operations are performed with the commands to the BdbCfgUtil. The format of all commands is like this:
BdbCfgTool [common_options] command [command_options] [parameters]
Options which are common for all commands are:
- -v
- produces more verbose output
- -q
- terse output
- -d
- produces debugging output (sometimes this debugging information is useful even for end users)
Below is the list of the currently supported commands with the description of what each command does.
Calling BdbCfgTool without any command will produce the list of available commands with the brief description of each command.
To print the list of options and parameters for specific command one can execute that command with the "-help" option, e.g.:
% BdbCfgTool ListCont -help
Usage : ListCont <options> database
database three-letter db name
<options> are:
[-a | --all ] print all containers
The command "ListCont" prints the list of the container in the specified database.
- Usage
-
BdbCfgTool [-v] [-q] [-d] ListCont [-a|--all] database
- Description
-
The command prints the list of names of containers in given database. The database is the 3-letter name of the database, e.g. "DCH", "Orc", "top", etc., the case does not matter. Without options only the containers of class BdbConfigContObj are scanned (this is the standard type of configuration container). When option -a (or long --all) is given it scans all containers and prints type of the container if it is not standard type. Using global option -v will print additional information, such as the system name of the container, exact type of the container and minimum/maximum configuration key in the container. Option -d will print in addition creation time, and the name of the user who created this container (for BdbConfigContObj containers only).
- Example
-
% BdbCfgTool -v ListCont -a top
Initializing Objectivity using BdbObjyMgr class
_ooDefaultContObj <ooDefaultContObj>
BdbConfigTopMap {1000055} <BdbConfigContObj> keys: 1 to 1263
BdbConfigAliasMap:Default {1000058:Default} <BdbConfigAliasContObj> keys: 1 to 62
BdbConfigAliasMap:OrcCycles {1000058:OrcCycles} <BdbConfigAliasContObj> keys: 1 to 1
The command "ListKeys" prints the list of the configuration keys in the specified container and database.
- Usage
-
BdbCfgTool [-v] [-q] [-d] ListKeys database container [key]
- Description
-
The command prints the list of keys in given containers. The database is the 3-letter name of the database, e.g. "DCH", "Orc", "top", etc., the case does not matter. The container is the full name of the container including class name and secondary key (like the ones printed by ListCont command). Optional key parameter specifies which key to print, it can be a number or the word "last" or "all". In case it is a number only the specified key is printed. If it is "last", only the last key is printed. In case it is missing or is "all" then every key in the container is printed.
For each printed key the key value and object ID is printed. If the option -v is given then the contents of the object is printed also (using the print() method of the object).
- Example
-
% BdbCfgTool -v ListKeys orc OrcConfigP:Default last
Initializing Objectivity using BdbObjyMgr class
13: #48-43-3-45
Object ID : #48-43-3-45
Type : OrcConfigP
Config Key : 13
Creation Info :
Time : 08/28/01 16:49:43 (local time) 0 ns
Username : bartoldu
Hostname : bbr-dev25
Description : EMC & EMT crate mask, no trigger mask
The command "DumpTree" prints the contents of the configuration database as a tree.
- Usage
-
BdbCfgTool [-v] [-q] [-d] DumpTree [-d depth] [-s] [-m] database container key
- Description
-
The command prints the configuration tree. The root of the tree is the object (usually map) defined by the command's parameters. The database is the 3-letter name of the database, e.g. "DCH", "Orc", "top", etc., the case does not matter. The container is the full name of the container including class name and secondary key (like the ones printed by ListCont command). The key parameter specifies the numeric key to print, it can be a number or the word "last". In case it is "last", the last key in container is taken.
Starting with the object specified by the database, container, and key the program follows all links from this object and recursively all its children. For each object it prints path to this object from the root, and the identity of this object. Without -m option only the basic objects are printed, with -m option the maps are printed also.
Option -s turns on printing of the shortcut map in the top maps. The depth of the printed tree can be controlled with the -d option.
- Example
-
% BdbCfgTool DumpTree -m top BdbConfigTopMap 1261
Initializing Objectivity using BdbObjyMgr class
/: top/BdbConfigTopMap[1261]
/Trg/: trg/BdbConfigMap:Trg[139]
/Trg/tcf: trg/BdbConfigFileP:TrgConfig[65]
/Trg/tcl: trg/BdbConfigFileP:L3Trigger/L3TPatches.tcl[24]
/L3D/: l3d/BdbConfigMap:L3D[31]
/L3D/L3EChannelMask: l3d/L3EChannelMaskP:Default[4]
/L3D/T2D: l3d/L3DT2DP_001:Default[8]
/L3D/Config: l3d/L3DConfigP:Default[1]
/L3D/Geom: l3d/L3DGeomP:Default[4]
/L3D/TrkList: l3d/L3DTrkList:Default[1]
/Emt/: emt/BdbConfigMap:Emt[136]
/Emt/AxConfig: emt/L1EmtAxRawDataP:AxConfig[44]
/Emt/CycleTC: emt/BdbConfigFileIdentifier:EmtCycles[32]
/Emt/FcxConfig: emt/L1EmtFcxRawDataP:FcxConfig[5]
/Emt/FxConfig: emt/L1EmtFxRawDataP:FxConfig[4]
/Dch/: dch/BdbConfigMap:Dch[117]
/Dch/DchCalCycles: dch/BdbConfigFileIdentifier:DchCalCycles[104]
/Dch/CalConfigType: dch/CalConfigTypeP[7]
/Svt/: svt/BdbConfigMap:Svt[178]
/Svt/ChipsConfig/: svt/BdbConfigMap:ChipsConfig[103]
/Svt/ChipsConfig/Data: svt/SvtChipsConfigP:Default[107]
/Svt/ChipsConfig/FileID: svt/BdbConfigFileIdentifier:SvtChips[104]
/Svt/RunConfig/: svt/BdbConfigMap:RunConfig[10]
/Svt/RunConfig/Data: svt/SvtRunConfigP:Default[8]
/Svt/RunConfig/FileID: svt/BdbConfigFileIdentifier:SvtCycle[8]
/Dct/: dct/BdbConfigMap:Dct[17]
/Dct/TsfConfig: dct/BdbConfigFileIdentifier:DctTsfConfig[3]
/Dct/BltPtdConfig: dct/BdbConfigFileIdentifier:DctBltPtdConfig[4]
/Dct/CalCycles: dct/BdbConfigFileIdentifier:DctCycles[3]
/Dct/TsfLut: dct/L1DTsfLutArrayP:Default[2]
/Drc/: drc/BdbConfigMap:Drc[75]
/Drc/Drc FEE Registers/: drc/BdbConfigMap:Drc FEE Registers[19]
/Drc/Drc FEE Registers/ROM 0: drc/BdbConfigFileIdentifier:DrcRegisters[103]
/Drc/Drc FEE Registers/ROM 1: drc/BdbConfigFileIdentifier:DrcRegisters[104]
/Drc/Drc FEE Registers/ROM 2: drc/BdbConfigFileIdentifier:DrcRegisters[105]
/Drc/Drc FEE Registers/ROM 3: drc/BdbConfigFileIdentifier:DrcRegisters[106]
/Drc/Drc FEE Registers/ROM 4: drc/BdbConfigFileIdentifier:DrcRegisters[107]
/Drc/Drc FEE Registers/ROM 5: drc/BdbConfigFileIdentifier:DrcRegisters[108]
/Drc/DetCont/: drc/BdbConfigMap:DetCont[2]
/Drc/DetCont/DRC:SC_8:X: drc/OdcBdbConfigFile:DRC:SC_8:X[1]
/Drc/DetCont/DRC:SC_1:X: drc/OdcBdbConfigFile:DRC:SC_1:X[1]
/Drc/DetCont/DRC:SC_3:X: drc/OdcBdbConfigFile:DRC:SC_3:X[1]
/Drc/DetCont/DRC:SC_10:X: drc/OdcBdbConfigFile:DRC:SC_10:X[1]
/Drc/DetCont/DRC:SC_5:X: drc/OdcBdbConfigFile:DRC:SC_5:X[1]
/Drc/DetCont/DRC:SC_7:X: drc/OdcBdbConfigFile:DRC:SC_7:X[1]
/Drc/DetCont/DRC:SC_9:X: drc/OdcBdbConfigFile:DRC:SC_9:X[1]
/Drc/DetCont/DRC:SC_0:X: drc/OdcBdbConfigFile:DRC:SC_0:X[1]
/Drc/DetCont/DRC:SC_2:X: drc/OdcBdbConfigFile:DRC:SC_2:X[1]
/Drc/DetCont/DRC:SC_4:X: drc/OdcBdbConfigFile:DRC:SC_4:X[1]
/Drc/DetCont/DRC:SC_11:X: drc/OdcBdbConfigFile:DRC:SC_11:X[1]
/Drc/DetCont/DRC:SC_6:X: drc/OdcBdbConfigFile:DRC:SC_6:X[1]
/Drc/Drc Cycles/: drc/BdbConfigMap:Drc Cycles[17]
/Drc/Drc Cycles/Adc truncated FX: drc/BdbConfigFileIdentifier:DrcCycles[25]
/Ifr/: ifr/BdbConfigMap:Ifr[18]
/Ifr/IfrCalCycles: ifr/BdbConfigFileIdentifier:IfrCycles[2]
/Ifr/DetCont/: ifr/BdbConfigMap:DetCont[6]
/Ifr/DetCont/IFR:GEN:X: ifr/OdcBdbConfigFile:IFR:GEN:X[3]
/Orc/: orc/BdbConfigMap:Orc[23]
/Orc/OrcCPMask: orc/OrcCPMaskP:Default[1]
/Orc/OrcConfigP: orc/OrcConfigP:Default[3]
/Orc/OrcCycles: orc/BdbConfigFileIdentifier:OrcCycles[3]
/Glt/: glt/BdbConfigMap:Glt[15]
/Glt/L1GltGlobalTC: glt/BdbConfigFileIdentifier:L1GltGlobalTC[12]
/Emc/: emc/BdbConfigMap:Emc[111]
/Emc/DetCont/: emc/BdbConfigMap:DetCont[2]
/Emc/DetCont/EMC:EC:X: emc/OdcBdbConfigFile:EMC:EC:X[2]
/Emc/DetCont/EMC:BF:X: emc/OdcBdbConfigFile:EMC:BF:X[2]
/Emc/DetCont/EMC:BB:X: emc/OdcBdbConfigFile:EMC:BB:X[2]
/Emc/ROMConfig: emc/BdbConfigFileIdentifier:EmcCycles[96]
The command "MakeAliasTree" modifies the contents of the alias database.
- Usage
-
BdbCfgTool [-v] [-q] [-d] MakeAliasTree [-c string|-f file] [-t] database
- Description
-
The command works on the contents of single subsystem database, whose name is given by database parameter. Program interprets the commands either from the file given with the -f option or a single command given with -c option. If neither of these options present the commands are read from the standard input. Option -t turns off certain verifications which command performs while making alias tree (not recommended for average user).
The list of commands is rather big to be explained in this short description, but detailed description of all commands is in the appendix below.
- Example
-
% BdbCfgTool MakeAliasTree -f dch.alias dch
The command "VerifyAlias" verifies the contents of the alias database.
- Usage
-
BdbCfgTool [-v] [-q] [-d] VerifyAlias
- Description
-
The command checks the consistency on the contents of alias database and reports any observed inconsistencies.
- Example
-
% BdbCfgTool VerifyAlias
The command "ListAlias" prints the list of aliases defined for container.
- Usage
-
BdbCfgTool [-v] [-q] [-d] ListAlias database [container]
- Description
-
The command lists the aliases defined in given containers. The database is the 3-letter name of the database. The container is the name of the container. If container name is omitted or is "all" than aliases for all containers in the databases are listed.
- Example
-
% BdbCfgTool ListAlias -v top BdbConfigTopMap
Initializing Objectivity using BdbObjyMgr class
Container: BdbConfigTopMap
TOP_TRICKLE_INJECTION
Trg -> trg/BdbConfigMap:Trg[TRICKLE_INJECTION]
L3D -> l3d/BdbConfigMap:L3D[PHYSICS]
Emt -> emt/BdbConfigMap:Emt[PHYSICS]
Dch -> dch/BdbConfigMap:Dch[PHYSICS]
Svt -> svt/BdbConfigMap:Svt[TRICKLE_INJECTION]
Dct -> dct/BdbConfigMap:Dct[PHYSICS]
Drc -> drc/BdbConfigMap:Drc[PHYSICS]
Ifr -> ifr/BdbConfigMap:Ifr[PHYSICS]
Orc -> orc/BdbConfigMap:Orc[PHYSICS]
Glt -> glt/BdbConfigMap:Glt[PHYSICS]
Emc -> emc/BdbConfigMap:Emc[TRICKLE_INJECTION]
TOP_COSMICS
Trg -> trg/BdbConfigMap:Trg[COSMICS]
L3D -> l3d/BdbConfigMap:L3D[PHYSICS]
Emt -> emt/BdbConfigMap:Emt[PHYSICS]
Dch -> dch/BdbConfigMap:Dch[PHYSICS]
Svt -> svt/BdbConfigMap:Svt[PHYSICS]
Dct -> dct/BdbConfigMap:Dct[PHYSICS]
Drc -> drc/BdbConfigMap:Drc[PHYSICS]
Ifr -> ifr/BdbConfigMap:Ifr[PHYSICS]
Orc -> orc/BdbConfigMap:Orc[COSMICS]
Glt -> glt/BdbConfigMap:Glt[PHYSICS]
Emc -> emc/BdbConfigMap:Emc[PHYSICS]
TOP_PHYSICS
Trg -> trg/BdbConfigMap:Trg[PHYSICS]
L3D -> l3d/BdbConfigMap:L3D[PHYSICS]
Emt -> emt/BdbConfigMap:Emt[PHYSICS]
Dch -> dch/BdbConfigMap:Dch[PHYSICS]
Svt -> svt/BdbConfigMap:Svt[PHYSICS]
Dct -> dct/BdbConfigMap:Dct[PHYSICS]
Drc -> drc/BdbConfigMap:Drc[PHYSICS]
Ifr -> ifr/BdbConfigMap:Ifr[PHYSICS]
Orc -> orc/BdbConfigMap:Orc[PHYSICS]
Glt -> glt/BdbConfigMap:Glt[PHYSICS]
Emc -> emc/BdbConfigMap:Emc[PHYSICS]
The command "DumpAlias" prints the contents of the alias database as a tree.
- Usage
-
BdbCfgTool [-v] [-q] [-d] DumpAlias database container [name]
- Description
-
The command prints the alias tree. The root of the tree is the alias (usually folder) defined by the command's parameters. The database is the 3-letter name of the database. The container is the full name of the container including class name and secondary key. The name parameter specifies the alias to print. If it is omitted or is "all" than all aliases are printed.
Stating with the alias object specified by the database, container, and name the program follows all links from this object and recursively all its children. For each alias it prints path to this object from the root, and the identity of this object.
- Example
-
% BdbCfgTool DumpAlias top BdbConfigTopMap TOP_PHYSICS
Initializing Objectivity using BdbObjyMgr class
====== Container: BdbConfigTopMap Alias: TOP_PHYSICS ======
/: top/BdbConfigTopMap[TOP_PHYSICS]
/Trg/: trg/BdbConfigMap:Trg[PHYSICS]
/Trg/tcf: trg/BdbConfigFileP:TrgConfig[PHYSICS]
/Trg/tcl: trg/BdbConfigFileP:L3Trigger/L3TPatches.tcl[PHYSICS]
/L3D/: l3d/BdbConfigMap:L3D[PHYSICS]
/L3D/L3EChannelMask: l3d/L3EChannelMaskP:Default[PHYSICS]
/L3D/T2D: l3d/L3DT2DP_001:Default[PHYSICS]
/L3D/Config: l3d/L3DConfigP:Default[PHYSICS]
/L3D/Geom: l3d/L3DGeomP:Default[PHYSICS]
/L3D/TrkList: l3d/L3DTrkList:Default[PHYSICS]
/Emt/: emt/BdbConfigMap:Emt[PHYSICS]
/Emt/AxConfig: emt/L1EmtAxRawDataP:AxConfig[PHYSICS]
/Emt/CycleTC: emt/BdbConfigFileIdentifier:EmtCycles[PHYSICS]
/Emt/FcxConfig: emt/L1EmtFcxRawDataP:FcxConfig[PHYSICS]
/Emt/FxConfig: emt/L1EmtFxRawDataP:FxConfig[PHYSICS]
/Dch/: dch/BdbConfigMap:Dch[PHYSICS]
/Dch/DchCalCycles: dch/BdbConfigFileIdentifier:DchCalCycles[PHYSICS]
/Dch/CalConfigType: dch/CalConfigTypeP[PHYSICS]
/Svt/: svt/BdbConfigMap:Svt[PHYSICS]
/Svt/ChipsConfig/: svt/BdbConfigMap:ChipsConfig[PHYSICS]
/Svt/ChipsConfig/Data: svt/SvtChipsConfigP:Default[PHYSICS]
/Svt/ChipsConfig/FileID: svt/BdbConfigFileIdentifier:SvtChips[PHYSICS]
/Svt/RunConfig/: svt/BdbConfigMap:RunConfig[PHYSICS]
/Svt/RunConfig/Data: svt/SvtRunConfigP:Default[PHYSICS]
/Svt/RunConfig/FileID: svt/BdbConfigFileIdentifier:SvtCycle[PHYSICS]
/Dct/: dct/BdbConfigMap:Dct[PHYSICS]
/Dct/TsfConfig: dct/BdbConfigFileIdentifier:DctTsfConfig[PHYSICS]
/Dct/BltPtdConfig: dct/BdbConfigFileIdentifier:DctBltPtdConfig[PHYSICS]
/Dct/CalCycles: dct/BdbConfigFileIdentifier:DctCycles[PHYSICS]
/Dct/TsfLut: dct/L1DTsfLutArrayP:Default[PHYSICS]
/Drc/: drc/BdbConfigMap:Drc[PHYSICS]
/Drc/Drc FEE Registers/: drc/BdbConfigMap:Drc FEE Registers[PHYSICS]
/Drc/Drc FEE Registers/ROM 0: drc/BdbConfigFileIdentifier:DrcRegisters[ROM_0]
/Drc/Drc FEE Registers/ROM 1: drc/BdbConfigFileIdentifier:DrcRegisters[ROM_1]
/Drc/Drc FEE Registers/ROM 2: drc/BdbConfigFileIdentifier:DrcRegisters[ROM_2]
/Drc/Drc FEE Registers/ROM 3: drc/BdbConfigFileIdentifier:DrcRegisters[ROM_3]
/Drc/Drc FEE Registers/ROM 4: drc/BdbConfigFileIdentifier:DrcRegisters[ROM_4]
/Drc/Drc FEE Registers/ROM 5: drc/BdbConfigFileIdentifier:DrcRegisters[ROM_5]
/Drc/DetCont/: drc/BdbConfigMap:DetCont[PHYSICS]
/Drc/DetCont/DRC:SC_0:X: drc/OdcBdbConfigFile:DRC:SC_0:X[PHYSICS]
/Drc/DetCont/DRC:SC_1:X: drc/OdcBdbConfigFile:DRC:SC_1:X[PHYSICS]
/Drc/DetCont/DRC:SC_2:X: drc/OdcBdbConfigFile:DRC:SC_2:X[PHYSICS]
/Drc/DetCont/DRC:SC_3:X: drc/OdcBdbConfigFile:DRC:SC_3:X[PHYSICS]
/Drc/DetCont/DRC:SC_4:X: drc/OdcBdbConfigFile:DRC:SC_4:X[PHYSICS]
/Drc/DetCont/DRC:SC_5:X: drc/OdcBdbConfigFile:DRC:SC_5:X[PHYSICS]
/Drc/DetCont/DRC:SC_6:X: drc/OdcBdbConfigFile:DRC:SC_6:X[PHYSICS]
/Drc/DetCont/DRC:SC_7:X: drc/OdcBdbConfigFile:DRC:SC_7:X[PHYSICS]
/Drc/DetCont/DRC:SC_8:X: drc/OdcBdbConfigFile:DRC:SC_8:X[PHYSICS]
/Drc/DetCont/DRC:SC_9:X: drc/OdcBdbConfigFile:DRC:SC_9:X[PHYSICS]
/Drc/DetCont/DRC:SC_10:X: drc/OdcBdbConfigFile:DRC:SC_10:X[PHYSICS]
/Drc/DetCont/DRC:SC_11:X: drc/OdcBdbConfigFile:DRC:SC_11:X[PHYSICS]
/Drc/Drc Cycles/: drc/BdbConfigMap:Drc Cycles[PHYSICS]
/Drc/Drc Cycles/Adc truncated FX: drc/BdbConfigFileIdentifier:DrcCycles[PHYSICS]
/Ifr/: ifr/BdbConfigMap:Ifr[PHYSICS]
/Ifr/IfrCalCycles: ifr/BdbConfigFileIdentifier:IfrCycles[PHYSICS]
/Ifr/DetCont/: ifr/BdbConfigMap:DetCont[PHYSICS]
/Ifr/DetCont/IFR:GEN:X: ifr/OdcBdbConfigFile:IFR:GEN:X[PHYSICS]
/Orc/: orc/BdbConfigMap:Orc[PHYSICS]
/Orc/OrcCPMask: orc/OrcCPMaskP:Default[COMMON]
/Orc/OrcConfigP: orc/OrcConfigP:Default[PHYSICS]
/Orc/OrcCycles: orc/BdbConfigFileIdentifier:OrcCycles[COMMON]
/Glt/: glt/BdbConfigMap:Glt[PHYSICS]
/Glt/L1GltGlobalTC: glt/BdbConfigFileIdentifier:L1GltGlobalTC[PHYSICS]
/Emc/: emc/BdbConfigMap:Emc[PHYSICS]
/Emc/DetCont/: emc/BdbConfigMap:DetCont[PHYSICS]
/Emc/DetCont/EMC:EC:X: emc/OdcBdbConfigFile:EMC:EC:X[PHYSICS]
/Emc/DetCont/EMC:BF:X: emc/OdcBdbConfigFile:EMC:BF:X[PHYSICS]
/Emc/DetCont/EMC:BB:X: emc/OdcBdbConfigFile:EMC:BB:X[PHYSICS]
/Emc/ROMConfig: emc/BdbConfigFileIdentifier:EmcCycles[PHYSICS]
The command "AliasSnapshot" produces the dump of the alias tree for the specified subsystem in the format which is understood by the "MakeAliasTree" command.
- Usage
-
BdbCfgTool [-v] [-q] [-d] AliasSnapshot [-d] database [alias]
- Description
-
The command dumps the contents of the alias trees. The database is the 3-letter name of the database. Optional alias parameter specifies the system alias name. If it is omitted or is "all" than all system aliases are printed. If option -d is specified then the command also prints the list of the commands to delete every alias in the database.
- Example
-
% BdbCfgTool AliasSnapshot ifr
Initializing Objectivity using BdbObjyMgr class
BdbConfigFileIdentifier:IfrCycles [ CYCLES_ROM1 ] = 4
BdbConfigFileIdentifier:IfrCycles [ CYCLES_ROM3 ] = 6
BdbConfigFileIdentifier:IfrCycles [ CYCLES_ROM2 ] = 5
BdbConfigFileIdentifier:IfrCycles [ CYCLES_ROM4 ] = 7
IFR_CALIB -> IfrCalCycles_Rom1 = BdbConfigFileIdentifier:IfrCycles [ CYCLES_ROM1 ]
IFR_CALIB -> IfrCalCycles_Rom3 = BdbConfigFileIdentifier:IfrCycles [ CYCLES_ROM3 ]
IFR_CALIB -> IfrCalCycles_Rom2 = BdbConfigFileIdentifier:IfrCycles [ CYCLES_ROM2 ]
IFR_CALIB -> IfrCalCycles_Rom4 = BdbConfigFileIdentifier:IfrCycles [ CYCLES_ROM4 ]
BdbConfigFileIdentifier:IfrCycles [ CYCLES_PHYSICS ] = 2
OdcBdbConfigFile:IFR:GEN:X [ GEN_X_PHYSICS ] = 3
BdbConfigMap:DetCont [ DETCONT_PHYSICS ] -> IFR:GEN:X = OdcBdbConfigFile:IFR:GEN:X [ GEN_X_PHYSICS ]
IFR_PHYSICS -> IfrCalCycles = BdbConfigFileIdentifier:IfrCycles [ CYCLES_PHYSICS ]
IFR_PHYSICS -> DetCont = BdbConfigMap:DetCont [ DETCONT_PHYSICS ]
IFR_NEWTRGWINDOW -> Physics Cycle = BdbConfigFileIdentifier:IfrCycles [ CYCLES_PHYSICS ]
OdcBdbConfigFile:IFR:EC:X [ EC_X_NEW_TRG_WIN ] = 2
OdcBdbConfigFile:IFR:GEN:X [ GEN_X_NEW_TRG_WIN ] = 2
OdcBdbConfigFile:IFR:BR:X [ BR_X_NEW_TRG_WIN ] = 3
BdbConfigMap:DetCont [ DETCONT_NEW_TRG_WIN ] -> IFR:EC:X = OdcBdbConfigFile:IFR:EC:X [ EC_X_NEW_TRG_WIN ]
BdbConfigMap:DetCont [ DETCONT_NEW_TRG_WIN ] -> IFR:GEN:X = OdcBdbConfigFile:IFR:GEN:X [ GEN_X_NEW_TRG_WIN ]
BdbConfigMap:DetCont [ DETCONT_NEW_TRG_WIN ] -> IFR:BR:X = OdcBdbConfigFile:IFR:BR:X [ BR_X_NEW_TRG_WIN ]
IFR_NEWTRGWIN -> DetCont = BdbConfigMap:DetCont [ DETCONT_NEW_TRG_WIN ]
IFR_NEWTRGWIN -> Physics Cycle = BdbConfigFileIdentifier:IfrCycles [ CYCLES_PHYSICS ]
The command "MakeTree" builds numeric tree from alias tree.
- Usage
-
BdbCfgTool [-v] [-q] [-d] MakeTree [-s systems] [-a] [-n] [-m email] database
- Description
-
This commands builds the numeric trees from the alias trees. It starts from the "run type" maps (alias maps) and goes down to top maps, subsystem maps, etc. It compares the alias maps with the current numeric trees (those growing from the runtype maps) and makes only necessary changes to numeric trees. If the database argument is the name of the subsystem then it looks for a changes in that subsystem's database only (but updates top and run types maps also). You can give string "all" in place of this parameter to update every subsystem. By default this command updates all run types in all subsystems. If you want to rebuild only one or few subsystems' run types you can specify it with the -s option which takes a comma-separated list of subsystems. Alternatively it is possible to rebuild top trees only without changing alias maps at all, the option -a does this. Option -n disables any changes to numeric trees, this can be useful for testing purposes. The option -m specifies the alternative address to send message about what has been updated, by default e-mail is sent to the HyperNews group.
- Example
-
% BdbCfgTool MakeTree dch
Will build aliases for all subsystems
Rebuilding runtypes for all subsystems
Initializing Objectivity using BdbObjyMgr class
=> Reading the alias trees into memory
=> Matching alias trees and existing numeric trees
=> Computing required updates for numeric trees
=> Updating numeric trees
Following top keys were created: 1371
The command "ChangeAliasMap" modifies alias maps (run types).
- Usage
-
BdbCfgTool [-v] [-q] [-d] ChangeAliasMap [-c string|-f file] database
- Description
-
The command works with the alias maps of single subsystem database, whose name is given by database parameter. Program interprets the commands either from the file given with the -f option or a single command given with -c option. If neither of these options present the commands are read from the standard input.
There are two commands understood by the ChangeAliasMap. First command creates new run type or modifies the existing run type to point to the given top tree. its format is:
alias_name = top_key
Second command deletes existing alias. Its format is:
delete alias_name
NOTE: The ChangeAliasMap command must be used with extreme care. It modifies the numeric database directly which bypasses ordinary operations done through the alias trees database. The only reasonable use for this command could be to define MC run types which can be difficult to maintain in alias trees.
- Example
-
% BdbCfgTool ChangeAliasMap -c "Aug-2001 = 1203" top
Notation
Configuration objects identity can be represented as:
db/container[key]
where db is the database name, container is the full container name (className:secondaryKey) and key is the numeric configuration key. Database name and container name could be omitted if they can be deduced from context. Examples:
top/BdbConfigTopMap[1261]
dch/BdbConfigFileIdentifier:DchCalCycles[104]
Aliases are the names given to the numeric objects, so above notation is easily extended to alias objects:
db/container[alias]
where alias is the alias name. Again some parts can be omitted if it's clear from the context what they are. Examples are:
top/BdbConfigTopMap[TOP_PHYSICS]
dch/BdbConfigFileIdentifier:DchCalCycles[DCH_PHYS]
Configuration maps (both numeric and alias folders) contain the named links to other objects, they can be put as:
db/container[alias] -> link
and examples are:
dch/BdbConfigMap:Dch[117] -> DchCalCycles
dch/BdbConfigMap:Dch[DCH_PHYS] -> DchCalCycles
In the MakeALiasTree everything starting with '#' symbol to the end of line is considered as comment and removed from the command prior to executing it. Empty lines are simply ignored.
In many places subsystems names and databases names are used interchangeably, but there are some important exceptions. In all cases the database name is the subsystem name all lower-case (like "svt", "dct", etc.). When the subsystem name appears as the link or secondary key it is used in its "canonical" form. Canonical name is the capitalized name of the subsystem, except for L3D where it is all upper-case.
MakeAliasTree operations
This command supports following operations:
- Attach leaf alias to numeric object (possibly creating alias if it does not exist)
- Make a named link from a folder alias (possibly creating folder alias) to another alias
- Copy alias to the alias with different name
- Delete alias
- Delete link from folder alias
The operations and commands vary slightly for ordinary subsystems and top database, because the top maps link all subsystems together. Below is the description of all commands which MakeAliasTree understands.
Make leaf alias
This makes new leaf alias and attaches it to numeric object, or only re-attaches leaf alias to different numeric object if the alias already exist. The command exists only for ordinary subsystems, because top database does not have leaf aliases.
- Format
-
container[alias] = key
or
container[alias] = _LAST_
- Description
Left hand of the assignment is the alias specification, right hand is the numeric object specification. Database name is missing because it is specified as an argument to the command. Container name is the same for alias and numeric object, so it is omitted on the right hand. The program checks that the numeric object exists, unless the -t option is given. You can uset word "_LAST_" instead of the numeric key to signify the last key in that container.
- Example
BdbConfigFileIdentifier:DchCalCycles[DCH_PHYS] = 104
Make a link for ordinary subsystem
This makes new link from alias folder to different alias or re-attaches already existing link. The alias folder will be created if does not yet exist.
- Format
container1[alias1] -> link = container2[alias2]
or
alias1 -> link = container2[alias2]
- Description
Left hand of the assignment is the link specification, right hand is the alias specification. Database name is missing because it is specified as an argument to the command. In second case when the container name is missing on the left hand, it is assumed to be 'BdbConfigMap:Sys', where 'Sys' is the capitalized subsystem name. This container holds subsystem-level configuration maps, so the second forms is for defining subsystem maps. Alias 'alias1' in container 'container1' must be a folder alias if it exists. If it does not exist it will be created. The program checks that 'alias2' in container 'container2' exists, unless the -t option is given.
- Example (assuming SVT subsystem)
BdbConfigMap:RunConfig[PHYSICS] -> Data = SvtRunConfigP:Default[PHYSICS]
SVT_PHYS -> RunConfig = BdbConfigMap:RunConfig[PHYSICS]
# above is equivalent to BdbConfigMap:Svt[SVT_PHYS] -> RunConfig = ...
Make a link in top database
This makes new link from top alias folders to subsystem alias trees or from the alias maps folders to top alias trees.
- Format
top_alias -> Sys = sys_alias
and
Sys -> run_type = top_alias
- Description
The first form creates top alias folder with the name 'top_alias' if necessary and makes a link from this top alias to the the subsystem-level alias tree. The link name must be a canonical name of the subsystem. The 'sys_alias' is the subsystem-level alias name.
Second form makes an alias for alias map for given subsystem if necessary and defines a run type in this alias map as a link to given top_alias.
- Example
TOP_PHYSICS -> Svt = SVT_PHYS
# above is equivalent to:
# top/BdbConfigTopMap[TOP_PHYSICS] -> Svt = svt/BdbConfigMap:Svt[SVT_PHYS]
Orc -> PHYSICS = TOP_PHYSICS
# above is equivalent to:
# top/_BdbConfigAliasMap_[Orc] -> PHYSICS = top/BdbConfigTopMap[TOP_PHYSICS]
Copy alias in ordinary subsystem
This copies the contents of one alias into other alias, possibly creating this other alias.
- Format
container1[alias1] = alias2
or
alias1 = alias2
- Description
Both hands of the assignment are the alias specifications. Database name is missing because it is specified as an argument to the command. Container name is missing on the right side because it is the same as on the left side. In second case when the container name is missing on the left hand, it is assumed to be 'BdbConfigMap:Sys', where 'Sys' is the capitalized subsystem name. This container holds subsystem-level configuration maps, so the second forms is for defining subsystem maps. If 'alias1' exists its contents is replaced with the contents of the 'alias2', otherwise new alias with the name 'alias1' is created as exact copy of 'alias2'.
- Example (assuming SVT subsystem) makes 'SVT_COSM' alias a copy of 'SVT_PHYS' alias with few changes
SvtRunConfigP:Default[COSMIC] = 100
BdbConfigMap:RunConfig[COSMIC] = PHYSICS
BdbConfigMap:RunConfig[COSMIC] -> Data = SvtRunConfigP:Default[COSMIC]
SVT_COSM = SVT_PHYS
SVT_COSM -> RunConfig = BdbConfigMap:RunConfig[COSMIC]
Copy alias in top database
This copies the contents of one top alias into another top alias.
- Format
top_alias1 = top_alias2
- Description
If 'top_alias1' exists its contents is replaced with the contents of the 'top_alias2', otherwise new alias with the name 'top_alias1' is created as exact copy of 'top_alias2'.
- Example makes 'TOP_COSMIC' alias a copy of 'TOP_PHYSICS' alias with few changes
TOP_COSMIC = TOP_PHYSICS
TOP_COSMIC -> Trg = TRG_COSM
TOP_COSMIC -> Orc = ORC_COSM
Delete alias
This command removes the alias from the alias database.
- Format
delete container[alias]
or
delete alias
- Description
Deletes the alias given its specification. In second form when the container name is missing it deletes either subsystem-level alias in the ordinary subsystem (container BdbConfigMap:Sys) or top alias in the top database (container BdbConfigTopMap). Deleting alias does not remove references to this alias from other folder aliases, all references should be cleared manually.
- Example (assuming SVT database)
delete BdbConfigMap:RunConfig[COSMIC]
delete SVT_COSM
Delete link from the folder alias
This command removes the link from the folder alias.
- Format
delete container[alias] -> link
or
delete alias -> link
- Description
Deletes the link given its specification. In second form when the container name is missing it deletes link from either subsystem-level alias in the ordinary subsystem (container BdbConfigMap:Sys) or top alias in the top database (container BdbConfigTopMap).
- Example (assuming SVT database)
delete BdbConfigMap:RunConfig[COSMIC] -> Data
delete SVT_COSM -> RunConfig
Example subsystem configurations
- dch.alias
# define leaf aliases for different object types/run types
BdbConfigFileIdentifier:DchCalCycles[PHYSICS] = 104
BdbConfigFileIdentifier:DchCalCycles[WAVEFORM] = 149
BdbConfigFileIdentifier:DchCalCycles[DEBUG] = 162
CalConfigTypeP[PHYSICS] = 7
# define Dch subsystem alias for PHYSICS run type
DCH_PHYSICS -> DchCalCycles = BdbConfigFileIdentifier:DchCalCycles[PHYSICS]
DCH_PHYSICS -> CalConfigType = CalConfigTypeP[PHYSICS]
# define Dch subsystem alias for run types with Dch waveforms
DCH_WAVEFORM = DCH_PHYSICS
DCH_WAVEFORM -> DchCalCycles = BdbConfigFileIdentifier:DchCalCycles[WAVEFORM]
# define Dch subsystem alias for run types with Dch debugging
DCH_DEBUG = DCH_PHYSICS
DCH_DEBUG -> DchCalCycles = BdbConfigFileIdentifier:DchCalCycles[DEBUG]
- drc.alias
# in DRC different objects live in the same containers, so this needs special care
# like defining strange alias names for these objects
BdbConfigFileIdentifier:DrcRegisters[ROM_0] = 103
BdbConfigFileIdentifier:DrcRegisters[ROM_1] = 104
BdbConfigFileIdentifier:DrcRegisters[ROM_2] = 105
BdbConfigFileIdentifier:DrcRegisters[ROM_3] = 106
BdbConfigFileIdentifier:DrcRegisters[ROM_4] = 107
BdbConfigFileIdentifier:DrcRegisters[ROM_5] = 108
BdbConfigMap:Drc FEE Registers[PHYSICS] -> ROM 0 = BdbConfigFileIdentifier:DrcRegisters[ROM_0]
BdbConfigMap:Drc FEE Registers[PHYSICS] -> ROM 1 = BdbConfigFileIdentifier:DrcRegisters[ROM_1]
BdbConfigMap:Drc FEE Registers[PHYSICS] -> ROM 2 = BdbConfigFileIdentifier:DrcRegisters[ROM_2]
BdbConfigMap:Drc FEE Registers[PHYSICS] -> ROM 3 = BdbConfigFileIdentifier:DrcRegisters[ROM_3]
BdbConfigMap:Drc FEE Registers[PHYSICS] -> ROM 4 = BdbConfigFileIdentifier:DrcRegisters[ROM_4]
BdbConfigMap:Drc FEE Registers[PHYSICS] -> ROM 5 = BdbConfigFileIdentifier:DrcRegisters[ROM_5]
# this is quite straightforward
OdcBdbConfigFile:DRC:SC_0:X[PHYSICS] = 1
OdcBdbConfigFile:DRC:SC_1:X[PHYSICS] = 1
OdcBdbConfigFile:DRC:SC_2:X[PHYSICS] = 1
OdcBdbConfigFile:DRC:SC_3:X[PHYSICS] = 1
OdcBdbConfigFile:DRC:SC_4:X[PHYSICS] = 1
OdcBdbConfigFile:DRC:SC_5:X[PHYSICS] = 1
OdcBdbConfigFile:DRC:SC_6:X[PHYSICS] = 1
OdcBdbConfigFile:DRC:SC_7:X[PHYSICS] = 1
OdcBdbConfigFile:DRC:SC_8:X[PHYSICS] = 1
OdcBdbConfigFile:DRC:SC_9:X[PHYSICS] = 1
OdcBdbConfigFile:DRC:SC_10:X[PHYSICS] = 1
OdcBdbConfigFile:DRC:SC_11:X[PHYSICS] = 1
BdbConfigMap:DetCont[PHYSICS] -> DRC:SC_0:X = OdcBdbConfigFile:DRC:SC_0:X[PHYSICS]
BdbConfigMap:DetCont[PHYSICS] -> DRC:SC_1:X = OdcBdbConfigFile:DRC:SC_1:X[PHYSICS]
BdbConfigMap:DetCont[PHYSICS] -> DRC:SC_2:X = OdcBdbConfigFile:DRC:SC_2:X[PHYSICS]
BdbConfigMap:DetCont[PHYSICS] -> DRC:SC_3:X = OdcBdbConfigFile:DRC:SC_3:X[PHYSICS]
BdbConfigMap:DetCont[PHYSICS] -> DRC:SC_4:X = OdcBdbConfigFile:DRC:SC_4:X[PHYSICS]
BdbConfigMap:DetCont[PHYSICS] -> DRC:SC_5:X = OdcBdbConfigFile:DRC:SC_5:X[PHYSICS]
BdbConfigMap:DetCont[PHYSICS] -> DRC:SC_6:X = OdcBdbConfigFile:DRC:SC_6:X[PHYSICS]
BdbConfigMap:DetCont[PHYSICS] -> DRC:SC_7:X = OdcBdbConfigFile:DRC:SC_7:X[PHYSICS]
BdbConfigMap:DetCont[PHYSICS] -> DRC:SC_8:X = OdcBdbConfigFile:DRC:SC_8:X[PHYSICS]
BdbConfigMap:DetCont[PHYSICS] -> DRC:SC_9:X = OdcBdbConfigFile:DRC:SC_9:X[PHYSICS]
BdbConfigMap:DetCont[PHYSICS] -> DRC:SC_10:X = OdcBdbConfigFile:DRC:SC_10:X[PHYSICS]
BdbConfigMap:DetCont[PHYSICS] -> DRC:SC_11:X = OdcBdbConfigFile:DRC:SC_11:X[PHYSICS]
BdbConfigFileIdentifier:DrcCycles[PHYSICS] = 25
BdbConfigMap:Drc Cycles[PHYSICS] -> Adc truncated FX = BdbConfigFileIdentifier:DrcCycles[PHYSICS]
# define subsystem alias for DRC
DRC_PHYSICS -> Drc FEE Registers = BdbConfigMap:Drc FEE Registers[PHYSICS]
DRC_PHYSICS -> DetCont = BdbConfigMap:DetCont[PHYSICS]
DRC_PHYSICS -> Drc Cycles = BdbConfigMap:Drc Cycles[PHYSICS]
Top aliases
- top.alias
# make top alias for physics
TOP_PHYSICS -> Trg = TRG_PHYSICS
TOP_PHYSICS -> L3D = L3D_PHYSICS
TOP_PHYSICS -> Emt = EMT_PHYSICS
TOP_PHYSICS -> Dch = DCH_PHYSICS
TOP_PHYSICS -> Svt = SVT_PHYSICS
TOP_PHYSICS -> Dct = DCT_PHYSICS
TOP_PHYSICS -> Drc = DRC_PHYSICS
TOP_PHYSICS -> Ifr = IFR_PHYSICS
TOP_PHYSICS -> Orc = ORC_PHYSICS
TOP_PHYSICS -> Glt = GLT_PHYSICS
TOP_PHYSICS -> Emc = EMC_PHYSICS
# copy physics to cosmics and redefine Trg and Orc
TOP_COSMICS = TOP_PHYSICS
TOP_COSMICS -> Trg = TRG_COSMICS
TOP_COSMICS -> Orc = ORC_COSMICS
# copy physics to "trickle injection" and redefine Trg, Svt, Emc
TOP_TRICKLE_INJECTION = TOP_PHYSICS
TOP_TRICKLE_INJECTION -> Trg = TRG_TRICKLE_INJECTION
TOP_TRICKLE_INJECTION -> Svt = SVT_TRICKLE_INJECTION
TOP_TRICKLE_INJECTION -> Emc = EMC_TRICKLE_INJECTION
# make aliases for ORC run types
Orc -> PHYSICS = TOP_PHYSICS
Orc -> COSMICS = TOP_COSMICS
Orc -> TRICKLE_INJECTION = TOP_TRICKLE_INJECTION
BdbCfgFindKey
Find the top configuration key for given run type.
- Usage
-
BdbCfgFindKey [-x|-X] [--] system [runtype]
- Description
-
If parameter 'runtype' is missing the command will print the list of all
run types defined for system and their keys, otherwise only the key for
given run type will be printed (if any.) With -x option it will print keys
in hex format, with -X it will also add 0x prefix. If the command cannot find
run type with a given name it returns non-zero return code.
- Example
-
% BdbCfgFindKey orc PHYSICS
3142
% BdbCfgFindKey orc
PHYSICS_EMCWF 3151
PHYSICS_DCH_PROBLEM 3144
BACKGROUND 3119
PHYSICS 3142
COSMICS_NODCH 3139
PHYSICS_DCHWF 3143
TRICKLE_INJECTION 3157
COSMICS_L1PASSTHRU 3138
COSMICS_DCZ_OUT 3137
COSMICS_DCH_PROBLEM 3136
COSMICS 3135
PHYSICS_L1PASSTHRU_BY2 3153
DAQTESTS 3141
PHYSICS_SVT_T2 3156
PHYSICS_L1PASSTHRU 3152
PHYSICS_DCH_T5 3149
PHYSICS_SVT_T1 3155
PHYSICS_DCH_T4 3148
BACKGROUND_L1PASSTHRU 3120
PHYSICS_DCH_T3 3147
PHYSICS_DCH_T2 3146
PHYSICS_DCH_T1 3145
COSMICS_PULSERS 3140
PHYSICS_DCZ_OUT 3150
PHYSICS_SVT_PROBLEM 3154
BdbCfgMCRuntypes
List Monte-Carlo runtypes.
- Usage
-
BdbCfgMCRuntypes
- Description
-
This scripts prints the current runtype map in the Top database. This
map provides runtypes used by Monte-Carlo simulation.
- Example
-
% BdbCfgMCRuntypes
81: #16-4-10-59
Object ID : #16-4-10-59
Type : BdbConfigAliasMap
Config Key : 81
Creation Info :
Time : Mon Feb 2 16:35:31 2004 (local time) 0 ns
Username : behera
Hostname : bbr-dev100
Description : (null)
Map contents :
Apr2000-Cfg -> OID = #16-3-107-31, Key = 950
Apr2001-Cfg -> OID = #16-3-98-301, Key = 1003
Apr2002-Cfg -> OID = #16-3-160-138, Key = 1315
Apr2003-Cfg -> OID = #16-3-359-314, Key = 2137
Aug2000-Cfg -> OID = #16-3-107-42, Key = 951
Aug2001-Cfg -> OID = #16-3-127-118, Key = 1112
Dec2001-Cfg -> OID = #16-3-126-477, Key = 1217
Dec2002-Cfg -> OID = #16-3-321-250, Key = 1888
Dec2003-Cfg -> OID = #16-3-517-224, Key = 3060
......
SP2 -> OID = #16-3-118-196, Key = 1038
SP2-8.6.0 -> OID = #16-3-118-165, Key = 1037
Sep2000-Cfg -> OID = #16-3-107-42, Key = 951
Sep2001-Cfg -> OID = #16-3-127-495, Key = 1160
Sep2003-Cfg -> OID = #16-3-415-361, Key = 2512
|