ATLAS Offline Software
TileBadChanTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TILECONDITIONS_TILEBADCHANTOOL_H
6 #define TILECONDITIONS_TILEBADCHANTOOL_H
7 
8 // Tile includes
12 
13 // Calo includes
16 
17 // Athena includes
19 #include "Identifier/Identifier.h"
23 
24 #include <map>
25 #include <vector>
26 #include <string>
27 
28 class TileHWID;
30 
36 class TileBadChanTool: public extends<AthAlgTool, ITileBadChanTool, ICaloBadChanTool> {
37 
38  public:
39 
40  TileBadChanTool(const std::string& type, const std::string& name, const IInterface* parent);
41  virtual ~TileBadChanTool();
42 
43  virtual StatusCode initialize() override;
44  virtual StatusCode finalize() override;
45 
46  //===============================================================
47  //=== ICaloBadChanTool methods
48  //===============================================================
49 
55  virtual CaloBadChannel caloStatus(const EventContext& ctx,
56  Identifier cell_id) const override;
57 
58  //===============================================================
59  //=== ITileBadChanTool methods
60  //===============================================================
61 
62  const TileBchStatus& getAdcStatus(IdentifierHash hash_id, unsigned int adc) const;
63 
67  virtual const TileBchStatus& getAdcStatus(const HWIdentifier& adc_id, const EventContext& ctx) const override;
68 
72  virtual const TileBchStatus& getAdcStatus(const HWIdentifier& adc_id) const override;
73 
77  virtual const TileBchStatus& getAdcStatus(unsigned int drawerIdx
78  , unsigned int channel
79  , unsigned int adc
80  , const EventContext& ctx) const override;
84  virtual const TileBchStatus& getAdcStatus(unsigned int drawerIdx
85  , unsigned int channel
86  , unsigned int adc) const override;
87 
88  const TileBchStatus& getChannelStatus(IdentifierHash hash_id) const;
89 
93  virtual const TileBchStatus& getChannelStatus(const HWIdentifier& channel_id, const EventContext& ctx) const override;
94 
98  virtual const TileBchStatus& getChannelStatus(const HWIdentifier& channel_id) const override;
99 
103  virtual const TileBchStatus& getChannelStatus(unsigned int drawerIdx, unsigned int channel, const EventContext& ctx) const override;
104 
108  virtual const TileBchStatus& getChannelStatus(unsigned int drawerIdx, unsigned int channel) const override;
109 
110  virtual uint32_t encodeStatus(const TileBchStatus& status) const override;
111 
115  virtual const std::vector<float>& getTripsProbabilities(unsigned int ros, const EventContext& ctx) const override;
116 
120  virtual const std::vector<float>& getTripsProbabilities(unsigned int ros) const override;
121 
125  virtual bool isDrawerMasked(unsigned int frag_id, const EventContext& ctx) const override;
126 
130  virtual bool isDrawerMasked(unsigned int frag_id) const override;
131 
132  private:
133 
138  "TileBadChannels", "TileBadChannels", "Input Tile bad channel status"};
139 
141 
144 
145  // dummy declarations just to make new gccreflex happy
147 
148  std::vector<float> m_defaultTripsProbs;
149 
150  std::vector<unsigned int> m_roses;
151  std::vector<unsigned int> m_drawers;
152 
153 };
154 
155 
156 #endif
TileBadChanTool::caloStatus
virtual CaloBadChannel caloStatus(const EventContext &ctx, Identifier cell_id) const override
Definition: TileBadChanTool.cxx:85
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
CaloBadChannel.h
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
ICaloBadChanTool::caloStatus
virtual CaloBadChannel caloStatus(const EventContext &ctx, Identifier id) const =0
TileBadChanTool::isDrawerMasked
virtual bool isDrawerMasked(unsigned int frag_id, const EventContext &ctx) const override
Check if Tile drawer is masked completely.
Definition: TileBadChanTool.cxx:264
TileBchStatus
Class holding bad channel problems.
Definition: TileBchStatus.h:20
TileBadChanTool::getTripsProbabilities
virtual const std::vector< float > & getTripsProbabilities(unsigned int ros, const EventContext &ctx) const override
Return trips probabilities for all Tile drawers.
Definition: TileBadChanTool.cxx:243
HWIdentifier
Definition: HWIdentifier.h:13
TileBadChanTool::getAdcStatus
const TileBchStatus & getAdcStatus(IdentifierHash hash_id, unsigned int adc) const
Definition: TileBadChanTool.cxx:145
TileBadChanTool::m_drawers
std::vector< unsigned int > m_drawers
Definition: TileBadChanTool.h:151
TileBadChanTool::TileBadChanTool
TileBadChanTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TileBadChanTool.cxx:27
TileHWID
Helper class for TileCal online (hardware) identifiers.
Definition: TileHWID.h:49
TileBadChanTool::getChannelStatus
const TileBchStatus & getChannelStatus(IdentifierHash hash_id) const
Definition: TileBadChanTool.cxx:161
TileBadChanTool::~TileBadChanTool
virtual ~TileBadChanTool()
Definition: TileBadChanTool.cxx:39
TileDetDescrManager
Definition: TileDetDescrManager.h:33
TileBadChanTool::m_tileHWID
const TileHWID * m_tileHWID
Definition: TileBadChanTool.h:142
TileBadChanTool::finalize
virtual StatusCode finalize() override
Definition: TileBadChanTool.cxx:75
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ICaloBadChanTool.h
AthAlgTool.h
TileBadChanTool::initialize
virtual StatusCode initialize() override
Definition: TileBadChanTool.cxx:46
createCoolChannelIdFile.channel_id
channel_id
Definition: createCoolChannelIdFile.py:52
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TileBadChanTool::m_tileMgr
const TileDetDescrManager * m_tileMgr
Definition: TileBadChanTool.h:140
TileBchStatus.h
maskDeadModules.ros
ros
Definition: maskDeadModules.py:35
TileBadChanTool::operator=
TileBadChanTool & operator=(const TileBadChanTool &)
ReadCondHandleKey.h
HWIdentifier.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
IdentifierHash.h
TileBadChanTool::m_roses
std::vector< unsigned int > m_roses
Definition: TileBadChanTool.h:150
TileBadChanTool::m_defaultTripsProbs
std::vector< float > m_defaultTripsProbs
Definition: TileBadChanTool.h:148
SG::ReadCondHandleKey< TileBadChannels >
TileBadChanTool::m_badChannelsKey
SG::ReadCondHandleKey< TileBadChannels > m_badChannelsKey
Name of TileBadChannels in condition store.
Definition: TileBadChanTool.h:137
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
TileBadChanTool
The tool to get Tile channel and ADC status.
Definition: TileBadChanTool.h:36
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TileBadChanTool::encodeStatus
virtual uint32_t encodeStatus(const TileBchStatus &status) const override
Definition: TileBadChanTool.cxx:239
CaloBadChannel
Definition: CaloBadChannel.h:8
TileBadChannels.h
merge.status
status
Definition: merge.py:17
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
ITileBadChanTool.h
TileBadChanTool::m_defaultStatus
TileBchStatus m_defaultStatus
Definition: TileBadChanTool.h:143
Identifier
Definition: IdentifierFieldParser.cxx:14