 |
ATLAS Offline Software
|
Go to the documentation of this file.
20 return StatusCode::SUCCESS;
28 if (
inputFile.find(
".txt") == std::string::npos &&
inputFile.find(
".bin") == std::string::npos)
31 return StatusCode::FAILURE;
38 if (
inputFile.find(
".txt") != std::string::npos)
44 return StatusCode::FAILURE;
48 while (
file >> std::hex >> cache)
50 testVector.push_back(cache);
62 return StatusCode::FAILURE;
66 while (
file.read(
reinterpret_cast<char *
>(&cache),
sizeof(
uint64_t)))
69 cache = __builtin_bswap64(cache);
70 testVector.push_back(cache);
77 return StatusCode::SUCCESS;
84 std::vector<uint64_t>::size_type
size = -1;
86 if (tv_1.size() != tv_2.size())
88 ATH_MSG_WARNING(
"The two test vectors have different sizes: " << tv_1.size() <<
" and " << tv_2.size());
90 size = tv_1.size() < tv_2.size() ? tv_1.size() : tv_2.size();
94 ATH_MSG_DEBUG(
"The two test vectors have the same size: " << tv_1.size());
99 for (std::vector<uint64_t>::size_type
i = 0;
i <
size;
i++)
101 if (tv_1[
i] != tv_2[
i])
103 ATH_MSG_DEBUG(
"The two test vectors are different at index " <<
i);
117 return StatusCode::SUCCESS;
122 ATH_MSG_DEBUG(
"Comparing the FPGA output to the reference vector for " << tvHolder.
name);
124 std::vector<uint64_t>::size_type
size = -1;
126 if (tvHolder.
refTV.size() != tv_comp.size())
128 ATH_MSG_WARNING(
"The two test vectors have different sizes: " << tvHolder.
refTV.size() <<
" and " << tv_comp.size());
130 size = tvHolder.
refTV.size() < tv_comp.size() ? tvHolder.
refTV.size() : tv_comp.size();
139 for (std::vector<uint64_t>::size_type
i = 0;
i <
size;
i++)
141 if (tvHolder.
refTV[
i] != tv_comp[
i])
143 ATH_MSG_DEBUG(
"The two test vectors are different at index " <<
i);
157 return StatusCode::SUCCESS;
179 unsigned int isLast = 0;
180 for (
unsigned int i = 0;
i < pixelClusters->
size();
i++)
184 pixelClusters->
at(
i)->identifierHash(),
193 unsigned int rdoListSize = pixelClusters->
at(
i)->rdoList().size();
194 rdoListSize = rdoListSize > 4 ? 4 : rdoListSize;
195 for (
unsigned int j = 0; j < rdoListSize; j++)
197 rdoList[j] = pixelClusters->
at(
i)->rdoList().at(j).get_compact();
218 pixelClusters->
at(
i)->localPosition<2>()(1, 0),
219 pixelClusters->
at(
i)->channelsInPhi(),
220 pixelClusters->
at(
i)->channelsInEta(),
221 pixelClusters->
at(
i)->widthInEta()
227 pixelClusters->
at(
i)->localCovariance<2>()(1, 1),
235 pixelClusters->
at(
i)->globalPosition()[1],
244 isLast =
i == (pixelClusters->
size() - 1) ? 1 : 0;
246 pixelClusters->
at(
i)->totalToT(),
265 return StatusCode::SUCCESS;
287 unsigned int isLast = 0;
288 for (
unsigned int i = 0;
i < stripClusters->
size();
i++)
292 stripClusters->
at(
i)->identifierHash(),
301 unsigned int rdoListSize = stripClusters->
at(
i)->rdoList().size();
302 rdoListSize = rdoListSize > 4 ? 4 : rdoListSize;
303 for (
unsigned int j = 0; j < rdoListSize; j++)
305 rdoList[j] = stripClusters->
at(
i)->rdoList().at(j).get_compact();
327 stripClusters->
at(
i)->localCovariance<1>()(0, 0),
333 stripClusters->
at(
i)->globalPosition()[1],
334 stripClusters->
at(
i)->channelsInPhi(),
343 isLast =
i == (stripClusters->
size() - 1) ? 1 : 0;
363 return StatusCode::SUCCESS;
std::vector< uint64_t > refTV
::StatusCode StatusCode
StatusCode definition for legacy code.
#define ATH_MSG_WARNING(x)
const T * at(size_type n) const
Access an element, as an rvalue.
size_type size() const noexcept
Returns the number of elements in the collection.