dmap library - dmap_write


This module implements the functions to modify the detector map.

Index


Initialization function

The implementation of the detector map is based on a global variable, hidden in the library. Proper initialization is needed before any access to it.

Two functions can be used (alternatively):

dmap_load()
See the dmap module.
dmap_new()
This function initializes the detector map, sets the board types according to the GeoVme informations and sets all the channel to empty.
Should be called before any other function in the library!

Syntax:
int dmap_new(void);
Returns:
DMAP_ERROR_OK in case of success


Change functions

The following functions change the contents of the detector map:
dmap_set()
Associate the physical address to the FEE address.

Syntax:
int dmap_set(unsigned char chain, unsigned char crate, unsigned char slot, unsigned char chan, DMAP_CHAN_EL data);
Parameters:
IN: chain,crate,slot,chan
the FEE address
IN: data
the pysical address
Returns:
DMAP_ERROR_OK in case of success
dmap_clear()
Clear the association between any physical address and the FEE address.

Syntax:
int dmap_clear(unsigned char chain, unsigned char crate, unsigned char slot, unsigned char chan);
Parameters:
IN: chain,crate,slot,chan
the FEE address
Returns:
DMAP_ERROR_OK in case of success
Change functions specific type:


Save function

This function write the detector map in a file readable by
dmap_load.

dmap_write()
Syntax:
int dmap_write(char *filename, char *system_name);
Parameters:
IN: filename
file name to which write the data
(relative to the current directory, *.map file names recomended)
IN: system_name
the name of the experiment
(i.e. "System Test")
Returns:
DMAP_ERROR_OK in case of success


Examples

An example can be found among the
conversion programs present in this package.

Here is the links to the source code:


Top of the page. dmap library
Send comments to: Igor Sfiligoi

Created:10.4.1997
Last modified:18.8.1997