46 #include "StDaqLib/GENERIC/EventReader.hh"
51 using namespace OLDEVP;
60 memset((
char *)banks, 0,
sizeof(banks));
63 int TPCV1P0_ADCR_SR::initialize()
66 padkr = detector->getPADKReader(sector);
67 if (!padkr)
return FALSE;
70 for(
int rcb = 0; rcb < 6; rcb++)
72 for(
int mz = 0; mz < 3; mz++)
74 banks[rcb][mz] = detector->getBankTPCADCR(sector,rcb,mz);
80 TPCV1P0_ADCR_SR::~TPCV1P0_ADCR_SR()
85 int TPCV1P0_ADCR_SR::getPadList(
int PadRow, u_char **padList)
93 for(i=1; i<=TPC_MAXPADS; i++)
95 padkr->get(PadRow, i, &ent);
96 if((ent.mz == 0) || (ent.rb == 0))
continue;
97 padlist[PadRow-1][j++] = i;
100 *padList = &padlist[PadRow-1][0];
104 int TPCV1P0_ADCR_SR::getSequences(
int PadRow,
int Pad,
int *nArray,
108 padkr->get(PadRow, Pad, &ent);
109 if((ent.mz == 0) || (ent.rb == 0))
117 int offset = ent.offset * padkr->getADCBytes();
118 *nArray = padkr->getADCBytes();
122 if (banks[ent.rb-1][ent.mz-1] != NULL)
124 *Array = (((u_char *)banks[ent.rb-1][ent.mz-1]->ADC) + offset);
130 int TPCV1P0_ADCR_SR::MemUsed()
144 memset((
char *)banks, 0,
sizeof(banks));
148 int TPCV1P0_PEDR_SR::initialize()
151 padkr = detector->getPADKReader(sector);
152 if (!padkr)
return FALSE;
155 for(
int rcb = 0; rcb < 6; rcb++)
157 for(
int mz = 0; mz < 3; mz++)
159 banks[rcb][mz] = detector->getBankTPCPEDR(sector,rcb,mz);
160 if (banks[rcb][mz] !=NULL)
161 numEvents = banks[rcb][mz]->NumEvents;
167 TPCV1P0_PEDR_SR::~TPCV1P0_PEDR_SR()
172 int TPCV1P0_PEDR_SR::getPadList(
int PadRow, u_char **padList)
180 for(i=1; i<=TPC_MAXPADS; i++)
182 padkr->get(PadRow, i, &ent);
183 if((ent.mz == 0) || (ent.rb == 0))
continue;
184 padlist[PadRow-1][j++] = i;
187 *padList = &padlist[PadRow-1][0];
191 int TPCV1P0_PEDR_SR::getSequences(
int PadRow,
int Pad,
int *nArray,
195 padkr->get(PadRow, Pad, &ent);
196 if((ent.mz == 0) || (ent.rb == 0))
204 int offset = ent.offset * padkr->getPEDBytes();
205 *nArray = padkr->getPEDBytes();
207 if (banks[ent.rb-1][ent.mz-1] != NULL)
211 *Array = (((u_char *)banks[ent.rb-1][ent.mz-1]->pedestal) + offset);
217 int TPCV1P0_PEDR_SR::getNumberOfEvents()
222 int TPCV1P0_PEDR_SR::MemUsed()
237 memset((
char *)banks, 0,
sizeof(banks));
242 int TPCV1P0_PRMS_SR::initialize()
245 padkr = detector->getPADKReader(sector);
246 if (!padkr)
return FALSE;
249 for(
int rcb = 0; rcb < 6; rcb++)
251 for(
int mz = 0; mz < 3; mz++)
253 banks[rcb][mz] = detector->getBankTPCRMSR(sector,rcb,mz);
254 if (banks[rcb][mz] !=NULL)
255 numEvents = banks[rcb][mz]->NumEvents;
261 TPCV1P0_PRMS_SR::~TPCV1P0_PRMS_SR()
266 int TPCV1P0_PRMS_SR::getPadList(
int PadRow, u_char **padList)
274 for(i=1; i<=TPC_MAXPADS; i++)
276 padkr->get(PadRow, i, &ent);
277 if((ent.mz == 0) || (ent.rb == 0))
continue;
278 padlist[PadRow-1][j++] = i;
281 *padList = &padlist[PadRow-1][0];
285 int TPCV1P0_PRMS_SR::getSequences(
int PadRow,
int Pad,
int *nArray,
289 padkr->get(PadRow, Pad, &ent);
290 if((ent.mz == 0) || (ent.rb == 0))
298 int offset = ent.offset * padkr->getRMSBytes();
299 *nArray = padkr->getRMSBytes();
301 if (banks[ent.rb-1][ent.mz-1] != NULL)
305 *Array = (((u_char *)banks[ent.rb-1][ent.mz-1]->pedRMSt16) + offset);
311 int TPCV1P0_PRMS_SR::getNumberOfEvents()
316 int TPCV1P0_PRMS_SR::MemUsed()