ATLAS Offline Software
PixelBSUtils.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef PIXELBSUTILS_H
5 #define PIXELBSUTILS_H
7 
8 namespace InDet {
16  inline unsigned int getBSErrorWord(const InDet::SiDetectorElementStatus &elementStatus,
17  const IDCInDetBSErrContainer &bsErrorContainer,
18  const IdentifierHash &moduleIdHash,
19  unsigned int index,
20  unsigned int readOutTechnologyMask = ( Pixel::makeReadoutTechnologyBit(InDetDD::PixelReadoutTechnology::FEI4)
22  {
23  if ( Pixel::matchingReadoutTechnology(elementStatus, moduleIdHash, readOutTechnologyMask )) {
24  constexpr uint64_t missingErrorInfo{std::numeric_limits<uint64_t>::max()-3000000000};
25  uint64_t word = static_cast<uint64_t>(bsErrorContainer.retrieve(index));
26  return word < missingErrorInfo ? word : 0;
27  }
28  else {
29  return 0;
30  }
31  }
32 }
33 #endif
PixelFEUtils.h
Pixel::matchingReadoutTechnology
bool matchingReadoutTechnology(const InDet::SiDetectorElementStatus &elementStatus, const IdentifierHash &moduleIdHash, unsigned int readOutTechnologyMask=(Pixel::makeReadoutTechnologyBit(InDetDD::PixelReadoutTechnology::FEI4)|(Pixel::makeReadoutTechnologyBit(InDetDD::PixelReadoutTechnology::FEI3))))
Check whether the readout technology of the specified module is contained in the given readout techno...
Definition: PixelFEUtils.h:70
max
#define max(a, b)
Definition: cfImp.cxx:41
index
Definition: index.py:1
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
IDCInDetBSErrContainer
IDC like storage for BS errors, TODO, customise implementation further so that we store int rather th...
Definition: IDCInDetBSErrContainer.h:19
Pixel::makeReadoutTechnologyBit
unsigned int makeReadoutTechnologyBit(InDetDD::PixelReadoutTechnology technology, unsigned int bit_val=1)
Create a word with a bit representing the given readout technology to the given value.
Definition: PixelFEUtils.h:60
InDetDD::PixelReadoutTechnology::FEI3
@ FEI3
InDet::getBSErrorWord
unsigned int getBSErrorWord(const InDet::SiDetectorElementStatus &elementStatus, const IDCInDetBSErrContainer &bsErrorContainer, const IdentifierHash &moduleIdHash, unsigned int index, unsigned int readOutTechnologyMask=(Pixel::makeReadoutTechnologyBit(InDetDD::PixelReadoutTechnology::FEI4)|(Pixel::makeReadoutTechnologyBit(InDetDD::PixelReadoutTechnology::FEI3))))
Retrieve the bytestream error word for the given module if the readout technology of the module is co...
Definition: PixelBSUtils.h:16
InDet::SiDetectorElementStatus
Definition: SiDetectorElementStatus.h:62
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
InDetDD::PixelReadoutTechnology::FEI4
@ FEI4
IdentifiableValueContainer::retrieve
T retrieve(size_t i) const
Retrieve the value of the hash, if accessible according to the mask.
Definition: IdentifiableValueContainer.h:104
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25