46 #include "StDaqLib/GENERIC/EventReader.hh"
50 using namespace OLDEVP;
59 memset((
char *)banks, 0,
sizeof(banks));
62 int TPCV2P0_ADCR_SR::initialize()
65 padkr = detector->getPADKReader(sector);
66 if (!padkr)
return FALSE;
69 for(
int rcb = 0; rcb < 6; rcb++)
71 for(
int mz = 0; mz < 3; mz++)
73 banks[rcb][mz] = detector->getBankTPCADCR(sector,rcb,mz);
79 TPCV2P0_ADCR_SR::~TPCV2P0_ADCR_SR()
84 int TPCV2P0_ADCR_SR::getPadList(
int PadRow, u_char **padList)
92 for(i=1; i<=TPC_MAXPADS; i++)
94 padkr->get(PadRow, i, &ent);
95 if((ent.mz == 0) || (ent.rb == 0))
continue;
96 padlist[PadRow-1][j++] = i;
99 *padList = &padlist[PadRow-1][0];
103 int TPCV2P0_ADCR_SR::getSequences(
int PadRow,
int Pad,
int *nArray,
107 padkr->get(PadRow, Pad, &ent);
108 if((ent.mz == 0) || (ent.rb == 0))
116 int offset = ent.offset * padkr->getADCBytes();
117 *nArray = padkr->getADCBytes();
121 if (banks[ent.rb-1][ent.mz-1] != NULL)
123 *Array = (((u_char *)banks[ent.rb-1][ent.mz-1]->ADC) + offset);
129 int TPCV2P0_ADCR_SR::MemUsed()
143 memset((
char *)banks, 0,
sizeof(banks));
147 int TPCV2P0_PEDR_SR::initialize()
150 padkr = detector->getPADKReader(sector);
151 if (!padkr)
return FALSE;
154 for(
int rcb = 0; rcb < 6; rcb++)
156 for(
int mz = 0; mz < 3; mz++)
158 banks[rcb][mz] = detector->getBankTPCPEDR(sector,rcb,mz);
159 if (banks[rcb][mz] !=NULL)
160 numEvents = banks[rcb][mz]->NumEvents;
166 TPCV2P0_PEDR_SR::~TPCV2P0_PEDR_SR()
171 int TPCV2P0_PEDR_SR::getPadList(
int PadRow, u_char **padList)
179 for(i=1; i<=TPC_MAXPADS; i++)
181 padkr->get(PadRow, i, &ent);
182 if((ent.mz == 0) || (ent.rb == 0))
continue;
183 padlist[PadRow-1][j++] = i;
186 *padList = &padlist[PadRow-1][0];
190 int TPCV2P0_PEDR_SR::getSequences(
int PadRow,
int Pad,
int *nArray,
194 padkr->get(PadRow, Pad, &ent);
195 if((ent.mz == 0) || (ent.rb == 0))
203 int offset = ent.offset * padkr->getPEDBytes();
204 *nArray = padkr->getPEDBytes();
206 if (banks[ent.rb-1][ent.mz-1] != NULL)
210 *Array = (((u_char *)banks[ent.rb-1][ent.mz-1]->pedestal) + offset);
216 int TPCV2P0_PEDR_SR::getNumberOfEvents()
221 int TPCV2P0_PEDR_SR::MemUsed()
236 memset((
char *)banks, 0,
sizeof(banks));
241 int TPCV2P0_PRMS_SR::initialize()
244 padkr = detector->getPADKReader(sector);
245 if (!padkr)
return FALSE;
248 for(
int rcb = 0; rcb < 6; rcb++)
250 for(
int mz = 0; mz < 3; mz++)
252 banks[rcb][mz] = detector->getBankTPCRMSR(sector,rcb,mz);
253 if (banks[rcb][mz] !=NULL)
254 numEvents = banks[rcb][mz]->NumEvents;
260 TPCV2P0_PRMS_SR::~TPCV2P0_PRMS_SR()
265 int TPCV2P0_PRMS_SR::getPadList(
int PadRow, u_char **padList)
273 for(i=1; i<=TPC_MAXPADS; i++)
275 padkr->get(PadRow, i, &ent);
276 if((ent.mz == 0) || (ent.rb == 0))
continue;
277 padlist[PadRow-1][j++] = i;
280 *padList = &padlist[PadRow-1][0];
284 int TPCV2P0_PRMS_SR::getSequences(
int PadRow,
int Pad,
int *nArray,
288 padkr->get(PadRow, Pad, &ent);
289 if((ent.mz == 0) || (ent.rb == 0))
297 int offset = ent.offset * padkr->getRMSBytes();
298 *nArray = padkr->getRMSBytes();
300 if (banks[ent.rb-1][ent.mz-1] != NULL)
304 *Array = (((u_char *)banks[ent.rb-1][ent.mz-1]->pedRMSt16) + offset);
310 int TPCV2P0_PRMS_SR::getNumberOfEvents()
315 int TPCV2P0_PRMS_SR::MemUsed()