/************************************************/
/*                                              */
/* File        : dmap_write.h                   */
/* Description : detector map library           */
/*               write options                  */
/*                                              */
/* Author: Sfiligoi Igor                        */
/*                                              */
/* Created      : 07.04.1997                    */
/* Last modified: 18.08.1997                    */
/*                                              */
/************************************************/

#ifndef DMAP_WRITE_H
#define DMAP_WRITE_H

#include "dmap.h"

#ifdef __cplusplus
extern "C" {
#endif

/******************************************/
/*     Initialization functions           */
/******************************************/


/* creates a new empty map in memory (based on GeoVme) */
/* Is alternative to dmap_load */
int dmap_new(void);


/******************************************/
/*            Set function                */
/******************************************/

int dmap_set(unsigned char chain,	/* IN:  chain   */
	     unsigned char crate,   	/* IN:  crate   */
	     unsigned char slot,    	/* IN:  slot    */
	     unsigned char chan,    	/* IN:  channel */
	     DMAP_CHAN_EL  data);	/* IN:  new data */

/******************************************/
/*           Clear function               */
/******************************************/

int dmap_clear(unsigned char chain,	/* IN:  chain   */
	       unsigned char crate,   	/* IN:  crate   */
	       unsigned char slot,    	/* IN:  slot    */
	       unsigned char chan);    	/* IN:  channel */

/******************************************/
/*            Save function               */
/******************************************/

/* write the map in a way it can be reread */
int dmap_write(char *filename,     /* i.e. "../data/dmap.dat" */
	       char *system_name); /* i.e. "System Test" */

#ifdef __cplusplus
}
#endif


#endif /* DMAP_H */