For example, in order to extract the name of the optoboard to which a given module is connected, one can start at the node corresponding to that module and use the following prescription:
U=UP U=OB IDThe fields labelled "Define column ..." (in the table view of the CoralDB browser) allow to assign a title and specify the rule to be used for each column. Rules can be specified either by choosing from a set of predefined rules, or by entering the rule directly in the corresponding field.
If all the objects for which the table should be assembled have the same type, a predefined set of rules defined specifically for that type of object is available. To use this feature you need to use the selector "Search only objects of type" when searching for the primary objects to be included into the table.
The information to be displayed for a given type of object will often be similar. As a starting point, you can choose one of the predefined tables from a pulldown menu (again, to see predefined tables you need to use the selector "Search only objects of type"). After you click "Update table", the corresponding table definition will be filled in and the default table will have been created. You can then modify this definition as desired.
Some commands may lead to several nodes. In this case, rule processing continues for each of the nodes, and each of the selected paths can result in some output. Thus the corresponding cell in the table will contain more than one entry which will be displayed on several lines.
The following commands are available.
ID | Output ID of current node |
TYPE | Output type of current node |
SLOT | Name of SLOT on current node that was used to arrive at current node |
FROMID | ID of node from which one arrived at the current node |
FROMSLOT | Name of SLOT used on node from which one arrived at the current node |
NU | Number of upward connections |
NU!n | Error message if number of upward connections is not equal to n |
NU>n | Error message if number of upward connections is not greater than n |
NU<n | Error message if number of upward connections is not less than n |
ND | Number of downward connections |
ND!n | Error message if number of downward connections is not equal to n |
ND>n | Error message if number of downward connections is not greater than n |
ND<n | Error message if number of downward connections is not less than n |
"word" | Write out a word (can not contain any white space) |
A=convention | Output alias for convention of current node (no output if no such alias exists) |
A!convention | Output alias for convention of current node (output error if no such alias exists) |
U=slot, U!slot | Go up using slot |
UF=slot, UF!slot | Go up using connection from slot |
D=slot, D!slot | Go down using slot |
DE=slot, DE!slot | Go down using connection to slot |
T=type, T!type | Go to node(s) of type type (both up and down nodes are searched) |
TU=type, TU!type | Go to node(s) of type type (only up nodes are searched) |
TD=type, TD!type | Go to node(s) of type type (only down nodes are searched) |
HTMLBOLD | Write subsequent text in bold font |
HTMLITALIC | Write subsequent text in italic font |
HTMLRED | Write subsequent text in red |
Rule | Sample output | Description |
ID | D1A_B01_S1_M1 | ID of current object |
U=UP A=GEOID | SQP-A12-OP-C2-P4L-T | Name of parent node using GEOID alias |
U=UP A=GEOI | No output, because A= is used and there is no alias GEOI | |
U=UP A!GEOI | ERROR: No alias for convention GEOI for D1A_B01_S1 | Error, because A! is used and there is no alias GEOI |
U=UP D=% FROMSLOT | M1 M2 M3 M4 M5 M6 | List of outgoing slots on parent node |
T=PP0 T=% TYPE | CONTAINER OPTOBOARD HV-PP1 LV-PP1 OPTO-PP1 MODULE MODULE MODULE MODULE MODULE MODULE | List of the type of all objects connected to a PP0 (which is the parent of a module; you could equally use U=UP instead of T=PP0) |
U=UP U=OB T=RODBOC ID T=RODCRATE ID | ROD_C1_S11 ROD_CRATE_1 | Get ROD slot and crate (note that you can output several pieces of information in the same rule) |
It is possible to build a table for primary objects with different types. In this case only a number of generic rules is available. This is also true for object types where no predefined rules (or tables) are available.
Predefined tables are used as a starting point to preset the column contents. Afterwards, the table can be further customized as desired.
Predefined rules and tables are stored in configuration files in package CoralDB in subdirectory rules with file names of the form TYPE.rules (definition of rules for objects of type TYPE) and TYPE-TABLENAME.table (definition of a table TABLENAME for objects of type TYPE). The first column in the file is the name of the rule or the column title. The second column is separated by a single tab character ('\t') and contains the rule or column definition. To define the column contents, both the names of rules defined for that type of object and individual commands as described above may be used.