ATLAS Offline Software
TileCalibMonitorAlgorithm.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_TILECALIBMONITORALGORITHM_H
6 #define TILEMONITORING_TILECALIBMONITORALGORITHM_H
7 
10 
13 
14 class TileHWID;
15 class TileInfo;
16 
22 
23  public:
24 
25  TileCalibMonitorAlgorithm(const std::string& name, ISvcLocator* svcLocator)
26  :AthMonitorAlgorithm(name, svcLocator) {}
27 
29  virtual ~TileCalibMonitorAlgorithm() = default;
30  virtual StatusCode initialize() override;
31  virtual StatusCode fillHistograms(const EventContext& ctx) const override = 0;
32 
33 
34  protected:
35 
36  /*
37  * Function to check that the DMU header format is correct
38  * bit_31 of the DMU header must be 1 and
39  * bit_17 of the DMU header must be 0
40  * Return true in case of error
41  */
43  return (((header >> 31 & 0x1) == 1) && ((header >> 17 & 0x1) == 0)) ? false : true;
44  };
45 
46  /*
47  * Function to check that the DMU header parity is correct
48  * Parity of the DMU header should be odd
49  * Return true in case of error
50  */
52  uint32_t parity(0);
53  for (int i = 0; i < 32; ++i) {
54  parity += ((header >> i) & 0x1);
55  }
56  return ((parity % 2) == 1) ? false : true;
57  };
58 
59 
64  enum RunType {
65  UNKNOWN_RUN = 0, // expect monogain
66  PHYS_RUN = 1, // expect monogain
67  LAS_RUN = 2, // expect monogain
68  LED_RUN = 3, // expect monogain
69  PED_RUN = 4, // expect bigain
70  CIS_RUN = 8, // expect bigain
71  MONO_RUN = 9, // expect monogain
72  CIS_RAMP_RUN = 10 // expect monogain
73  };
74 
75  Gaudi::Property<std::string> m_tileInfoName{this,
76  "TileInfo", "TileInfo", "Name of TileInfo object in Detector Store"};
77 
78  Gaudi::Property<std::vector<int>> m_fragIDsToIgnoreDMUerrors{this,
79  "FragIDsToIgnoreDMUErrors", {}, "List of Tile frag IDs for which ignore DMU errors"};
80 
81  Gaudi::Property<std::vector<int>> m_fragIDsDemonstrators{this,
82  "FragIDsDemonstrators", {}, "List of Tile frag IDs of Demonstrators"};
83 
84  Gaudi::Property<int> m_runType{this,
85  "RunType", 0, "Run type: 1 - phys, 2 - las, 4 - ped, 8 - cis, 9- mono"};
86 
88  "TileDQstatus", "TileDQstatus", "Tile DQ status name"};
89 
94  "TileCablingSvc", "TileCablingSvc", "The Tile cabling service"};
95 
96  const TileCablingService* m_cabling{nullptr};
97  const TileHWID* m_tileHWID{nullptr};
98  const TileInfo* m_tileInfo{nullptr};
99 };
100 
101 
102 #endif // TILEMONITORING_TILECALIBMONITORALGORITHM_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
TileCablingSvc.h
TileCalibMonitorAlgorithm::m_tileInfo
const TileInfo * m_tileInfo
Definition: TileCalibMonitorAlgorithm.h:98
TileCalibMonitorAlgorithm
Base class for Tile calibration runs monitoring.
Definition: TileCalibMonitorAlgorithm.h:21
header
Definition: hcg.cxx:526
TileCalibMonitorAlgorithm::TileCalibMonitorAlgorithm
TileCalibMonitorAlgorithm(const std::string &name, ISvcLocator *svcLocator)
Definition: TileCalibMonitorAlgorithm.h:25
TileCalibMonitorAlgorithm::UNKNOWN_RUN
@ UNKNOWN_RUN
Definition: TileCalibMonitorAlgorithm.h:65
TileCalibMonitorAlgorithm::isHeaderFormatError
bool isHeaderFormatError(uint32_t header) const
Definition: TileCalibMonitorAlgorithm.h:42
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TileCalibMonitorAlgorithm::m_runType
Gaudi::Property< int > m_runType
Definition: TileCalibMonitorAlgorithm.h:84
TileCalibMonitorAlgorithm::LAS_RUN
@ LAS_RUN
Definition: TileCalibMonitorAlgorithm.h:67
TileCalibMonitorAlgorithm::isHeaderParityError
bool isHeaderParityError(uint32_t header) const
Definition: TileCalibMonitorAlgorithm.h:51
TileCalibMonitorAlgorithm::PED_RUN
@ PED_RUN
Definition: TileCalibMonitorAlgorithm.h:69
TileCalibMonitorAlgorithm::MONO_RUN
@ MONO_RUN
Definition: TileCalibMonitorAlgorithm.h:71
TileCalibMonitorAlgorithm::m_tileHWID
const TileHWID * m_tileHWID
Definition: TileCalibMonitorAlgorithm.h:97
TileCalibMonitorAlgorithm::m_tileInfoName
Gaudi::Property< std::string > m_tileInfoName
Definition: TileCalibMonitorAlgorithm.h:75
TileInfo
Definition: TileInfo.h:49
SG::ReadHandleKey< TileDQstatus >
TileCalibMonitorAlgorithm::LED_RUN
@ LED_RUN
Definition: TileCalibMonitorAlgorithm.h:68
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
TileHWID
Helper class for TileCal online (hardware) identifiers.
Definition: TileHWID.h:49
TileCalibMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override=0
adds event to the monitoring histograms
lumiFormat.i
int i
Definition: lumiFormat.py:85
TileCalibMonitorAlgorithm::RunType
RunType
Describes Tile Run Type.
Definition: TileCalibMonitorAlgorithm.h:64
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthMonitorAlgorithm.h
TileCalibMonitorAlgorithm::m_cablingSvc
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
Definition: TileCalibMonitorAlgorithm.h:93
TileCablingService
Definition: TileCablingService.h:23
TileDQstatus.h
Information produced by TileDQstatusAlg (used to be done by TileBeamInfoProvider).
TileCalibMonitorAlgorithm::m_fragIDsToIgnoreDMUerrors
Gaudi::Property< std::vector< int > > m_fragIDsToIgnoreDMUerrors
Definition: TileCalibMonitorAlgorithm.h:78
TileCalibMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: TileCalibMonitorAlgorithm.cxx:9
TileCalibMonitorAlgorithm::m_dqStatusKey
SG::ReadHandleKey< TileDQstatus > m_dqStatusKey
Definition: TileCalibMonitorAlgorithm.h:87
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TileCalibMonitorAlgorithm::CIS_RAMP_RUN
@ CIS_RAMP_RUN
Definition: TileCalibMonitorAlgorithm.h:72
TileCalibMonitorAlgorithm::CIS_RUN
@ CIS_RUN
Definition: TileCalibMonitorAlgorithm.h:70
AthMonitorAlgorithm::AthMonitorAlgorithm
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: AthMonitorAlgorithm.cxx:7
TileCalibMonitorAlgorithm::PHYS_RUN
@ PHYS_RUN
Definition: TileCalibMonitorAlgorithm.h:66
TileCalibMonitorAlgorithm::m_fragIDsDemonstrators
Gaudi::Property< std::vector< int > > m_fragIDsDemonstrators
Definition: TileCalibMonitorAlgorithm.h:81
TileCalibMonitorAlgorithm::m_cabling
const TileCablingService * m_cabling
Definition: TileCalibMonitorAlgorithm.h:96
TileCalibMonitorAlgorithm::~TileCalibMonitorAlgorithm
virtual ~TileCalibMonitorAlgorithm()=default
ServiceHandle< TileCablingSvc >