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  enum{
28  };
29  ZdcLEDMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator );
30  virtual ~ZdcLEDMonitorAlgorithm();
31  virtual StatusCode initialize() override;
32  virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
33  StatusCode fillLEDHistograms(unsigned int DAQMode, const EventContext& ctx ) const;
34 
35 private:
36  Gaudi::Property<std::string> m_zdcModuleContainerName {this, "ZdcModuleContainerName", "ZdcModules", "Location of ZDC processed data"};
37  Gaudi::Property<std::string> m_zdcSumContainerName {this, "ZdcSumContainerName", "ZdcSums", "Location of ZDC processed sums"};
38  Gaudi::Property<std::string> m_auxSuffix{this, "AuxSuffix", "", "Append this tag onto end of AuxData"};
39  Gaudi::Property<bool> m_enableZDC {this,"EnableZDC",true};
40  Gaudi::Property<bool> m_enableRPD {this,"EnableRPD",true};
41  Gaudi::Property<std::string> m_CalReq0{this, "CalReq0", "CALREQ_0"};
42  Gaudi::Property<std::string> m_CalReq1{this, "CalReq1", "CALREQ_1"};
43  Gaudi::Property<std::string> m_CalReq2{this, "CalReq2", "CALREQ_2"};
44 
45  static const int m_nSides = 2;
46  static const int m_nModules = 4;
47  static const int m_nChannels = 16;
48  static const int m_nDecodingErrorBits = 3;
49  const std::vector<std::string> m_LEDNames = {"Blue1", "Green", "Blue2"};
50 
51  // the i-th element (or (i,j)-th element for 2D vector) here gives the index of the generic monitoring tool (GMT)
52  // in the array of all GMT's --> allows faster tool retrieving and hence faster histogram filling
53  std::map<std::string,std::map<std::string,std::map<std::string,int>>> m_ZDCModuleLEDToolIndices;
54  std::map<std::string,std::map<std::string,std::map<std::string,int>>> m_RPDChannelLEDToolIndices;
55 
56 
57  //---------------------------------------------------
58 
59  // owner, name (allows us to modify the key in python configuration), key
60  SG::ReadHandleKey<xAOD::ZdcModuleContainer> m_ZdcSumContainerKey {this, "ZdcSumContainerKey", "ZdcSums"};
61  SG::ReadHandleKey<xAOD::ZdcModuleContainer> m_ZdcModuleContainerKey {this, "ZdcModuleContainerKey", "ZdcModules"};
62 
65 
66  SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> m_robBCIDKey {this, "ROBBCIDKey", m_zdcSumContainerName + ".rodBCID" + m_auxSuffix, "BCID from LUCROD ROB headers"};
67 
68 
69  SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> m_LEDTypeKey{this, "ZdcLEDTypeKey", m_zdcSumContainerName + ".LEDType" + m_auxSuffix}; // recorded in the global sum
75 
76 };
77 #endif
ZdcLEDMonitorAlgorithm::RPDDecodingErrorBit
@ RPDDecodingErrorBit
Definition: ZdcLEDMonitorAlgorithm.h:27
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:42
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
ZdcLEDMonitorAlgorithm::m_nDecodingErrorBits
static const int m_nDecodingErrorBits
Definition: ZdcLEDMonitorAlgorithm.h:48
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:70
ZdcLEDMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition: ZdcLEDMonitorAlgorithm.cxx:231
ZdcLEDMonitorAlgorithm::m_LEDTypeKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDTypeKey
Definition: ZdcLEDMonitorAlgorithm.h:69
ZdcLEDMonitorAlgorithm::m_CalReq0
Gaudi::Property< std::string > m_CalReq0
Definition: ZdcLEDMonitorAlgorithm.h:41
ZdcLEDMonitorAlgorithm::m_robBCIDKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_robBCIDKey
Definition: ZdcLEDMonitorAlgorithm.h:66
ZdcLEDMonitorAlgorithm::m_enableRPD
Gaudi::Property< bool > m_enableRPD
Definition: ZdcLEDMonitorAlgorithm.h:40
ZdcLEDMonitorAlgorithm::m_CalReq2
Gaudi::Property< std::string > m_CalReq2
Definition: ZdcLEDMonitorAlgorithm.h:43
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:61
ZdcLEDMonitorAlgorithm::m_zdcModuleContainerName
Gaudi::Property< std::string > m_zdcModuleContainerName
Definition: ZdcLEDMonitorAlgorithm.h:36
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
ZdcLEDMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: ZdcLEDMonitorAlgorithm.cxx:18
ZdcLEDMonitorAlgorithm::m_ZdcSumContainerKey
SG::ReadHandleKey< xAOD::ZdcModuleContainer > m_ZdcSumContainerKey
Definition: ZdcLEDMonitorAlgorithm.h:60
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:46
HIEventShapeContainer.h
ZdcLEDMonitorAlgorithm::m_nSides
static const int m_nSides
Definition: ZdcLEDMonitorAlgorithm.h:45
ZdcLEDMonitorAlgorithm::m_ZDCModuleLEDToolIndices
std::map< std::string, std::map< std::string, std::map< std::string, int > > > m_ZDCModuleLEDToolIndices
Definition: ZdcLEDMonitorAlgorithm.h:53
ZdcLEDMonitorAlgorithm::ZDCDecodingErrorBit
@ ZDCDecodingErrorBit
Definition: ZdcLEDMonitorAlgorithm.h:26
ZdcLEDMonitorAlgorithm::m_enableZDC
Gaudi::Property< bool > m_enableZDC
Definition: ZdcLEDMonitorAlgorithm.h:39
ZdcLEDMonitorAlgorithm::m_auxSuffix
Gaudi::Property< std::string > m_auxSuffix
Definition: ZdcLEDMonitorAlgorithm.h:38
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:73
ZdcLEDMonitorAlgorithm::m_LEDAvgTimeKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDAvgTimeKey
Definition: ZdcLEDMonitorAlgorithm.h:74
ZdcLEDMonitorAlgorithm::m_LEDMaxADCKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDMaxADCKey
Definition: ZdcLEDMonitorAlgorithm.h:72
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
EventInfo.h
ZdcLEDMonitorAlgorithm::m_RPDChannelLEDToolIndices
std::map< std::string, std::map< std::string, std::map< std::string, int > > > m_RPDChannelLEDToolIndices
Definition: ZdcLEDMonitorAlgorithm.h:54
ZdcLEDMonitorAlgorithm::m_LEDADCSumKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDADCSumKey
Definition: ZdcLEDMonitorAlgorithm.h:71
ZdcLEDMonitorAlgorithm::fillLEDHistograms
StatusCode fillLEDHistograms(unsigned int DAQMode, const EventContext &ctx) const
Definition: ZdcLEDMonitorAlgorithm.cxx:54
ZdcLEDMonitorAlgorithm::m_nChannels
static const int m_nChannels
Definition: ZdcLEDMonitorAlgorithm.h:47
ZdcLEDMonitorAlgorithm::m_LEDNames
const std::vector< std::string > m_LEDNames
Definition: ZdcLEDMonitorAlgorithm.h:49
ZdcLEDMonitorAlgorithm::m_zdcSumContainerName
Gaudi::Property< std::string > m_zdcSumContainerName
Definition: ZdcLEDMonitorAlgorithm.h:37
ReadDecorHandle.h
Handle class for reading a decoration on an object.
ZdcLEDMonitorAlgorithm::m_eventTypeKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_eventTypeKey
Definition: ZdcLEDMonitorAlgorithm.h:63
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
ZdcLEDMonitorAlgorithm::NoDecodingErrorBit
@ NoDecodingErrorBit
Definition: ZdcLEDMonitorAlgorithm.h:25
ZdcLEDMonitorAlgorithm::m_DAQModeKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_DAQModeKey
Definition: ZdcLEDMonitorAlgorithm.h:64
ZdcModuleContainer.h
ZdcEventInfo.h
Define enumerations for event-level ZDC data.