ATLAS Offline Software
LArBadFebMaskingTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LARCELLREC_LArBadFebMaskingTool_H
6 #define LARCELLREC_LArBadFebMaskingTool_H
7 
23 
32 #include <atomic>
33 
34 class CaloCell_ID;
35 class LArOnlineID;
36 class LArFebErrorSummary;
37 
39  : public extends<AthAlgTool, ICaloCellMakerTool>
40 {
41 public:
42 
46  using base_class::base_class;
47 
48 
51  virtual StatusCode initialize() override;
52 
55  virtual StatusCode finalize() override;
56 
59  virtual StatusCode process (CaloCellContainer * theCellContainer,
60  const EventContext& ctx) const override;
61 
62  private:
63 
66  SG::ReadCondHandleKey<LArBadFebCont> m_badFebKey{this,"BadFebKey","LArBadFeb","Key of Bad-Feb object"};
69  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
70 
73  Gaudi::Property<bool> m_maskParity{this,"maskParity",true};
74  Gaudi::Property<bool> m_maskSampleHeader{this,"maskSampleHeader",true};
75  Gaudi::Property<bool> m_maskEVTID{this,"maskEVTID",true};
76  Gaudi::Property<bool> m_maskScacStatus{this,"maskScacStatus",true};
77  Gaudi::Property<bool> m_maskScaOutOfRange{this,"maskScaOutOfRange",true};
78  Gaudi::Property<bool> m_maskGainMismatch{this,"maskGainMismatch",true};
79  Gaudi::Property<bool> m_maskTypeMismatch{this,"maskTypeMismatch",true};
80  Gaudi::Property<bool> m_maskNumOfSamples{this,"maskNumOfSamples",true};
81  Gaudi::Property<bool> m_maskEmptyDataBlock{this,"maskEmptyDataBlock",true};
82  Gaudi::Property<bool> m_maskDspBlockSize{this,"maskDspBlockSize",true};
83  Gaudi::Property<bool> m_maskCheckSum{this,"maskCheckSum",true};
84  Gaudi::Property<bool> m_maskMissingHeader{this,"maskMissingHeader",true};
85  Gaudi::Property<bool> m_maskBadGain{this,"maskBadGain",true};
86 
87  SG::ReadHandleKey<LArFebErrorSummary> m_larFebErrorSummaryKey{this,"FebErrorSummaryKey","LArFebErrorSummary"};
88  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this,"EventInfoKey","EventInfo"};
89  SG::WriteDecorHandleKey<xAOD::EventInfo> m_eventInfoDecorKey{this,"EventInfoDecorKey","EventInfo.larFlags"};
93 
96  const CaloCell_ID* m_calo_id=nullptr;
97  const LArOnlineID* m_onlineID=nullptr;
98 
101  mutable std::atomic<int> m_evt{0};
102 
105  mutable std::atomic<int> m_mask{0};
106 };
107 
108 #endif
109 
LArBadFebMaskingTool::m_maskScaOutOfRange
Gaudi::Property< bool > m_maskScaOutOfRange
Definition: LArBadFebMaskingTool.h:77
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::WriteDecorHandleKey< xAOD::EventInfo >
LArBadFebMaskingTool::m_eventInfoDecorKey
SG::WriteDecorHandleKey< xAOD::EventInfo > m_eventInfoDecorKey
Definition: LArBadFebMaskingTool.h:89
LArBadFebMaskingTool
Mask LAr cells in Febs with decoding errors or listed in the bad feb database.
Definition: LArBadFebMaskingTool.h:40
LArBadFebMaskingTool::m_maskParity
Gaudi::Property< bool > m_maskParity
flags to select which errors to mask
Definition: LArBadFebMaskingTool.h:73
LArBadFebMaskingTool::m_maskEmptyDataBlock
Gaudi::Property< bool > m_maskEmptyDataBlock
Definition: LArBadFebMaskingTool.h:81
LArBadFebMaskingTool::m_maskBadGain
Gaudi::Property< bool > m_maskBadGain
Definition: LArBadFebMaskingTool.h:85
LArBadFebMaskingTool::m_maskCheckSum
Gaudi::Property< bool > m_maskCheckSum
Definition: LArBadFebMaskingTool.h:83
LArBadFebMaskingTool::m_maskScacStatus
Gaudi::Property< bool > m_maskScacStatus
Definition: LArBadFebMaskingTool.h:76
SG::ReadHandleKey< LArFebErrorSummary >
LArBadChannelCont.h
LArBadFebMaskingTool::initialize
virtual StatusCode initialize() override
initialize the tool
Definition: LArBadFebMaskingTool.cxx:35
LArOnOffIdMapping.h
LArBadFebMaskingTool::m_calo_id
const CaloCell_ID * m_calo_id
pointers to identifier helpers
Definition: LArBadFebMaskingTool.h:96
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
LArBadFebMaskingTool::finalize
virtual StatusCode finalize() override
finalize the tool
Definition: LArBadFebMaskingTool.cxx:72
LArBadFebMaskingTool::process
virtual StatusCode process(CaloCellContainer *theCellContainer, const EventContext &ctx) const override
update theCellContainer, masking Feb with errors
Definition: LArBadFebMaskingTool.cxx:84
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
LArBadFebMaskingTool::m_maskMissingHeader
Gaudi::Property< bool > m_maskMissingHeader
Definition: LArBadFebMaskingTool.h:84
ReadCondHandleKey.h
LArBadFebMaskingTool::m_maskNumOfSamples
Gaudi::Property< bool > m_maskNumOfSamples
Definition: LArBadFebMaskingTool.h:80
LArBadFebMaskingTool::m_maskSampleHeader
Gaudi::Property< bool > m_maskSampleHeader
Definition: LArBadFebMaskingTool.h:74
LArOnlineID
Definition: LArOnlineID.h:20
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
EventInfo.h
ICaloCellMakerTool.h
LArBadFebMaskingTool::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: LArBadFebMaskingTool.h:88
SG::ReadCondHandleKey
Definition: ReadCondHandleKey.h:20
LArBadFebMaskingTool::m_maskTypeMismatch
Gaudi::Property< bool > m_maskTypeMismatch
Definition: LArBadFebMaskingTool.h:79
LArFebErrorSummary
Holds information from the FEB Error Summary.
Definition: LArFebErrorSummary.h:23
LArBadFebMaskingTool::m_maskEVTID
Gaudi::Property< bool > m_maskEVTID
Definition: LArBadFebMaskingTool.h:75
LArFebErrorSummary.h
LArBadFebMaskingTool::m_badFebKey
SG::ReadCondHandleKey< LArBadFebCont > m_badFebKey
handle to get bad febs
Definition: LArBadFebMaskingTool.h:66
LArBadFebMaskingTool::m_onlineID
const LArOnlineID * m_onlineID
Definition: LArBadFebMaskingTool.h:97
LArBadFebMaskingTool::m_maskDspBlockSize
Gaudi::Property< bool > m_maskDspBlockSize
Definition: LArBadFebMaskingTool.h:82
LArBadFebMaskingTool::m_mask
std::atomic< int > m_mask
Number of Feb masked.
Definition: LArBadFebMaskingTool.h:105
LArBadFebMaskingTool::m_maskGainMismatch
Gaudi::Property< bool > m_maskGainMismatch
Definition: LArBadFebMaskingTool.h:78
LArBadFebMaskingTool::m_larFebErrorSummaryKey
SG::ReadHandleKey< LArFebErrorSummary > m_larFebErrorSummaryKey
Definition: LArBadFebMaskingTool.h:87
LArBadFebMaskingTool::m_evt
std::atomic< int > m_evt
Number of events processed.
Definition: LArBadFebMaskingTool.h:101
LArBadFebMaskingTool::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
handle to LAr cabling
Definition: LArBadFebMaskingTool.h:69
LArBadFebMaskingTool::m_errorToMask
uint16_t m_errorToMask
compute bit mask of errors to mask
Definition: LArBadFebMaskingTool.h:92