35 #include "StSvtHybridDaqData.hh"
36 #include "StSequence.hh"
37 #include "StDAQMaker/StSVTReader.h"
51 setHybridData(reader,option);
54 int StSvtHybridDaqData::setHybridData(
StSVTReader* reader,
const char* option)
62 int anode, n, status=0, ianode;
68 if ( !strncmp(option,
"RAW", strlen(
"RAW")) ) {
72 for (ianode=0;ianode<nAnodes;ianode++) {
75 seq[ianode].mAnode= anode;
76 status = reader->getRawADC(mBarrel, mLadder, mWafer, mHybrid, anode, n, array);
78 if (status != 1)
return status;
81 seq[ianode].resize(n);
83 for (
int iseq=0;iseq<n;iseq++) {
84 seq[ianode][iseq].startTimeBin = iseq;
85 seq[ianode][iseq].length = 128;
86 seq[ianode][iseq].firstAdc = array;
91 else if ( !strncmp(option,
"ZS", strlen(
"ZS")) ) {
95 nAnodes = reader->getAnodeList(mBarrel, mLadder, mWafer, mHybrid, array);
100 if (nAnodes < 0)
return nAnodes;
108 for (ianode=0;ianode<nAnodes;ianode++) {
110 anode = (int)array[ianode];
111 seq[ianode].mAnode= anode;
112 status = reader->getSequences(mBarrel, mLadder, mWafer, mHybrid, anode, n, tempseq);
114 if (status < 0)
return status;
116 seq[ianode].resize(n);
117 memcpy(&(seq[ianode][0]),tempseq,n*
sizeof(
StSequence));
121 mSCAZero = (
unsigned char)reader->getSCAZero();
122 mTimeZero = (
unsigned char)reader->getTimeZero();