Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
21 return StatusCode::SUCCESS;
29 if (
inputFile.find(
".txt") == std::string::npos &&
inputFile.find(
".bin") == std::string::npos)
32 return StatusCode::FAILURE;
39 if (
inputFile.find(
".txt") != std::string::npos)
45 return StatusCode::FAILURE;
49 while (
file >> std::hex >> cache)
51 testVector.push_back(cache);
63 return StatusCode::FAILURE;
67 while (
file.read(
reinterpret_cast<char *
>(&cache),
sizeof(
uint64_t)))
70 cache = __builtin_bswap64(cache);
71 testVector.push_back(cache);
78 return StatusCode::SUCCESS;
85 std::vector<uint64_t>::size_type
size = -1;
87 if (tv_1.size() != tv_2.size())
89 ATH_MSG_WARNING(
"The two test vectors have different sizes: " << tv_1.size() <<
" and " << tv_2.size());
91 size = tv_1.size() < tv_2.size() ? tv_1.size() : tv_2.size();
95 ATH_MSG_DEBUG(
"The two test vectors have the same size: " << tv_1.size());
100 for (std::vector<uint64_t>::size_type
i = 0;
i <
size;
i++)
102 if (tv_1[
i] != tv_2[
i])
104 ATH_MSG_DEBUG(
"The two test vectors are different at index " <<
i);
118 return StatusCode::SUCCESS;
123 ATH_MSG_DEBUG(
"Comparing the FPGA output to the reference vector for " << tvHolder.
name);
125 std::vector<uint64_t>::size_type
size = -1;
127 if (tvHolder.
refTV.size() != tv_comp.size())
129 ATH_MSG_WARNING(
"The two test vectors have different sizes: " << tvHolder.
refTV.size() <<
" and " << tv_comp.size());
131 size = tvHolder.
refTV.size() < tv_comp.size() ? tvHolder.
refTV.size() : tv_comp.size();
140 for (std::vector<uint64_t>::size_type
i = 0;
i <
size;
i++)
142 if (tvHolder.
refTV[
i] != tv_comp[
i])
144 ATH_MSG_DEBUG(
"The two test vectors are different at index " <<
i);
158 return StatusCode::SUCCESS;
180 unsigned int isLast = 0;
181 for (
unsigned int i = 0;
i < pixelClusters->
size();
i++)
185 pixelClusters->
at(
i)->identifierHash(),
194 unsigned int rdoListSize = pixelClusters->
at(
i)->rdoList().size();
195 rdoListSize = rdoListSize > 4 ? 4 : rdoListSize;
196 for (
unsigned int j = 0; j < rdoListSize; j++)
198 rdoList[j] = pixelClusters->
at(
i)->rdoList().at(j).get_compact();
219 pixelClusters->
at(
i)->localPosition<2>()(1, 0),
220 pixelClusters->
at(
i)->channelsInPhi(),
221 pixelClusters->
at(
i)->channelsInEta(),
222 pixelClusters->
at(
i)->widthInEta()
230 pixelClusters->
at(
i)->localCovariance<2>()(1, 1),
238 pixelClusters->
at(
i)->globalPosition()[1],
247 isLast =
i == (pixelClusters->
size() - 1) ? 1 : 0;
249 pixelClusters->
at(
i)->totalToT(),
268 return StatusCode::SUCCESS;
290 unsigned int isLast = 0;
291 for (
unsigned int i = 0;
i < stripClusters->
size();
i++)
295 stripClusters->
at(
i)->identifierHash(),
304 unsigned int rdoListSize = stripClusters->
at(
i)->rdoList().size();
305 rdoListSize = rdoListSize > 4 ? 4 : rdoListSize;
306 for (
unsigned int j = 0; j < rdoListSize; j++)
308 rdoList[j] = stripClusters->
at(
i)->rdoList().at(j).get_compact();
330 stripClusters->
at(
i)->localCovariance<1>()(0, 0),
336 stripClusters->
at(
i)->globalPosition()[1],
337 stripClusters->
at(
i)->channelsInPhi(),
346 isLast =
i == (stripClusters->
size() - 1) ? 1 : 0;
366 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
std::vector< uint64_t > refTV
std::pair< float, float > computeOmegas(const xAOD::PixelCluster &cluster, const PixelID &pixelID)
::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.