|[ Intro | Pubs | RunInfo | Workbook | Software | SLACVX | Search ]|
To define new relations among data in the SLD event display system, you generally just need to add a DSPUSRR bank. (If the data being related is connected in some very obscure way, it may be necessary to write a new "relations routine," but for most cases, the existing eight generic relations routines can do the job.)
In discussing relations, a key concept is the PARENT. A display object's parent is the Jazelle bank that contains the data from which the object was drawn. For example, the draw routine PHDTNUM draws numbers at the end of tracks based on the PHTRK banks. So each number's parent is the relevant PHTRK bank. The draw routine DSPDMCT draws monte carlo tracks based on the MCPART banks. So each track's parent is the relevant MCPART bank.
When the DSPUSRT constants are set up, the name of the parent bank is stored in PATH. Then, when the draw routine is called, each object gets the pointer to its parent bank stored into DSPOBJ%(PARENT). Thus, when it comes time to do relations, for each object the display system has the parent bank's name and pointer. (Parent and path gets a little more complicated for "repeat block objects." See "Repeat Block Objects in the SLD Event Display System" for details.)
A DSPUSRR bank is simply a way of defining how one can get from the parent of one object type to the parent of its related object type. For example, the third DSPUSRR bank in PHUDSP CONSTANT defines how one relates PHPARTs to PHTRKs.
The way in which your two objects are connected can probably be handled by one of the above eight generic relations. But if this is not the case, you will have to write a new relations routine. The structure of such routines can vary greatly. The names of the routines that do the generic relations can be found in DSPRELT CONSTANT (look at RELATER). Take these routines as your examples and consider getting help from TONYJ. Once the routine is written, include it in DSPREFS PREPMNLB and make a new bank for it in DSPRELT CONSTANT.
When you run your job, pull in your new relations by issuing the IDA command DSP USERDATA followed by the filename of the file that contains the DSPUSRR banks.
For each DSP USERDATA statement, you should get a message telling you that the relation names have been loaded. If you then do DSP SHOW RELations, you should see your new relation names. If your new relations definitions don't appear, check whether you've correctly spelled the constant file name.
If DSP SHOW RELations shows your new relation definitions, you have succeeded. You may do the new relations via a DSP REL command. If you are using the display in 3D interactive mode, you can do the new relations from the data selection menu.
If you get into trouble, check that PARENT has been properly set in the draw routines and that PATH has been correctly defined in the DSPUSRT constants.