1 #include "EEMC_Reader.hh"
2 #include "../EVP/emcReader.h"
5 using namespace OLDEVP;
7 int EEMC_Reader::isEemcBankIn(
char type) {
24 assert(fiber>=0 && fiber <ETOW_MAXFEE);
25 return emc.etow_pre[fiber];
28 assert(fiber>=0 && fiber <=ESMD_MAXFEE);
38 u_short *EEMC_Reader::getEemcDataBlock(
int fiber,
char type) {
42 assert(fiber>=0 && fiber <ETOW_MAXFEE);
43 return emc.etow[fiber];
46 assert(fiber>=0 && fiber <=ESMD_MAXFEE);
47 return emc.esmd[fiber];
58 u_short EEMC_Reader::getEemcHead(
int fiber,
int channel,
char type) {
62 assert(channel>=0 && channel <ETOW_PRESIZE);
63 assert(fiber>=0 && fiber <ETOW_MAXFEE);
64 val=emc.etow_pre[fiber][channel];
67 assert(channel>=0 && channel <ESMD_PRESIZE);
68 assert(fiber>=0 && fiber <=ESMD_MAXFEE);
79 u_short EEMC_Reader::getEemcData(
int fiber,
int channel,
char type) {
83 assert(channel>=0 && channel <ETOW_DATSIZE);
84 assert(fiber>=0 && fiber <ETOW_MAXFEE);
85 val=emc.etow[fiber][channel];
88 assert(channel>=0 && channel <ESMD_DATSIZE);
89 assert(fiber>=0 && fiber <=ESMD_MAXFEE);
90 val=emc.esmd[fiber][channel];
105 #ifndef NEW_DAQ_READER_DAQLIB
106 OLDEVP::emcReader((
char*)datap);
110 daqReader *rdr=er->getDaqReader(); assert(rdr);
111 ::emcReader((
char*)rdr);
119 if (!pBankEEMCP->test_CRC()) printf(
"CRC error in EEMCP: %s %d\n",__FILE__,__LINE__) ;
127 pBankEEMCP->header.CRC = 0;
EEMC_Reader(EventReader *er, Bank_EEMCP *pEEMCP)
EEMC_Reader constructor.
u_short * getEemcHeadBlock(int fiber, char type)
EEMC_Reader destructor.
u_short esmd_pre[ESMD_MAXFEE][ESMD_PRESIZE]
ADC data.