Configuration Database Utility
Table of Contents
- Introduction
- Print List of Commands and Command Options
- ListImpl: Print List of Implementations
- ListDbs: Print List of Databases
- ListCont: Print List of Containers in Database
- ListKeys: Print List of Configuration Keys in Container
- DumpMap: Print the Configuration Map Object
- FindInTree: Tree Search in Numeric Database
- DumpTree: Print the Numeric Configuration Tree
- DiffTrees: Print Differences Between Configuration Trees
- ListAliasDbs: Print List of Alias Databases
- ListAliasCont: Print List of Containers in Alias Database
- ListAliases: Print List of Aliases
- DumpAliasTree: Print the Alias Tree
- DiffAliasTrees: Print Differences Between Alias Trees
- MakeDb: Create New Database
- MakeCont: Create New Container
- EditAlias: Edit Alias Tree
- Verify the Structure of Alias Tree
- UpdateTree: Update Numeric Tree
- EditRuntypes: Modify Runtype Lists
- Appendix: Commands for EditAlias
- Appendix: Example files for EditAlias
- Appendix: Scripts which use CfgUtils
CfgUtils is the command-line utility application for management of the configuration database. It supports operations on the database which are technology-independent. There are also technology- specific utilities for each of the database implementations, they are described separately.
CfgUtils is a spin-off of the BdbCfgTool utility from the old database implementation. Many of the CfgUtils commands behave similarly to BdbCfgTool, but there are also some differences between two.
CfgUtils 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 CfgUtils. The format of all commands is like this:
CfgUtils [common_options] command [command_options] [parameters]
Options which are common for all commands are:
- -i {IMPL} or --implementation={IMPL}
- selects database implementation to use
- -v or --verbose
- increments verbosity level
- -q or --quiet
- increments verbosity level
Both -q and -v (or their long options) could be used multiple times.
The -i or --implementation option specify the database implementation to use. There is always a default implmentation, which is normally a read-write database (MySQL implementation) used at IR2. If you use configuration database outside IR2 then you would need to specify different implementation name, which is normaly "ROOT" for read-only implementation. For the list of known implementations see ListImpl command below.
Below is the list of the currently supported commands with the description of what each command does.
Calling CfgUtils without any command will produce the list of available common options. To display the list of all known commands use the "help" command:
% CfgUtils help
Usage: CfgUtils [options] command [arguments ...]
Available options:
{-h|-?|--help } print help message
{-v|--verbose } (incr) produce more noise
{-q|--quiet } (incr) produce less noise
{-i|--implementation} string database implementation
Positional parameters:
command specifies the name of the command
arguments command arguments
Available commands:
ListImpl : print list of known implementations
ListDbs : print list of databases in the config database
ListCont : print list of containers in the config database
ListKeys : print list of keys in a container
...
To print the list of options and parameters for specific command one can execute that command with the "-h", "-?", or "--help"option, e.g.:
% CfgUtils ListCont -h
Usage: ListCont [database ...]
Positional parameters:
database three-letter db name
The command "ListImpl" prints the list of know database implementations.
- Usage
-
CfgUtils ListImpl
- Description
-
This command prints the list of the names of known implementations. The first implementaton in the list is default implementation. Common option -i changes the default implementation so if you use -i option with this command the first in the list will be the one from -i option.
- Example
-
% CfgUtils ListImpl
Objectivity
ROOT
MySQL
The command "ListDbs" prints the list of databases (subsystems) defined in configuration database.
- Usage
-
CfgUtils ListDbs
- Description
-
The command prints the list of subsystem names existing in given implementation.
- Example
-
% CfgUtils ListDbs
Bdb
Dch
Dct
Drc
Emc
Emt
Fct
Glt
Ifr
L3D
Orc
Svt
Top
Trg
The command "ListCont" prints the list of the container in the specified database.
- Usage
-
CfgUtils ListCont [database ...]
- Description
-
The command prints the list of containers. Without arguments it prints containers for all databases (subsystems). If one or more database name is given as arguments then only containers in those database are printed. For every container the range of the keys is also printed after container name. The range normally starts with 1, but for empty containers the range will be [0:0].
- Example
-
% CfgUtils ListCont Orc
Orc/OrcCPMask:Default [1:7]
Orc/OrcConfig:Default [1:103]
Orc/RdfFileIdentifier:OrcCycles [1:23]
Orc/RdfFileIdentifier:OrcCyles [1:2]
Orc/CfgMap:Default [1:17]
Orc/CfgMap:Orc [1:140]
Orc/CfgRuntypeList:Default [1:738]
The command "ListKeys" prints the list of the configuration keys in the specified container.
- Usage
-
CfgUtils 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). Remaining parameters specify the keys to print, it can be a list of number or the words "last" or "all". In case of numbers only the specified keys are printed. If it is "last", then the last key is printed. In case of "all" every key in the container is printed.
When the common option -q is given to the command then only the key value itself is printed. Without -q and -v options the key and object "metadata" is printed (see example below.) With -v option the contents of the object is printed also (using the print() method of the object).
- Example
-
% CfgUtils -i ROOT ListKeys orc OrcConfig:Default last
103
type : OrcConfigR
created : Thu Jul 29 22:38:08 2004 (local time) 0 ns
by user : boyd@bbr-dev103
comment : Based on key 101, crate mask adds 40000000
The command "DumpMap" prints the contents of the configuration map object.
- Usage
-
CfgUtils DumpMap [-r|--runtype-simple] database container key
- Description
-
The command prints the contents of the configuration map object. 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.
The map content is printed in a format more suitable for scripting compared to "ListKeys" command. Each line of an output has the "link name" followed by the corresponding object reference. If the map is a runtype list (container name is CfgRuntypeList:Default) and option -r is given then the list of runtypes with the corresponding top keys is printed.
- Example
-
% CfgUtils DumpMap top CfgTopMap last
Dch Dch/CfgMap:Dch[278]
Dct Dct/CfgMap:Dct[35]
Glt Glt/CfgMap:Glt[24]
L3D L3D/CfgMap:L3D[34]
Orc Orc/CfgMap:Orc[138]
Trg Trg/CfgMap:Trg[256]
% CfgUtils DumpMap -r orc CfgRuntypeList:Default last
BACKGROUND 5307
BACKGROUND_L1PASSTHRU 5308
COSMICS 5309
COSMICS_DCH_PROBLEM 5310
COSMICS_L1PASSTHRU 5311
COSMICS_NODCH 5312
COSMICS_PULSERS 5313
DAQTESTS 5314
PHYSICS 5315
PHYSICS_DCHWF 5316
...
The command "FindInTree" finds the configuration object given the top key an path to the object.
- Usage
-
CfgUtils FindInTree top-key path
- Description
-
The command finds the configuration object given the top key an path to the object. The top-key parameter is the top configuration key, number. The path parmeter id the path from the top map to the configutration object (e.g. "Orc/OrcConfigP"). If the object is found then its metadata is printed. Otherwise non-zero code is returned.
- Example
-
% CfgUtils FindInTree 5000 Orc/OrcConfigP
object : Orc/OrcConfig:Default[102]
type : OrcConfigP
created : Sun Jul 18 20:01:33 2004 (local time) 0 ns
by user : boyd@bbr-dev100
comment : Based on key 99, crate mask removes 40000000
The command "DumpTree" prints the contents of the configuration database as a tree.
- Usage
-
CfgUtils DumpTree [-m|--map] database container key
- Description
-
The command prints the configuration tree. The root of the tree is the object (usually map) determined 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.
- Example
-
% CfgUtils DumpTree -m top CfgTopMap last
/: Top/CfgTopMap[5332]
/Dch/: Dch/CfgMap:Dch[278]
/Dch/CalConfigType: Dch/CalConfigType[7]
/Dch/DchCalCycles: Dch/RdfFileIdentifier:DchCalCycles[216]
/Dct/: Dct/CfgMap:Dct[35]
/Dct/BltMask: Dct/L1DBltMask:Default[1]
/Dct/BltPtdConfig: Dct/RdfFileIdentifier:DctBltPtdConfig[4]
/Dct/BltZpdSimpleConfig: Dct/L1DBltZpdSimpleConfig:Default[1]
/Dct/TsfConfig: Dct/L1DTsfConfig:Default[1]
/Dct/TsfLut: Dct/L1DTsf6BitLutArray:Default[1]
/Dct/ZpdBasicLut: Dct/L1DZpdBasicLut:Default[1]
/Dct/ZpdDecisionModLut: Dct/L1DZpdDecisionModLut:Default[1]
/Glt/: Glt/CfgMap:Glt[24]
/Glt/L1GltConfig: Glt/L1GltConfig:Default[9]
/L3D/: L3D/CfgMap:L3D[34]
/L3D/Config: L3D/L3DConfig:Default[6]
/L3D/Geom: L3D/L3DGeom:Default[4]
/L3D/L3EChannelMask: L3D/L3EChannelMask:Default[4]
/L3D/T2D: L3D/L3DT2D:Default[8]
/L3D/TrkList: L3D/L3DTrkList:Default[4]
/Orc/: Orc/CfgMap:Orc[138]
/Orc/OrcCPMask: Orc/OrcCPMask:Default[1]
/Orc/OrcConfigP: Orc/OrcConfig:Default[103]
/Orc/OrcCycles: Orc/RdfFileIdentifier:OrcCycles[3]
/Trg/: Trg/CfgMap:Trg[256]
/Trg/tcf: Trg/CfgFileData:TrgConfig[145]
/Trg/tcl: Trg/CfgFileData:L3Trigger/L3TPatches.tcl[30]
The command "DiffTrees" compares two or more configuration trees and prints differences between them.
- Usage
-
CfgUtils DiffTrees [-d|--diffs-only] database container key ...
- Description
-
The command compares two or more configuration trees and prints differences between them.
- Example
-
% CfgUtils DiffTrees -d top CfgTopMap 1000 1001
/ Top/CfgTopMap 1000 1001
/Emt Emt/CfgMap:Emt 104 105
/Emt/AxConfig Emt/L1EmtAxRecord:AxConfig 28 29
/Trg Trg/CfgMap:Trg 108 109
/Trg/tcf Trg/CfgFileData:TrgConfig 34 35
The command "ListDbs" prints the list of databases (subsystems) defined in alias database.
- Usage
-
CfgUtils ListAliasDbs
- Description
-
The command prints the list of subsystem names existing in given implementation.
- Example
-
% CfgUtils ListAliasDbs
Dch
Dct
Drc
Emc
Emt
Fct
Glt
Ifr
L3D
Orc
Svt
Top
Trg
The command "ListAliasCont" prints the list of the containers in the alias databases.
- Usage
-
CfgUtils ListAliasCont [database ...]
- Description
-
The command prints the list of containers. Without arguments it prints containers for all databases (subsystems). If one or more database name is given as arguments then only containers in those databases are printed.
- Example
-
% CfgUtils ListAliasCont Orc
Orc/OrcConfig:Default
Orc/RdfFileIdentifier:OrcCycles
Orc/CfgMap:Orc
Orc/OrcCPMask:Default
Orc/CfgRuntypeList:Default
The command "ListAliases" prints the list of aliases defined in the alias database.
- Usage
-
CfgUtils ListAliases database [container]
- Description
-
The command prints the list of aliases. Without container argument it prints aliases for all containers in a database (subsystem). If container name is given as argument then only aliases in that container are printed.
- Example
-
% CfgUtils ListAliases Orc OrcConfig:Default
Container: OrcConfig:Default
CFG_BACKGROUND
CFG_COSMICS
CFG_DCH_CALIB
CFG_DRC_CALIB
CFG_EMC_CALIB
CFG_EMT_CALIB
CFG_IFR_CALIB
CFG_PHYSICS
CFG_SVT_CALIB
The command "DumpAliasTree" prints the contents of the alias database as a tree.
- Usage
-
CfgUtils DumpAliasTree [-m|--map] database container [alias]
- 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 alias parameter specifies the alias to print. If it is omitted or is "all" than all aliases are printed.
Starting with the alias object specified by the database, container, and alias 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
-
% CfgUtils -i MySQL 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
/Dct/BltZpdSimpleConfig: Dct/L1DBltZpdSimpleConfig:Default[BLTZPDCONFIG_PHYSICS] = 1
/Dct/TsfConfig: Dct/L1DTsfConfig:Default[TSFCONFIG_PHYSICS] = 1
/Dct/TsfLut: Dct/L1DTsf6BitLutArray:Default[TSF_6bitLUT_PHYSICS] = 1
/Dct/ZpdBasicLut: Dct/L1DZpdBasicLut:Default[ZPDBASICLUT_PHYSICS] = 1
/Dct/ZpdDecisionModLut: Dct/L1DZpdDecisionModLut:Default[ZPDDECMODLUT_PHYSICS] = 1
/Drc/: Drc/CfgMap:Drc[DRC_PHYSICS]
/Drc/DetCont/: Drc/CfgMap:DetCont[DETCONT_PHYSICS]
/Drc/DetCont/DRC:SC_0:X: Drc/OdcConfigFile:DRC:SC_0:X[SC_X_DEF] = 1
/Drc/DetCont/DRC:SC_10:X: Drc/OdcConfigFile:DRC:SC_10:X[SC_X_DEF] = 1
...
The command "DiffAliasTrees" compares two or more alias trees and prints differences between them.
- Usage
-
CfgUtils DiffAliasTrees [-d|--diffs-only] database container aliases ...
- Description
-
The command compares two or more alias trees and prints differences between them.
- Example
-
% CfgUtils DiffAliasTrees -d top CfgTopMap TOP_PHYSICS TOP_PHYSICS_ZTRIGGER
/ Top/CfgTopMap TOP_PHYSICS TOP_PHYSICS_ZTRIGGER
/Trg Trg/CfgMap:Trg TRG_PHYSICS TRG_PHYSICS_ZTRIGGER
/Trg/tcf Trg/CfgFileData:TrgConfig TCF_PHYSICS TCF_PHYSICS_ZTRIGGER
The command "MakeDb" creates new database (subsystem).
- Usage
-
CfgUtils MakeDb [-n|--num-only] database description
- Description
-
The command creates new database (subsystem). Without -n option it will create new database in both configuration (numeric) database and alias database. With -n option it will skip alias database. Normally you have to create database before doing anything in it.
- Example
-
% CfgUtils MakeDb Orc "ORC configuration database"
The command "MakeCont" creates new container.
- Usage
-
CfgUtils MakeCont [-n|--num-only] database container description
- Description
-
The command creates new container. Without -n option it will create new container in both configuration (numeric) database and alias database. With -n option it will skip alias database. Normally you have to create container before doing anything in it, but some tools like CfgCopyDb can make new containers if needed.
- Example
-
% CfgUtils MakeCont Orc OrcConfig:Default "Orc/OrcConfig:Default container"
The command "EditAlias" modifies the contents of the alias database.
- Usage
-
CfgUtils EditAlias [-c string|-f file] [database]
- Description
-
The command modifies the contents of the alias database. 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. If database argument is given then the default database name is set to this argument. Note that old BdbCfgTool required database argument, while this new command does not and it can work with multiple databases.
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
-
% CfgUtils EditAlias -f dch.alias
The command "VerifyAlias" verifies the contents of the alias database.
- Usage
-
CfgUtils VerifyAlias
- Description
-
The command checks the consistency on the contents of alias database and reports any observed inconsistencies.
- Example
-
% CfgUtils VerifyAlias
Following problems were observed during verification:
NOALIAS: alias Top/CfgTopMap[TOP_COSMICS_PULSERS] -> Trg =
Trg/CfgMap:Trg[TRG_COSMICS_PULSERS] does not exist
The command "UpdateTree" updates numeric tree from alias tree.
- Usage
-
CfgUtils UpdateTree [-s systems] [-n] [-m email] [-d coment] system
- Description
-
This commands builds the numeric trees from the alias trees. It starts from the "run type" 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 system 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 runtypes in all subsystems. If you want to rebuild only one or few subsystems' runtypes you can specify it with the -s option which takes a comma-separated list of subsystems. 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. Option -d allows to attach a brief description to the mail message.
- Example
-
% CfgUtils UpdateTree dch
Rebuilding runtypes for all subsystems
Opening databases
Comparing trees in Dch
Comparing trees in Dct
Comparing trees in Drc
Comparing trees in Emc
Comparing trees in Emt
Comparing trees in Glt
Comparing trees in Ifr
Comparing trees in Orc
Comparing trees in Svt
Updating trees in Dch
Updating trees in Dct
Updating trees in Drc
Updating trees in Emc
Updating trees in Emt
Updating trees in Glt
Updating trees in Ifr
Updating trees in Svt
Updating trees in Orc
Following top keys were created: 5333 5334
Update was successful
The command "EditRuntypes" modifies runtypes lists.
- Usage
-
CfgUtils EditRuntypes [-r] [-d comment] database [runtype] [top-key]
- Description
-
The command works with the runtype list of single subsystem database, whose name is given by database parameter. There are four different uses of this command which depend on the arguments and options you give to it:
- If you omit both runtype name and top key then it will print the list of the runtypes and their corresponding top keys.
- If you give it only runtype name without top key and without -r option, it will print the top key corresponding to that runtype.
- If you give it -r option and runtype name but no top key, it will remove given runtype from the list.
- If you give it runtype name and top key, it will make new runtype and assign given top key to it.
Any other combination of the input parameters is incorrect and will cause an error.
NOTE: The EditRuntypes 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
-
% CfgUtils EditRuntypes top
Apr2000-Cfg 950
Apr2001-Cfg 1003
Apr2002-Cfg 1315
Apr2003-Cfg 2137
Apr2004-Cfg 3303
Aug2000-Cfg 951
Aug2001-Cfg 1112
...
% CfgUtils EditRuntypes top Apr2000-Cfg
950
% CfgUtils EditRuntypes -r top Apr2000-Cfg
% CfgUtils EditRuntypes top Apr2000-Cfg 950
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. There is also a default database name which you can specify on the command line or with the command "database zzz" which is used when object id does not have database. Examples:
top/CfgTopMap[1261]
dch/RdfFileIdentifier: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/CfgTopMap[TOP_PHYSICS]
dch/RdfFileIdentifier: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/CfgMap:Dch[117] -> DchCalCycles
dch/CfgMap:Dch[DCH_PHYS] -> DchCalCycles
In the EditAlias 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.
In the commands description below the quoted strings, such as '[' or '->', represent literal strings. Unquoted strings represent tokens that should be replaced with some values, such as database names, containers, keys, etc. The parts of the commands in square brackets are optional.
EditAlias commands
Following operations are supported:
- 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 EditAlias understands.
Set default database
EditAlias has a notion of default database name which is used when database name is not specified. Default database name can be set from the command line, as the only parameter to EditAlias command, and can be changed with this command.
- Format
-
'database' DB
- Description
In the command database is the literal string (used without quotes), and DB is the database (subsystem) name.
- Example
database dch
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
-
[db '/'] container '[' alias ']' '=' key
or
[db '/'] 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. You can use word '_LAST_' instead of the numeric key to signify the last key in that container.
- Example
dch/RdfFileIdentifier: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
[db '/'] 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. Because this command is used only to make links inside one subsystem, the database name on the right hand is omitted and it is assumed to be the same on the left side.
In second case when the container name is missing on the left hand, it is assumed to be 'CfgMap:Sys', where 'Sys' is the capitalized default 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.
- Example
database svt
CfgMap:RunConfig[PHYSICS] -> Data = SvtRunConfig:Default[PHYSICS]
SVT_PHYS -> RunConfig = CfgMap:RunConfig[PHYSICS]
# above is equivalent to svt/CfgMap:Svt[SVT_PHYS] -> RunConfig = ...
Make a link from top database
This makes new link from top alias folders to subsystem alias trees.
- Format
top_alias '->' Sys '=' sys_alias
- Description
The command 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 (Sys) must be a canonical name of the subsystem. The 'sys_alias' is the subsystem-level alias name.
- Example
TOP_PHYSICS -> Svt = SVT_PHYS
# above is equivalent to:
# top/CfgTopMap[TOP_PHYSICS] -> Svt = svt/CfgMap:Svt[SVT_PHYS]
Make a runtype
This makes new link from the runtype alias folder to top alias trees.
- Format
Sys '->' run_type '=' top_alias
- Description
This command makes an alias (_CURRENT_) for runtype list for given subsystem if necessary and defines a runtype in this runtype list as a link to given top_alias.
- Example
Orc -> PHYSICS = TOP_PHYSICS
# above is equivalent to:
# orc/CfgRuntypeList:Default[_CURRENT_] -> PHYSICS = top/CfgTopMap[TOP_PHYSICS]
Copy alias in ordinary subsystem
This copies the contents of one alias into other alias, possibly creating this other alias.
- Format
[db '/'] container1 '[' alias1 ']' '=' alias2
or
alias1 '=' alias2
- Description
Both hands of the assignment are the alias specifications. 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 'CfgMap:Sys', where 'Sys' is the capitalized subsystem name. This container holds subsystem-level configuration maps, so the second forms is for copying 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
# make 'SVT_COSM' alias a copy of 'SVT_PHYS' alias with few changes
database svt
SvtRunConfig:Default[COSMIC] = 100
CfgMap:RunConfig[COSMIC] = PHYSICS
CfgMap:RunConfig[COSMIC] -> Data = SvtRunConfig:Default[COSMIC]
SVT_COSM = SVT_PHYS
SVT_COSM -> RunConfig = CfgMap: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
Note: for this command the default databse must be set to 'top' (otherwise it will be interpreted as a system-level alias copy in default databse.)
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
database top
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' [db '/'] 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 CfgMap:Sys) or top alias in the top database (container CfgTopMap). Deleting alias does not remove references to this alias from other folder aliases, all references should be cleared manually.
- Example
database svt
delete CfgMap:RunConfig[COSMIC]
delete SVT_COSM
# previous command is equivalent to delete svt/CfgMap:Svt[SVT_COSM]
database top
delete TOP_COSMICS
# previous command is equivalent to delete top/CfgTopMap[TOP_COSMICS]
Delete link from the folder alias
This command removes the link from the folder alias.
- Format
'delete' [db '/'] 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 CfgMap:Sys) or top alias in the top database (container CfgTopMap).
- Example
database svt
delete CfgMap:RunConfig[COSMIC] -> Data
delete SVT_COSM -> RunConfig
# previous command is equivalent to delete svt/CfgMap:Svt[SVT_COSM] -> RunConfig
database top
delete TOP_COSMICS -> Svt
# previous command is equivalent to delete top/CfgTopMap[TOP_COSMICS] -> Svt
Example subsystem configurations
- dch.alias
# can be omitted if you run EditAlias with dch as argument
database dch
# define leaf aliases for different object types/run types
RdfFileIdentifier:DchCalCycles[PHYSICS] = 104
RdfFileIdentifier:DchCalCycles[WAVEFORM] = 149
RdfFileIdentifier:DchCalCycles[DEBUG] = 162
CalConfigType[PHYSICS] = 7
# define Dch subsystem alias for PHYSICS run type
DCH_PHYSICS -> DchCalCycles = RdfFileIdentifier:DchCalCycles[PHYSICS]
DCH_PHYSICS -> CalConfigType = CalConfigType[PHYSICS]
# define Dch subsystem alias for run types with Dch waveforms
DCH_WAVEFORM = DCH_PHYSICS
DCH_WAVEFORM -> DchCalCycles = RdfFileIdentifier:DchCalCycles[WAVEFORM]
# define Dch subsystem alias for run types with Dch debugging
DCH_DEBUG = DCH_PHYSICS
DCH_DEBUG -> DchCalCycles = RdfFileIdentifier:DchCalCycles[DEBUG]
- drc.alias
# can be omitted if you run EditAlias with drc as argument
database drc
# in DRC different objects live in the same containers, so this needs special care
# like defining strange alias names for these objects
RdfFileIdentifier:DrcRegisters[ROM_0] = 103
RdfFileIdentifier:DrcRegisters[ROM_1] = 104
RdfFileIdentifier:DrcRegisters[ROM_2] = 105
RdfFileIdentifier:DrcRegisters[ROM_3] = 106
RdfFileIdentifier:DrcRegisters[ROM_4] = 107
RdfFileIdentifier:DrcRegisters[ROM_5] = 108
CfgMap:Drc FEE Registers[PHYSICS] -> ROM 0 = RdfFileIdentifier:DrcRegisters[ROM_0]
CfgMap:Drc FEE Registers[PHYSICS] -> ROM 1 = RdfFileIdentifier:DrcRegisters[ROM_1]
CfgMap:Drc FEE Registers[PHYSICS] -> ROM 2 = RdfFileIdentifier:DrcRegisters[ROM_2]
CfgMap:Drc FEE Registers[PHYSICS] -> ROM 3 = RdfFileIdentifier:DrcRegisters[ROM_3]
CfgMap:Drc FEE Registers[PHYSICS] -> ROM 4 = RdfFileIdentifier:DrcRegisters[ROM_4]
CfgMap:Drc FEE Registers[PHYSICS] -> ROM 5 = RdfFileIdentifier:DrcRegisters[ROM_5]
# this is quite straightforward
OdcConfigFile:DRC:SC_0:X[PHYSICS] = 1
OdcConfigFile:DRC:SC_1:X[PHYSICS] = 1
OdcConfigFile:DRC:SC_2:X[PHYSICS] = 1
OdcConfigFile:DRC:SC_3:X[PHYSICS] = 1
OdcConfigFile:DRC:SC_4:X[PHYSICS] = 1
OdcConfigFile:DRC:SC_5:X[PHYSICS] = 1
OdcConfigFile:DRC:SC_6:X[PHYSICS] = 1
OdcConfigFile:DRC:SC_7:X[PHYSICS] = 1
OdcConfigFile:DRC:SC_8:X[PHYSICS] = 1
OdcConfigFile:DRC:SC_9:X[PHYSICS] = 1
OdcConfigFile:DRC:SC_10:X[PHYSICS] = 1
OdcConfigFile:DRC:SC_11:X[PHYSICS] = 1
CfgMap:DetCont[PHYSICS] -> DRC:SC_0:X = OdcConfigFile:DRC:SC_0:X[PHYSICS]
CfgMap:DetCont[PHYSICS] -> DRC:SC_1:X = OdcConfigFile:DRC:SC_1:X[PHYSICS]
CfgMap:DetCont[PHYSICS] -> DRC:SC_2:X = OdcConfigFile:DRC:SC_2:X[PHYSICS]
CfgMap:DetCont[PHYSICS] -> DRC:SC_3:X = OdcConfigFile:DRC:SC_3:X[PHYSICS]
CfgMap:DetCont[PHYSICS] -> DRC:SC_4:X = OdcConfigFile:DRC:SC_4:X[PHYSICS]
CfgMap:DetCont[PHYSICS] -> DRC:SC_5:X = OdcConfigFile:DRC:SC_5:X[PHYSICS]
CfgMap:DetCont[PHYSICS] -> DRC:SC_6:X = OdcConfigFile:DRC:SC_6:X[PHYSICS]
CfgMap:DetCont[PHYSICS] -> DRC:SC_7:X = OdcConfigFile:DRC:SC_7:X[PHYSICS]
CfgMap:DetCont[PHYSICS] -> DRC:SC_8:X = OdcConfigFile:DRC:SC_8:X[PHYSICS]
CfgMap:DetCont[PHYSICS] -> DRC:SC_9:X = OdcConfigFile:DRC:SC_9:X[PHYSICS]
CfgMap:DetCont[PHYSICS] -> DRC:SC_10:X = OdcConfigFile:DRC:SC_10:X[PHYSICS]
CfgMap:DetCont[PHYSICS] -> DRC:SC_11:X = OdcConfigFile:DRC:SC_11:X[PHYSICS]
RdfFileIdentifier:DrcCycles[PHYSICS] = 25
CfgMap:Drc Cycles[PHYSICS] -> Adc truncated FX = RdfFileIdentifier:DrcCycles[PHYSICS]
# define subsystem alias for DRC
DRC_PHYSICS -> Drc FEE Registers = CfgMap:Drc FEE Registers[PHYSICS]
DRC_PHYSICS -> DetCont = CfgMap:DetCont[PHYSICS]
DRC_PHYSICS -> Drc Cycles = CfgMap:Drc Cycles[PHYSICS]
Top aliases
- top.alias
# can be omitted if you run EditAlias with top as argument
database top
# 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
CfgFindKey
Find the top configuration key for given run type.
- Usage
-
CfgFindKey [-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
-
% CfgFindKey orc PHYSICS
5315
% CfgFindKey orc
BACKGROUND 5307
BACKGROUND_L1PASSTHRU 5308
COSMICS 5336
COSMICS_DCH_PROBLEM 5337
COSMICS_L1PASSTHRU 5338
COSMICS_NODCH 5339
DAQTESTS 5340
PHYSICS 5315
PHYSICS_DCHWF 5316
PHYSICS_DCH_PROBLEM 5317
PHYSICS_DCH_T1 5318
PHYSICS_DCH_T2 5319
PHYSICS_DCH_T3 5320
PHYSICS_DCH_T4 5321
PHYSICS_DCH_T5 5322
PHYSICS_EMCWF 5323
PHYSICS_L1PASSTHRU 5324
PHYSICS_LOWLUMI 5325
PHYSICS_SVT_PROBLEM 5326
PHYSICS_SVT_T1 5327
PHYSICS_SVT_T2 5328
PHYSICS_ZTRIGGER 5329
PHYSICS_ZTRIGGER_L1PASSTHRU 5330
PHYSICS_ZTRIGGER_NEWBLT 5331
CfgMCRuntypes
List Monte-Carlo runtypes.
- Usage
-
CfgMCRuntypes
- Description
-
This scripts prints the current runtype map in the Top database. This
map provides runtypes used by Monte-Carlo simulation.
- Example
-
% CfgMCRuntypes
Apr2000-Cfg 950
Apr2001-Cfg 1003
Apr2002-Cfg 1315
Apr2003-Cfg 2137
Apr2004-Cfg 3303
Aug2000-Cfg 951
Aug2001-Cfg 1112
Dec2001-Cfg 1217
Dec2002-Cfg 1888
Dec2003-Cfg 3060
Feb2000-Cfg 950
Feb2001-Cfg 939
Feb2002-Cfg 1265
Feb2003-Cfg 2110
Feb2004-Cfg 3142
Jan2002-Cfg 1232
Jan2003-Cfg 1978
Jan2004-Cfg 3094
Jul2000-Cfg 951
Jul2001-Cfg 1052
Jul2004-Cfg 4868
Jun2000-Cfg 951
Jun2001-Cfg 1023
Jun2002-Cfg 1459
Jun2003-Cfg 2199
Jun2004-Cfg 4249
Mar2000-Cfg 950
Mar2001-Cfg 962
Mar2002-Cfg 1261
Mar2003-Cfg 2137
Mar2004-Cfg 3303
May2000-Cfg 951
May2001-Cfg 1017
May2002-Cfg 1362
May2003-Cfg 2137
May2004-Cfg 3579
Nov2001-Cfg 1200
Nov2002-Cfg 1822
Nov2003-Cfg 3004
Oct2000-Cfg 951
Oct2001-Cfg 1171
Oct2003-Cfg 2137
SP2 1038
SP2-8.6.0 1037
Sep2000-Cfg 951
Sep2001-Cfg 1160
Sep2003-Cfg 2512
|