6 namespace Phase2Tracker
12 bufferSize_(fedBufferSize)
15 LogTrace(
"Phase2TrackerFEDBuffer") <<
"content of buffer with size: "<<int(fedBufferSize)<<std::endl;
16 for (
size_t i = 0;
i < fedBufferSize;
i += 8)
19 LogTrace(
"Phase2TrackerFEDBuffer") <<
" word " << std::setfill(
' ') << std::setw(2) <<
i/8 <<
" | "
20 << std::hex << std::setw(16) << std::setfill(
'0') << word <<
std::dec << std::endl;
22 LogTrace(
"Phase2TrackerFEDBuffer") << std::endl;
51 size_t offsetBeginningOfChannel = 0;
54 std::vector<bool>::iterator FE_it;
59 for (FE_it = status.begin(); FE_it < status.end(); FE_it++)
65 uint16_t cbc_status =
static_cast<uint16_t
>(*(
payloadPointer_ + (offsetBeginningOfChannel^7))<<8);
66 cbc_status +=
static_cast<uint16_t
>(*(
payloadPointer_ + ((offsetBeginningOfChannel + 1)^7)));
73 if((cbc_status>>
i)&0x1)
94 for (FE_it = status.begin(); FE_it < status.end(); FE_it++)
101 uint8_t n_clusters =
static_cast<uint8_t
> (*(
payloadPointer_ + offsetBeginningOfChannel));
102 offsetBeginningOfChannel += 1;
106 offsetBeginningOfChannel += 2*n_clusters;
122 int words64 = (offsetBeginningOfChannel + 8 - 1)/8;
123 int payloadSize = words64 * 8;
138 std::ostringstream
ss;
139 ss <<
"[Phase2Tracker::Phase2TrackerFEDBuffer::"<<__func__<<
"] " <<
"\n";
140 ss <<
"FED Buffer Size does not match data => missing condition data? : " <<
"\n";
141 ss <<
"Expected Buffer Size " <<
bufferSize_ <<
" bytes" <<
"\n";
142 ss <<
"Computed Buffer Size " << bufferSize_ + bufferDiff <<
" bytes" <<
"\n";
153 std::ostringstream
ss;
154 ss <<
"[Phase2Tracker::Phase2TrackerFEDBuffer::"<<__func__<<
"] " <<
"\n";
155 ss <<
"FED Buffer Size does not match data => corrupted buffer? : " <<
"\n";
156 ss <<
"Expected Buffer Size " <<
bufferSize_ <<
" bytes" <<
"\n";
157 ss <<
"Computed Buffer Size " << bufferSize_ + bufferDiff <<
" bytes" <<
"\n";
166 std::map<uint32_t,uint32_t> cdata;
176 size = *
reinterpret_cast<const uint32_t*
>(pointer);
177 LogTrace(
"Phase2TrackerFEDBuffer") <<
"Condition Data size = " << size << std::endl;
180 while(pointer < stop)
186 data = *
reinterpret_cast<const uint32_t*
>(pointer);
190 for (
int i = 0,
j=3 ;
i<4;
i++,
j--)
191 { key += (*(pointer+
i) <<
j*8); }
197 if(cdata.size()!=
size) {
198 std::ostringstream
ss;
199 ss <<
"[Phase2Tracker::Phase2TrackerFEDBuffer::"<<__func__<<
"] " <<
"\n";
200 ss <<
"Number of condition data does not match the announced value!"<<
"\n";
201 ss <<
"Expected condition data Size " << size <<
" entries" <<
"\n";
202 ss <<
"Computed condition data Size " << cdata.size() <<
" entries" <<
"\n";
const uint8_t * condDataPointer_
static const int TRIGGER_SIZE
std::map< uint32_t, uint32_t > conditionData() const
const uint8_t * payloadPointer_
Phase2TrackerFEDHeader trackerHeader_
static const int MAX_CBC_PER_FE
const uint8_t * triggerPointer_
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
std::vector< Phase2TrackerFEDChannel > channels_
unsigned long long uint64_t
Phase2TrackerFEDBuffer(const uint8_t *fedBuffer, const size_t fedBufferSize)
~Phase2TrackerFEDBuffer()
FEDDAQTrailer daqTrailer_
const uint8_t * getPointerToPayload() const
static const int STRIPS_PER_CBC
static const int MAX_FE_PER_FED
static const int STRIPS_PADDING
tuple size
Write out results.
uint64_t read64(int offset, const uint8_t *buffer)
FEDReadoutMode readoutMode() const