5#ifndef DERIVATIONFRAMEWORK_EVENTINFOPIXELMODULESTATUSMONITORING_H
6#define DERIVATIONFRAMEWORK_EVENTINFOPIXELMODULESTATUSMONITORING_H
13#include "GaudiKernel/ToolHandle.h"
14#include "AthLinks/ElementLink.h"
20#include "Identifier/Identifier.h"
41 using base_class::base_class;
43 virtual StatusCode
initialize()
override final;
44 virtual StatusCode
addBranches(
const EventContext& ctx)
const override final;
49 {
this,
"DecorationPrefix",
"",
"" };
52 {
this,
"ContainerName",
"EventInfo",
""};
55 {
this,
"ReadKeyeTemp",
"PixelDCSTempCondData",
"Key of input sensor temperature conditions folder"};
58 {
this,
"ReadKeyHV",
"PixelDCSHVCondData",
"Key of input bias voltage conditions folder"};
61 {
this,
"PixelDCSStateCondData",
"PixelDCSStateCondData",
"Pixel FSM state key"};
64 {
this,
"PixelDCSStatusCondData",
"PixelDCSStatusCondData",
"Pixel FSM status key"};
67 {
this,
"PixelDeadMapCondData",
"PixelDeadMapCondData",
"Pixel deadmap conditions key"};
70 {
this,
"PixelConditionsSummaryTool",
"PixelConditionsSummaryTool",
"Tool for PixelConditionsSummaryTool"};
73 {
this,
"PixelByteStreamErrs",
"PixelByteStreamErrs",
"PixelByteStreamErrs container key"};
76 {
this,
"UseByteStreamFEI4",
true,
"Switch of the ByteStream error for FEI4"};
78 {
this,
"UseByteStreamFEI3",
true,
"Switch of the ByteStream error for FEI3"};
80 {
this,
"UseByteStreamRD53",
false,
"Switch of the ByteStream error for RD53"};
93 {
this,
"PixelDetElStatusActiveOnly",
"",
"Key of SiDetectorElementStatus for Pixel which reflects only whether modules or chips are active rather than delivering good data"};
99 if (!pixelDetElStatus.
isValid()) {
100 std::stringstream
msg;
101 msg <<
"Failed to get " << key.key() <<
" from StoreGate in " << name();
102 throw std::runtime_error(
msg.str());
105 return pixelDetElStatus;
120 const IDCInDetBSErrContainer &bsErrorContainer,
121 const IdentifierHash &moduleIdHash,
127 constexpr uint64_t missingErrorInfo{std::numeric_limits<uint64_t>::max()-3000000000};
129 return word < missingErrorInfo ? word : 0;
Store pixel HV data in PixelDCSHVData.
Store pixel DCS module state in PixelDCSStateData.
Store pixel DCS module status in PixelDCSStatusData.
Store pixel temperature data in PixelDCSTempData.
This is an Identifier helper class for the Pixel subdetector.
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::ReadHandle< InDet::SiDetectorElementStatus > getPixelDetElStatus(const SG::ReadHandleKey< InDet::SiDetectorElementStatus > &key, const EventContext &ctx) const
const PixelID * m_pixelID
SG::ReadCondHandleKey< PixelDeadMapCondData > m_condDeadMapKey
unsigned int m_readoutTechnologyMask
ToolHandle< IInDetConditionsTool > m_pixelSummary
std::vector< SG::WriteDecorHandleKey< xAOD::EventInfo > > m_moduleBSErrKeys
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
virtual StatusCode initialize() override final
std::atomic_uint m_lbCounter
SG::ReadCondHandleKey< PixelDCSStatusData > m_condDCSStatusKey
SG::ReadCondHandleKey< PixelDCSTempData > m_readKeyTemp
Gaudi::Property< bool > m_useByteStreamFEI4
SG::ReadCondHandleKey< PixelDCSHVData > m_readKeyHV
std::vector< SG::WriteDecorHandleKey< xAOD::EventInfo > > m_moduleFEmaskKeys
SG::ReadHandleKey< IDCInDetBSErrContainer > m_idcErrContKey
virtual StatusCode addBranches(const EventContext &ctx) const override final
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_pixelDetElStatusActiveOnly
Gaudi::Property< bool > m_useByteStreamFEI3
Gaudi::Property< bool > m_useByteStreamRD53
std::vector< SG::WriteDecorHandleKey< xAOD::EventInfo > > m_moduleConditionKeys
Gaudi::Property< std::string > m_prefix
SG::ReadCondHandleKey< PixelDCSStateData > m_condDCSStateKey
T retrieve(size_t i) const
Retrieve the value of the hash, if accessible according to the mask.
This is an Identifier helper class for the Pixel subdetector.
Property holding a SG store/key/clid from which a ReadHandle is made.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
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...
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...
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.