ATLAS Offline Software
TileDigitsMonitorAlgorithm.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 TILEMONITORING_TILEDIGITSMONITORALGORITHM_H
6 #define TILEMONITORING_TILEDIGITSMONITORALGORITHM_H
7 
12 
17 
23 
24  public:
25 
27  virtual ~TileDigitsMonitorAlgorithm() = default;
28  virtual StatusCode initialize() override;
29  virtual StatusCode fillHistograms(const EventContext& ctx) const override;
30 
31  private:
32 
33  enum TileFragStatus {ALL_OK = 0, ALL_FF = 0x10, ALL_00 = 0x20, NO_FRAG = 0x40, NO_ROB = 0x80};
34 
37 
38  void checkCRC(bool isCalibMode, uint32_t crc32, uint32_t crcMask, int nDMU, int ros, int drawer) const;
39  StatusCode checkROD_CRC(const TileDQstatus* dqStatus, const EventContext& ctx) const;
40  bool checkCorruptedData(const std::vector<std::reference_wrapper<const std::vector<uint32_t>>>& headerWordsAll,
41  uint32_t fragStatus, int ros, int drawer, std::vector<std::vector<bool>>& corruptedData) const;
42  void checkBCID(const std::vector<std::reference_wrapper<const std::vector<uint32_t>>>& headerWordsAll,
43  uint32_t rodBCID, int ros, int drawer) const;
44 
45  Gaudi::Property<bool> m_fillPedestalDifference{this,
46  "fillPedestalDifference", true, "Fill pedestal difference between monitored pedestal and one from DB"};
47 
48  Gaudi::Property<bool> m_fillErrorsHistograms{this,
49  "fillErrorsHistograms", true, "Fill histograms per channel/gain with DMU, CRC, BCID errors"};
50 
51  Gaudi::Property<bool> m_fillPedestalHistograms{this,
52  "fillPedestalHistograms", true, "Fill histograms per channel/gain with pedestals"};
53 
54  Gaudi::Property<bool> m_fillHighFrequencyNoiseHistograms{this,
55  "fillHighFrequencyNoiseHistograms", true, "Fill histograms per channel/gain with HFN"};
56 
57  Gaudi::Property<bool> m_fillSamplesHistograms{this,
58  "fillSamplesHistograms", true, "Fill histograms per channel/gain with samples"};
59 
60  Gaudi::Property<bool> m_fillProfileHistograms{this,
61  "fillProfileHistograms", true, "Fill histograms per channel/gain with profile"};
62 
63  Gaudi::Property<bool> m_fillEventModule32Histograms{this,
64  "fillEventModule32Histograms", true, "Fill histograms per channel/gain with event number % 32"};
65 
66  Gaudi::Property<bool> m_fillCorrelationsHistograms{this,
67  "fillCorrelationsHistograms", true, "Fill histograms which are used to produce correlation and corvariance plots"};
68 
70  "TileDigitsContainer", "TileDigitsCnt", "Input Tile digits container key"};
71 
73  "TileRawChannelContainer", "", "Input Tile raw channel container key"};
74 
75  ToolHandle<TileCondToolNoiseSample> m_tileCondToolNoiseSample{this,
76  "TileCondToolNoiseSample", "TileCondToolNoiseSample", "Tile sample noise tool"};
77 
78  std::vector<int> m_meanSampleGroups;
79  std::vector<int> m_meanSampleProdGroups;
80  std::vector<std::vector<int>> m_crcGlobalGroups;
81  std::vector<std::vector<int>> m_crcErrGroups;
82  std::vector<std::vector<std::vector<int>>> m_bcidGroups;
83  std::vector<std::vector<std::vector<int>>> m_bcidErrGroups;
84  std::vector<std::vector<std::vector<int>>> m_errorsGroups;
85 
86  std::vector<std::vector<int>> m_pedGroups;
87  std::vector<std::vector<int>> m_hfnGroups;
88  std::vector<std::vector<int>> m_samplesGroups;
89  std::vector<std::vector<int>> m_profGroups;
90  std::vector<std::vector<int>> m_evtMod32Groups;
91 
92  static const int MAX_DMU{16};
93  bool m_is12bit{false};
95 };
96 
97 
98 #endif // TILEMONITORING_TILEDIGITSMONITORALGORITHM_H
TileDigitsMonitorAlgorithm::SINGLE_STB
@ SINGLE_STB
Definition: TileDigitsMonitorAlgorithm.h:35
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
TileDigitsMonitorAlgorithm::m_fillCorrelationsHistograms
Gaudi::Property< bool > m_fillCorrelationsHistograms
Definition: TileDigitsMonitorAlgorithm.h:66
TileDigitsMonitorAlgorithm::m_tileCondToolNoiseSample
ToolHandle< TileCondToolNoiseSample > m_tileCondToolNoiseSample
Definition: TileDigitsMonitorAlgorithm.h:75
TileDigitsMonitorAlgorithm::OK
@ OK
Definition: TileDigitsMonitorAlgorithm.h:35
TileCalibMonitorAlgorithm
Base class for Tile calibration runs monitoring.
Definition: TileCalibMonitorAlgorithm.h:21
TileDigitsMonitorAlgorithm::m_ADCmaxMinusEpsilon
float m_ADCmaxMinusEpsilon
Definition: TileDigitsMonitorAlgorithm.h:94
TileDigitsMonitorAlgorithm::NO_ROB
@ NO_ROB
Definition: TileDigitsMonitorAlgorithm.h:33
TileDigitsMonitorAlgorithm::MEMO_PAR
@ MEMO_PAR
Definition: TileDigitsMonitorAlgorithm.h:35
TileCalibMonitorAlgorithm::TileCalibMonitorAlgorithm
TileCalibMonitorAlgorithm(const std::string &name, ISvcLocator *svcLocator)
Definition: TileCalibMonitorAlgorithm.h:25
TileDigitsMonitorAlgorithm::m_fillEventModule32Histograms
Gaudi::Property< bool > m_fillEventModule32Histograms
Definition: TileDigitsMonitorAlgorithm.h:63
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TileDigitsMonitorAlgorithm::ALL_OK
@ ALL_OK
Definition: TileDigitsMonitorAlgorithm.h:33
TileDigitsMonitorAlgorithm::DOUBLE_STB
@ DOUBLE_STB
Definition: TileDigitsMonitorAlgorithm.h:35
TileDigitsMonitorAlgorithm::m_fillHighFrequencyNoiseHistograms
Gaudi::Property< bool > m_fillHighFrequencyNoiseHistograms
Definition: TileDigitsMonitorAlgorithm.h:54
TileDigitsMonitorAlgorithm::m_samplesGroups
std::vector< std::vector< int > > m_samplesGroups
Definition: TileDigitsMonitorAlgorithm.h:88
TileDigitsMonitorAlgorithm::m_fillPedestalDifference
Gaudi::Property< bool > m_fillPedestalDifference
Definition: TileDigitsMonitorAlgorithm.h:45
TileDigitsMonitorAlgorithm::m_meanSampleGroups
std::vector< int > m_meanSampleGroups
Definition: TileDigitsMonitorAlgorithm.h:78
TileDigitsMonitorAlgorithm::ALL_00
@ ALL_00
Definition: TileDigitsMonitorAlgorithm.h:33
TileDigitsMonitorAlgorithm::m_crcErrGroups
std::vector< std::vector< int > > m_crcErrGroups
Definition: TileDigitsMonitorAlgorithm.h:81
TileDigitsMonitorAlgorithm::m_fillPedestalHistograms
Gaudi::Property< bool > m_fillPedestalHistograms
Definition: TileDigitsMonitorAlgorithm.h:51
TileDigitsMonitorAlgorithm::checkCRC
void checkCRC(bool isCalibMode, uint32_t crc32, uint32_t crcMask, int nDMU, int ros, int drawer) const
Definition: TileDigitsMonitorAlgorithm.cxx:294
SG::ReadHandleKey< TileDigitsContainer >
TileCalibMonitorAlgorithm.h
Example_ReadSampleNoise.drawer
drawer
Definition: Example_ReadSampleNoise.py:39
TileDigitsMonitorAlgorithm::m_bcidGroups
std::vector< std::vector< std::vector< int > > > m_bcidGroups
Definition: TileDigitsMonitorAlgorithm.h:82
TileDigitsMonitorAlgorithm::TileFragStatus
TileFragStatus
Definition: TileDigitsMonitorAlgorithm.h:33
TileDigitsMonitorAlgorithm::m_hfnGroups
std::vector< std::vector< int > > m_hfnGroups
Definition: TileDigitsMonitorAlgorithm.h:87
TileDigitsMonitorAlgorithm::m_digitsContainerKey
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey
Definition: TileDigitsMonitorAlgorithm.h:69
TileDigitsMonitorAlgorithm::~TileDigitsMonitorAlgorithm
virtual ~TileDigitsMonitorAlgorithm()=default
TileDigitsMonitorAlgorithm::NO_FRAG
@ NO_FRAG
Definition: TileDigitsMonitorAlgorithm.h:33
TileDigitsMonitorAlgorithm::m_fillProfileHistograms
Gaudi::Property< bool > m_fillProfileHistograms
Definition: TileDigitsMonitorAlgorithm.h:60
TileRawChannelContainer.h
TileDigitsMonitorAlgorithm::m_errorsGroups
std::vector< std::vector< std::vector< int > > > m_errorsGroups
Definition: TileDigitsMonitorAlgorithm.h:84
TileDigitsMonitorAlgorithm
Definition: TileDigitsMonitorAlgorithm.py:1
TileDigitsMonitorAlgorithm::checkCorruptedData
bool checkCorruptedData(const std::vector< std::reference_wrapper< const std::vector< uint32_t >>> &headerWordsAll, uint32_t fragStatus, int ros, int drawer, std::vector< std::vector< bool >> &corruptedData) const
Definition: TileDigitsMonitorAlgorithm.cxx:429
TileDQstatus
Class that holds Data Quality fragment information and provides functions to extract the data quality...
Definition: TileDQstatus.h:49
TileCondToolNoiseSample.h
TileDigitsMonitorAlgorithm::TileDigiErrors
TileDigiErrors
Definition: TileDigitsMonitorAlgorithm.h:35
TileDigitsContainer.h
TileDigitsMonitorAlgorithm::m_pedGroups
std::vector< std::vector< int > > m_pedGroups
Definition: TileDigitsMonitorAlgorithm.h:86
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthMonitorAlgorithm.h
TileDigitsMonitorAlgorithm::m_rawChannelContainerKey
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
Definition: TileDigitsMonitorAlgorithm.h:72
maskDeadModules.ros
ros
Definition: maskDeadModules.py:35
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
TileDigitsMonitorAlgorithm::m_meanSampleProdGroups
std::vector< int > m_meanSampleProdGroups
Definition: TileDigitsMonitorAlgorithm.h:79
ReadCondHandleKey.h
TileDigitsMonitorAlgorithm::ALL_FF
@ ALL_FF
Definition: TileDigitsMonitorAlgorithm.h:33
TileDigitsMonitorAlgorithm::HEADER_PAR
@ HEADER_PAR
Definition: TileDigitsMonitorAlgorithm.h:35
TileDigitsMonitorAlgorithm::checkROD_CRC
StatusCode checkROD_CRC(const TileDQstatus *dqStatus, const EventContext &ctx) const
Definition: TileDigitsMonitorAlgorithm.cxx:387
TileDigitsMonitorAlgorithm::checkBCID
void checkBCID(const std::vector< std::reference_wrapper< const std::vector< uint32_t >>> &headerWordsAll, uint32_t rodBCID, int ros, int drawer) const
Definition: TileDigitsMonitorAlgorithm.cxx:532
TileDigitsMonitorAlgorithm::NO_RECO_FRAG
@ NO_RECO_FRAG
Definition: TileDigitsMonitorAlgorithm.h:36
TileDigitsMonitorAlgorithm::m_crcGlobalGroups
std::vector< std::vector< int > > m_crcGlobalGroups
Definition: TileDigitsMonitorAlgorithm.h:80
TileDigitsMonitorAlgorithm::m_profGroups
std::vector< std::vector< int > > m_profGroups
Definition: TileDigitsMonitorAlgorithm.h:89
TileDigitsMonitorAlgorithm::MAX_DMU
static const int MAX_DMU
Definition: TileDigitsMonitorAlgorithm.h:92
TileDigitsMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition: TileDigitsMonitorAlgorithm.cxx:87
TileDigitsMonitorAlgorithm::HEADER_FORM
@ HEADER_FORM
Definition: TileDigitsMonitorAlgorithm.h:35
TileDigitsMonitorAlgorithm::m_bcidErrGroups
std::vector< std::vector< std::vector< int > > > m_bcidErrGroups
Definition: TileDigitsMonitorAlgorithm.h:83
TileDigitsMonitorAlgorithm::m_evtMod32Groups
std::vector< std::vector< int > > m_evtMod32Groups
Definition: TileDigitsMonitorAlgorithm.h:90
TileDigitsMonitorAlgorithm::m_fillSamplesHistograms
Gaudi::Property< bool > m_fillSamplesHistograms
Definition: TileDigitsMonitorAlgorithm.h:57
TileDigitsMonitorAlgorithm::DUMMY_FRAG
@ DUMMY_FRAG
Definition: TileDigitsMonitorAlgorithm.h:36
TileDigitsMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: TileDigitsMonitorAlgorithm.cxx:12
TileDigitsMonitorAlgorithm::m_fillErrorsHistograms
Gaudi::Property< bool > m_fillErrorsHistograms
Definition: TileDigitsMonitorAlgorithm.h:48
TileDigitsMonitorAlgorithm::m_is12bit
bool m_is12bit
Definition: TileDigitsMonitorAlgorithm.h:93