ATLAS Offline Software
ZdcLEDMonitorAlgorithm.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ZDCLEDMONITORALGORITHM_H
6 #define ZDCLEDMONITORALGORITHM_H
7 
12 #include "TRandom3.h"
13 #include "array"
14 
15 //---------------------------------------------------
19 //---------------------------------------------------
20 #include "ZdcUtils/ZdcEventInfo.h"
21 
23 public:
24  ZdcLEDMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator );
25  virtual ~ZdcLEDMonitorAlgorithm();
26  virtual StatusCode initialize() override;
27  virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
28  StatusCode fillLEDHistograms(unsigned int DAQMode, const EventContext& ctx ) const;
29 
30 private:
31  Gaudi::Property<std::string> m_zdcModuleContainerName {this, "ZdcModuleContainerName", "ZdcModules", "Location of ZDC processed data"};
32  Gaudi::Property<std::string> m_zdcSumContainerName {this, "ZdcSumContainerName", "ZdcSums", "Location of ZDC processed sums"};
33  Gaudi::Property<std::string> m_auxSuffix{this, "AuxSuffix", "", "Append this tag onto end of AuxData"};
34 
35  Gaudi::Property<std::string> m_CalReq0{this, "CalReq0", "CALREQ_0"};
36  Gaudi::Property<std::string> m_CalReq1{this, "CalReq1", "CALREQ_1"};
37  Gaudi::Property<std::string> m_CalReq2{this, "CalReq2", "CALREQ_2"};
38 
39  static const int m_nSides = 2;
40  static const int m_nModules = 4;
41  static const int m_nChannels = 16;
42  const std::vector<std::string> m_LEDNames = {"Blue1", "Green", "Blue2"};
43 
44  // the i-th element (or (i,j)-th element for 2D vector) here gives the index of the generic monitoring tool (GMT)
45  // in the array of all GMT's --> allows faster tool retrieving and hence faster histogram filling
46  std::vector<std::vector<std::vector<int>>> m_ZDCModuleLEDToolIndices;
47  std::vector<std::vector<std::vector<int>>> m_RPDChannelLEDToolIndices;
48 
49  //---------------------------------------------------
50 
51  // owner, name (allows us to modify the key in python configuration), key
52  SG::ReadHandleKey<xAOD::ZdcModuleContainer> m_ZdcSumContainerKey {this, "ZdcSumContainerKey", "ZdcSums"};
53  SG::ReadHandleKey<xAOD::ZdcModuleContainer> m_ZdcModuleContainerKey {this, "ZdcModuleContainerKey", "ZdcModules"};
54 
57 
58  SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> m_robBCIDKey {this, "ROBBCIDKey", m_zdcSumContainerName + ".rodBCID" + m_auxSuffix, "BCID from LUCROD ROB headers"};
59 
60 
61  SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> m_LEDTypeKey{this, "ZdcLEDTypeKey", m_zdcSumContainerName + ".LEDType" + m_auxSuffix}; // recorded in the global sum
67 
68 };
69 #endif
ZdcLEDMonitorAlgorithm::ZdcLEDMonitorAlgorithm
ZdcLEDMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ZdcLEDMonitorAlgorithm.cxx:9
ZdcLEDMonitorAlgorithm::m_CalReq1
Gaudi::Property< std::string > m_CalReq1
Definition: ZdcLEDMonitorAlgorithm.h:36
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
ZdcLEDMonitorAlgorithm::~ZdcLEDMonitorAlgorithm
virtual ~ZdcLEDMonitorAlgorithm()
Definition: ZdcLEDMonitorAlgorithm.cxx:15
ZdcLEDMonitorAlgorithm
Definition: ZdcLEDMonitorAlgorithm.py:1
ZdcLEDMonitorAlgorithm::m_LEDPresampleADCKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDPresampleADCKey
Definition: ZdcLEDMonitorAlgorithm.h:62
ZdcLEDMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition: ZdcLEDMonitorAlgorithm.cxx:182
ZdcLEDMonitorAlgorithm::m_LEDTypeKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDTypeKey
Definition: ZdcLEDMonitorAlgorithm.h:61
ZdcLEDMonitorAlgorithm::m_CalReq0
Gaudi::Property< std::string > m_CalReq0
Definition: ZdcLEDMonitorAlgorithm.h:35
ZdcLEDMonitorAlgorithm::m_robBCIDKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_robBCIDKey
Definition: ZdcLEDMonitorAlgorithm.h:58
ZdcLEDMonitorAlgorithm::m_CalReq2
Gaudi::Property< std::string > m_CalReq2
Definition: ZdcLEDMonitorAlgorithm.h:37
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
ZdcEventInfo::DAQMode
DAQMode
Definition: ZdcEventInfo.h:17
ZdcLEDMonitorAlgorithm::m_ZdcModuleContainerKey
SG::ReadHandleKey< xAOD::ZdcModuleContainer > m_ZdcModuleContainerKey
Definition: ZdcLEDMonitorAlgorithm.h:53
ZdcLEDMonitorAlgorithm::m_zdcModuleContainerName
Gaudi::Property< std::string > m_zdcModuleContainerName
Definition: ZdcLEDMonitorAlgorithm.h:31
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
ZdcLEDMonitorAlgorithm::m_RPDChannelLEDToolIndices
std::vector< std::vector< std::vector< int > > > m_RPDChannelLEDToolIndices
Definition: ZdcLEDMonitorAlgorithm.h:47
ZdcLEDMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: ZdcLEDMonitorAlgorithm.cxx:18
ZdcLEDMonitorAlgorithm::m_ZdcSumContainerKey
SG::ReadHandleKey< xAOD::ZdcModuleContainer > m_ZdcSumContainerKey
Definition: ZdcLEDMonitorAlgorithm.h:52
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthMonitorAlgorithm.h
ZdcLEDMonitorAlgorithm::m_nModules
static const int m_nModules
Definition: ZdcLEDMonitorAlgorithm.h:40
HIEventShapeContainer.h
ZdcLEDMonitorAlgorithm::m_nSides
static const int m_nSides
Definition: ZdcLEDMonitorAlgorithm.h:39
ZdcLEDMonitorAlgorithm::m_auxSuffix
Gaudi::Property< std::string > m_auxSuffix
Definition: ZdcLEDMonitorAlgorithm.h:33
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
ZdcLEDMonitorAlgorithm::m_LEDMaxSampleKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDMaxSampleKey
Definition: ZdcLEDMonitorAlgorithm.h:65
ZdcLEDMonitorAlgorithm::m_LEDAvgTimeKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDAvgTimeKey
Definition: ZdcLEDMonitorAlgorithm.h:66
ZdcLEDMonitorAlgorithm::m_LEDMaxADCKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDMaxADCKey
Definition: ZdcLEDMonitorAlgorithm.h:64
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
EventInfo.h
ZdcLEDMonitorAlgorithm::m_LEDADCSumKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDADCSumKey
Definition: ZdcLEDMonitorAlgorithm.h:63
ZdcLEDMonitorAlgorithm::fillLEDHistograms
StatusCode fillLEDHistograms(unsigned int DAQMode, const EventContext &ctx) const
Definition: ZdcLEDMonitorAlgorithm.cxx:50
ZdcLEDMonitorAlgorithm::m_nChannels
static const int m_nChannels
Definition: ZdcLEDMonitorAlgorithm.h:41
ZdcLEDMonitorAlgorithm::m_LEDNames
const std::vector< std::string > m_LEDNames
Definition: ZdcLEDMonitorAlgorithm.h:42
ZdcLEDMonitorAlgorithm::m_zdcSumContainerName
Gaudi::Property< std::string > m_zdcSumContainerName
Definition: ZdcLEDMonitorAlgorithm.h:32
ReadDecorHandle.h
Handle class for reading a decoration on an object.
ZdcLEDMonitorAlgorithm::m_eventTypeKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_eventTypeKey
Definition: ZdcLEDMonitorAlgorithm.h:55
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
ZdcLEDMonitorAlgorithm::m_ZDCModuleLEDToolIndices
std::vector< std::vector< std::vector< int > > > m_ZDCModuleLEDToolIndices
Definition: ZdcLEDMonitorAlgorithm.h:46
ZdcLEDMonitorAlgorithm::m_DAQModeKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_DAQModeKey
Definition: ZdcLEDMonitorAlgorithm.h:56
ZdcModuleContainer.h
ZdcEventInfo.h
Define enumerations for event-level ZDC data.