AlcapDAQ  1
Data Structures | Macros | Functions | Variables
s500.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <time.h>
#include "midas.h"
#include "crate.h"
#include "mcstd.h"
#include "odb_wrapper.h"
#include "diag.h"

Go to the source code of this file.

Data Structures

struct  s500
 

Macros

#define N_CH_S500   6
 
#define MAX_S500   8
 

Functions

INT s500_bor ()
 
INT s500_read (char *pevent)
 
INT s500_bor1 (struct s500 *s500)
 

Variables

struct readout_module s500_module
 
struct s500 s500 [MAX_S500]
 

Macro Definition Documentation

#define MAX_S500   8

Definition at line 41 of file s500.cpp.

#define N_CH_S500   6

Definition at line 31 of file s500.cpp.

Referenced by s500_bor1().

Function Documentation

INT s500_bor ( )
INT s500_bor1 ( struct s500 s500)

Definition at line 49 of file s500.cpp.

References s500::acum, camo(), s500::crate, crate_number, i, N_CH_S500, odb_get_int(), s500::odb_name, s500::slot, and SUCCESS.

50 {
51  // Get the VME base address of the module
52  s500->crate = odb_get_int("/Equipment/Crate %d/Settings/%s/Crate",
53  crate_number, s500->odb_name);
54  s500->slot = odb_get_int("/Equipment/Crate %d/Settings/%s/Slot",
55  crate_number, s500->odb_name);
56 
57  // clear all channels
58  for(int i = 0; i < N_CH_S500; i++) {
59  camo(s500->crate, s500->slot, i, 9, 0);
60  }
61 
62  // clear the accumulated values
63  for(int i = 0; i < N_CH_S500; i++) {
64  s500->acum[i] = 0;
65  }
66 
67  return SUCCESS;
68 }
INT s500_read ( char *  pevent)

Variable Documentation

struct s500 s500[MAX_S500]

Definition at line 42 of file s500.cpp.

struct readout_module s500_module
Initial value:
= {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}

Definition at line 18 of file s500.cpp.