|
|
Differences between CfgUtils and BdbCfgTool
Table of Contents
- Introduction
- BdbCfgTool commands
- Commands new in CfgUtils
CfgUtils application was developed as a replacement for BdbCfgTool, but there are some differences between two. This brief manual summarizes these differences. Note that container names are different in the new implementation, so besides adjusting for possibly different command format or output format you should pay attention to the configuration container names.
Below is the list of the commands supported by BdbCfgTool with the corresponding commands of CfgUtils with the discussion of their differences.
- BdbCfgTool
-
BdbCfgTool requires the database name as a parameter and can print container either without configuration keys, or with the keys if the option -v is given.
- CfgUtils
-
Corresponding command for CfgUtils is also ListCont, but it produces different output. It does not require database name, but can take 0 or more database names instead. If no database name is given then it will print containers for all databases, otherwise it will print containers for the given databases only. The container name on the output is preceeded with the database name, and is always followed by the configuration keys.
- Example
-
% BdbCfgTool -v ListCont orc
BdbConfigAliasMap:Default keys: 1 to 744
BdbConfigFileIdentifier:OrcCyles keys: 1 to 2
BdbConfigMap:Default keys: 1 to 17
BdbConfigMap:Orc keys: 1 to 141
OrcCPMaskP:Default keys: 1 to 7
BdbConfigFileIdentifier:OrcCycles keys: 1 to 23
OrcConfigP:Default keys: 1 to 104
% CfgUtils ListCont orc
orc/CfgRuntypeList:Default [1:744]
orc/RdfFileIdentifier:OrcCyles [1:2]
orc/CfgMap:Default [1:17]
orc/CfgMap:Orc [1:141]
orc/OrcCPMask:Default [1:7]
orc/RdfFileIdentifier:OrcCycles [1:23]
orc/OrcConfig:Default [1:104]
Note also the difference in the container names, this is described in a separate document.
- BdbCfgTool
-
Without -v option it prints configuration key and object ID on the same line. With -v option it also dumps full content of the persistent object.
- CfgUtils
-
It has the same command line parameters as in BdbCfgTool. With -q option it prints only configuration keys, one per line. Without either -q or -v option it will also print "metadata" information about the objects. With -v option it will dump persistent object content. Note that the format of the object dump will depend on particular implementation (Objy/ROOT/MySQL).
- Example
-
% BdbCfgTool ListKeys top BdbConfigTopMap last
5394: #16-3-310-52
% CfgUtils ListKeys top CfgTopMap last
5394
type : BdbConfigTopMap
created : Thu Mar 17 14:03:19 2005 (local time) 58306200 ns
by user : nielsvb@bbr-dev20
comment : created from alias TOP_PHYSICS_ZTRIGGER_NEWBLT
- BdbCfgTool
-
Recursively prints all objects which can be reached from the given map object.
- CfgUtils
-
The format of the command and the output are the same as for BdbCfgTool, except for the relative order of the output which can be different. Also CfgUtils lacks -d option (depth of the output.)
- Example
-
% BdbCfgTool DumpTree -m top BdbConfigTopMap last
/: top/BdbConfigTopMap[5394]
/Dch/: dch/BdbConfigMap:Dch[117]
/Dch/DchCalCycles: dch/BdbConfigFileIdentifier:DchCalCycles[104]
/Dch/CalConfigType: dch/CalConfigTypeP[7]
...
% CfgUtils DumpTree -m top CfgTopMap last
/: Top/CfgTopMap[5394]
/Dch/: Dch/CfgMap:Dch[117]
/Dch/CalConfigType: Dch/CalConfigType[7]
/Dch/DchCalCycles: Dch/RdfFileIdentifier:DchCalCycles[104]
...
- BdbCfgTool
-
Prints the differences between the two or more configuration trees.
- CfgUtils
-
The format of the command line and the output is the same as for BdbCfgTool, but it has one more option -d (--diffs-only) which makes it print only the differences.
- Example
-
% BdbCfgTool DiffNumTrees top BdbConfigTopMap 5393 5394
# / top/BdbConfigTopMap 5393 5394
/Dch dch/BdbConfigMap:Dch 117 117
/Dch/CalConfigType dch/CalConfigTypeP 7 7
...
# /Trg trg/BdbConfigMap:Trg 273 271
# /Trg/tcf trg/BdbConfigFileP:TrgConfig 154 156
/Trg/tcl trg/BdbConfigFileP:L3Trigger/L3TPatches.tcl 30 30
% CfgUtils DiffTrees top CfgTopMap 5393 5394
# / Top/CfgTopMap 5393 5394
/Dch Dch/CfgMap:Dch 117 117
/Dch/CalConfigType Dch/CalConfigType 7 7
...
# /Trg Trg/CfgMap:Trg 273 271
# /Trg/tcf Trg/CfgFileData:TrgConfig 154 156
/Trg/tcl Trg/CfgFileData:L3Trigger/L3TPatches.tcl 30 30
- BdbCfgTool
-
This command manipulates the contents of the alias trees database.
- CfgUtils
-
This is the command with the most significant changes from BdbCfgTool to CfgUtils. First, the name of the command itself is different, in CfgUtils it is called EditAlias. Second, it does not require the name of the database to be specified on the command line (but it allows it.) Third, while BdbCfgTool could only work with one database whose name was given on a command line, CfgUtils can modify more than one database in the same invocation. While sometimes two invocation of BdbCfgTool were needed to modify subsystem and top database, now can be done in one invocation (but it would need modifications to input data.) On the other hand CfgUtils can still run in the same mode as BdbCfgTool when database name was specified on the command line, although one still need to take care of the different container names. For the complete description of all features of EditAlias please refer to CfgUtils documentation.
- Example
-
What was done in two steps before:
% BdbCfgTool MakeAliasTree dch <<EOD
BdbConfigFileIdentifier:DchCalCycles[DCH_PHYS] = 104
EOD
% BdbCfgTool MakeAliasTree top <<EOD
TOP_PHYSICS -> Dch = DCH_PHYS
EOD
could be done in one step now:
% CfgUtils EditAlias <<EOD
dch/BdbConfigFileIdentifier:DchCalCycles[DCH_PHYS] = 104
database top
TOP_PHYSICS -> Dch = DCH_PHYS
EOD
- BdbCfgTool
-
Checks consistency of the alias tree database
- CfgUtils
-
There are no changes in the invocation of the command, but the output and messages could be somewhat different.
- Example
-
% BdbCfgTool VerifyAlias
% CfgUtils VerifyAlias
- BdbCfgTool
-
Prints the aliases defined in the alias database for particular subsystem/container. If there is no container name given then prints aliases for all containers.
- CfgUtils
-
The only change is the name of the command itself - ListAliases.
- Example
-
% BdbCfgTool ListAlias fct
Container: BdbConfigFileP:FctGateConfig
GCF_NULL
GCF_STANDARD
Container: BdbConfigMap:Fct
FCT_PHYSICS
% CfgUtils ListAliases fct
Container: CfgFileData:FctGateConfig
GCF_NULL
GCF_STANDARD
Container: CfgMap:Fct
FCT_PHYSICS
Container: CfgRuntypeList:Default
- BdbCfgTool
-
Recursively prints all aliases which are reachable from the given alias map.
- CfgUtils
-
The name of the command has changed - DumpAliasTree. Command now takes an option which turns on printing of the map aliases (-m). Configuration keys are always printed for leaf aliases, BdbCfgTool only printed them with -v option.
- Example
-
% BdbCfgTool DumpAlias top BdbConfigTopMap TOP_PHYSICS
/: top/BdbConfigTopMap[TOP_PHYSICS]
/Orc/: orc/BdbConfigMap:Orc[ORC_PHYSICS]
/Orc/OrcCycles: orc/BdbConfigFileIdentifier:OrcCycles[CYCLES_PHYSICS]
/Orc/OrcCPMask: orc/OrcCPMaskP:Default[MASK_PHYSICS]
/Orc/OrcConfigP: orc/OrcConfigP:Default[CFG_PHYSICS]
/Glt/: glt/BdbConfigMap:Glt[GLT_PHYSICS]
/Glt/L1GltConfig: glt/L1GltConfigP_001:Default[GLTCONFIG]
...
% CfgUtils DumpAliasTree -m top CfgTopMap TOP_PHYSICS
/: Top/CfgTopMap[TOP_PHYSICS]
/Dch/: Dch/CfgMap:Dch[DCH_PHYSICS]
/Dch/CalConfigType: Dch/CalConfigType[CAL_CONFIG_NORMAL] = 7
/Dch/DchCalCycles: Dch/RdfFileIdentifier:DchCalCycles[CAL_CYCLES_PHYSICS] = 104
/Dct/: Dct/CfgMap:Dct[DCT_PHYSICS]
/Dct/BltMask: Dct/L1DBltMask:Default[BLTMASK_PHYSICS] = 1
/Dct/BltPtdConfig: Dct/RdfFileIdentifier:DctBltPtdConfig[BLT_PDT_PHYSICS] = 4
...
- BdbCfgTool
-
Prints the differences between the two or more alias trees.
- CfgUtils
-
The format of the command line and the output is the same as for BdbCfgTool, but it has one more option -d (--diffs-only) which makes it print only the differences.
- Example
-
% BdbCfgTool DiffAliasTrees top BdbConfigTopMap TOP_PHYSICS TOP_COSMICS
# / top/BdbConfigTopMap TOP_PHYSICS TOP_COSMICS
/Dch dch/BdbConfigMap:Dch DCH_PHYSICS DCH_PHYSICS
/Dch/CalConfigType dch/CalConfigTypeP CAL_CONFIG_NORMAL CAL_CONFIG_NORMAL
...
# /Trg trg/BdbConfigMap:Trg TRG_PHYSICS TRG_COSMICS
# /Trg/tcf trg/BdbConfigFileP:TrgConfig TCF_PHYSICS TCF_COSMICS
# /Trg/tcl trg/BdbConfigFileP:L3Trigger/L3TPatches.tcl TCL_TRICKLE_INJECTION TCL_NORMAL
% CfgUtils DiffAliasTrees top CfgTopMap TOP_PHYSICS TOP_COSMICS
# / Top/CfgTopMap TOP_PHYSICS TOP_COSMICS
/Dch Dch/CfgMap:Dch DCH_PHYSICS DCH_PHYSICS
/Dch/CalConfigType Dch/CalConfigType CAL_CONFIG_NORMAL CAL_CONFIG_NORMAL
...
# /Trg Trg/CfgMap:Trg TRG_PHYSICS TRG_COSMICS
# /Trg/tcf Trg/CfgFileData:TrgConfig TCF_PHYSICS TCF_COSMICS
# /Trg/tcl Trg/CfgFileData:L3Trigger/L3TPatches.tcl TCL_TRICKLE_INJECTION TCL_NORMAL
- BdbCfgTool
-
Compares configuration tree and alias tree and updates former from latter if necessary.
- CfgUtils
-
The name of the command was changed from MakeTree to UpdateTree. All parameters and options are the same. Command output may be different.
- Example
-
% BdbCfgTool MakeTree dch
Rebuilding runtypes for all subsystems
=> Reading the alias trees into memory
=> Matching alias trees and existing numeric trees
=> Computing required updates for numeric trees
No updates required for numeric trees
% CfgUtils UpdateTree dch
Rebuilding runtypes for all subsystems
Opening databases
Comparing trees in Dch
Comparing trees in Emc
Comparing trees in Emt
Comparing trees in Svt
Comparing trees in Drc
Comparing trees in Glt
Comparing trees in Ifr
Comparing trees in Orc
Comparing trees in Dct
no updates necessary
No updates required for numeric trees
- BdbCfgTool
-
Directly modifies the content of the runtype map without touching alias database.
- CfgUtils
-
There are significant changes in this command. First the name of the command itself has changed, now it becomes EditRuntypes. Second, instead of file with the commands or command strings it takes just parameters and options (this is kind of simplifies its interface). For the detailed description of this new command refer to CfgUtils manual.
- Example
-
% BdbCfgTool ChangeAliasMap -c "Aug-2001 = 1203" top
% BdbCfgTool ChangeAliasMap -c "delete Aug-2001" top
% CfgUtils EditRuntypes top Aug-2001 1203
% CfgUtils EditRuntypes -r top Aug-2001
- BdbCfgTool
-
Dumps the content of the alias database in the format suitable for the MakeAliasTree command.
- CfgUtils
-
This command is not implemented in the new configurations database. Could be implemented if there is a demand for it.
Prints the list of known implementations.
- Example
-
% CfgUtils ListImpl
Objectivity
ROOT
MySQL
Prints the list of the known databases (subsystems)
- Example
-
% CfgUtils ListDbs
Bdb
Dch
Dct
Drc
Emc
Emt
Fct
Glt
Ifr
L3D
Orc
Svt
Top
Trg
Print the contents of a single configuration map.
- Example
-
% CfgUtils DumpMap top CfgTopMap last
Dch Dch/CfgMap:Dch[117]
Dct Dct/CfgMap:Dct[35]
Drc Drc/CfgMap:Drc[145]
Emc Emc/CfgMap:Emc[130]
Emt Emt/CfgMap:Emt[213]
Fct Fct/CfgMap:Fct[3]
Glt Glt/CfgMap:Glt[25]
Ifr Ifr/CfgMap:Ifr[18]
L3D L3D/CfgMap:L3D[34]
Orc Orc/CfgMap:Orc[138]
Svt Svt/CfgMap:Svt[281]
Trg Trg/CfgMap:Trg[271]
Finds the object given the top key and a path.
- Example
-
% CfgUtils FindInTree 5394 Dch/CalConfigType
object : Dch/CalConfigType[7]
type : CalConfigTypeP
created : Wed Mar 1 10:42:37 2000 (local time) 0 ns
by user : sciolla@bbr-dev06
comment :
Prints the list of alias databases (subsystems).
- Example
-
% CfgUtils ListAliasDbs
Dch
Dct
Drc
Emc
Emt
Fct
Glt
Ifr
L3D
Orc
Svt
Top
Trg
Prints the list of containers in the alias database.
- Example
-
% CfgUtils ListAliasCont orc
orc/CfgMap:Orc
orc/CfgRuntypeList:Default
orc/OrcConfig:Default
orc/OrcCPMask:Default
orc/RdfFileIdentifier:OrcCycles
Creates new database (subsystem).
- Example
-
% CfgUtils MakeDb Orc "ORC configuration database"
Creates new container in both alias and numeric database.
- Example
-
% CfgUtils MakeCont orc OrcConfig:Default "Orc/OrcConfig:Default container"
|
|