ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
ForwardDetectors
ZDC
ZdcMonitoring
ZdcMonitoring
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
8
#include "
AthenaMonitoring/AthMonitorAlgorithm.h
"
9
#include "
AthenaMonitoringKernel/Monitored.h
"
10
#include "
StoreGate/ReadDecorHandle.h
"
11
#include "
StoreGate/ReadDecorHandleKey.h
"
12
#include "TRandom3.h"
13
#include "array"
14
15
//---------------------------------------------------
16
#include "
xAODForward/ZdcModuleContainer.h
"
17
#include "
xAODEventInfo/EventInfo.h
"
18
#include "
xAODHIEvent/HIEventShapeContainer.h
"
19
//---------------------------------------------------
20
#include "
ZdcUtils/ZdcEventInfo.h
"
21
22
class
ZdcLEDMonitorAlgorithm
:
public
AthMonitorAlgorithm
{
23
public
:
24
enum
{
25
NoDecodingErrorBit
= 0,
26
ZDCDecodingErrorBit
= 1,
27
RPDDecodingErrorBit
= 2
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
// pulse RPD LED in all channels if ch _GoodChannel_ satisfies: max ADC > _maxADCThreshold_ && sum ADC > _sumADCThreshold_
46
Gaudi::Property<int>
m_rpdSideAgoodChannelNum
{
this
,
"RPDSideAgoodChannelNum"
,9};
47
Gaudi::Property<int>
m_rpdSideAgoodChannelMaxADCFireThrsh
{
this
,
"RPDSideAGoodChannelMaxADCFireThreshold"
,400};
48
Gaudi::Property<int>
m_rpdSideAgoodChannelSumADCFireThrsh
{
this
,
"RPDSideAGoodChannelSumADCFireThreshold"
,4000};
49
50
// pulse RPD LED in all channels if ch _GoodChannel_ satisfies: max ADC > _maxADCThreshold_ && sum ADC > _sumADCThreshold_
51
Gaudi::Property<int>
m_rpdSideCgoodChannelNum
{
this
,
"RPDSideCgoodChannelNum"
,2};
52
Gaudi::Property<int>
m_rpdSideCgoodChannelMaxADCFireThrsh
{
this
,
"RPDSideCGoodChannelMaxADCFireThreshold"
,1000};
53
Gaudi::Property<int>
m_rpdSideCgoodChannelSumADCFireThrsh
{
this
,
"RPDSideCGoodChannelSumADCFireThreshold"
,10000};
54
55
static
const
int
m_nSides
= 2;
56
static
const
int
m_nModules
= 4;
57
static
const
int
m_nChannels
= 16;
58
static
const
int
m_nDecodingErrorBits
= 3;
59
const
std::vector<std::string>
m_LEDNames
= {
"Blue1"
,
"Green"
,
"Blue2"
};
60
61
// the i-th element (or (i,j)-th element for 2D vector) here gives the index of the generic monitoring tool (GMT)
62
// in the array of all GMT's --> allows faster tool retrieving and hence faster histogram filling
63
std::map<std::string,std::map<std::string,std::map<std::string,int>>>
m_ZDCModuleLEDToolIndices
;
64
std::map<std::string,std::map<std::string,std::map<std::string,int>>>
m_RPDChannelLEDToolIndices
;
65
66
67
//---------------------------------------------------
68
69
// owner, name (allows us to modify the key in python configuration), key
70
SG::ReadHandleKey<xAOD::ZdcModuleContainer>
m_ZdcSumContainerKey
{
this
,
"ZdcSumContainerKey"
,
"ZdcSums"
};
71
SG::ReadHandleKey<xAOD::ZdcModuleContainer>
m_ZdcModuleContainerKey
{
this
,
"ZdcModuleContainerKey"
,
"ZdcModules"
};
72
73
SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer>
m_eventTypeKey
{
this
,
"ZdcEventTypeKey"
,
m_zdcSumContainerName
+
".EventType"
+
m_auxSuffix
};
74
SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer>
m_DAQModeKey
{
this
,
"ZdcDAQModeKey"
,
m_zdcSumContainerName
+
".DAQMode"
+
m_auxSuffix
};
75
76
SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer>
m_robBCIDKey
{
this
,
"ROBBCIDKey"
,
m_zdcSumContainerName
+
".rodBCID"
+
m_auxSuffix
,
"BCID from LUCROD ROB headers"
};
77
78
79
SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer>
m_LEDTypeKey
{
this
,
"ZdcLEDTypeKey"
,
m_zdcSumContainerName
+
".LEDType"
+
m_auxSuffix
};
// recorded in the global sum
80
SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer>
m_LEDPresampleADCKey
{
this
,
"ZdcLEDPresampleADCKey"
,
m_zdcModuleContainerName
+
".Presample"
+
m_auxSuffix
};
81
SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer>
m_LEDADCSumKey
{
this
,
"ZdcLEDADCSumKey"
,
m_zdcModuleContainerName
+
".ADCSum"
+
m_auxSuffix
};
82
SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer>
m_LEDMaxADCKey
{
this
,
"ZdcLEDMaxADCKey"
,
m_zdcModuleContainerName
+
".MaxADC"
+
m_auxSuffix
};
83
SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer>
m_LEDMaxSampleKey
{
this
,
"ZdcLEDMaxSampleKey"
,
m_zdcModuleContainerName
+
".MaxSample"
+
m_auxSuffix
};
84
SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer>
m_LEDAvgTimeKey
{
this
,
"ZdcLEDAvgTimeKey"
,
m_zdcModuleContainerName
+
".AvgTime"
+
m_auxSuffix
};
85
86
};
87
#endif
AthMonitorAlgorithm.h
HIEventShapeContainer.h
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
ReadDecorHandle.h
Handle class for reading a decoration on an object.
ZdcEventInfo.h
Define enumerations for event-level ZDC data.
ZdcModuleContainer.h
AthMonitorAlgorithm::AthMonitorAlgorithm
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthMonitorAlgorithm.cxx:8
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition
StoreGate/StoreGate/ReadDecorHandleKey.h:86
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
ZdcLEDMonitorAlgorithm::m_rpdSideCgoodChannelSumADCFireThrsh
Gaudi::Property< int > m_rpdSideCgoodChannelSumADCFireThrsh
Definition
ZdcLEDMonitorAlgorithm.h:53
ZdcLEDMonitorAlgorithm::m_LEDPresampleADCKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDPresampleADCKey
Definition
ZdcLEDMonitorAlgorithm.h:80
ZdcLEDMonitorAlgorithm::m_LEDTypeKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDTypeKey
Definition
ZdcLEDMonitorAlgorithm.h:79
ZdcLEDMonitorAlgorithm::m_nSides
static const int m_nSides
Definition
ZdcLEDMonitorAlgorithm.h:55
ZdcLEDMonitorAlgorithm::m_rpdSideCgoodChannelNum
Gaudi::Property< int > m_rpdSideCgoodChannelNum
Definition
ZdcLEDMonitorAlgorithm.h:51
ZdcLEDMonitorAlgorithm::m_rpdSideAgoodChannelSumADCFireThrsh
Gaudi::Property< int > m_rpdSideAgoodChannelSumADCFireThrsh
Definition
ZdcLEDMonitorAlgorithm.h:48
ZdcLEDMonitorAlgorithm::m_LEDAvgTimeKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDAvgTimeKey
Definition
ZdcLEDMonitorAlgorithm.h:84
ZdcLEDMonitorAlgorithm::m_nDecodingErrorBits
static const int m_nDecodingErrorBits
Definition
ZdcLEDMonitorAlgorithm.h:58
ZdcLEDMonitorAlgorithm::m_RPDChannelLEDToolIndices
std::map< std::string, std::map< std::string, std::map< std::string, int > > > m_RPDChannelLEDToolIndices
Definition
ZdcLEDMonitorAlgorithm.h:64
ZdcLEDMonitorAlgorithm::m_zdcModuleContainerName
Gaudi::Property< std::string > m_zdcModuleContainerName
Definition
ZdcLEDMonitorAlgorithm.h:36
ZdcLEDMonitorAlgorithm::m_DAQModeKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_DAQModeKey
Definition
ZdcLEDMonitorAlgorithm.h:74
ZdcLEDMonitorAlgorithm::m_robBCIDKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_robBCIDKey
Definition
ZdcLEDMonitorAlgorithm.h:76
ZdcLEDMonitorAlgorithm::m_rpdSideAgoodChannelNum
Gaudi::Property< int > m_rpdSideAgoodChannelNum
Definition
ZdcLEDMonitorAlgorithm.h:46
ZdcLEDMonitorAlgorithm::m_CalReq2
Gaudi::Property< std::string > m_CalReq2
Definition
ZdcLEDMonitorAlgorithm.h:43
ZdcLEDMonitorAlgorithm::m_rpdSideCgoodChannelMaxADCFireThrsh
Gaudi::Property< int > m_rpdSideCgoodChannelMaxADCFireThrsh
Definition
ZdcLEDMonitorAlgorithm.h:52
ZdcLEDMonitorAlgorithm::m_ZdcSumContainerKey
SG::ReadHandleKey< xAOD::ZdcModuleContainer > m_ZdcSumContainerKey
Definition
ZdcLEDMonitorAlgorithm.h:70
ZdcLEDMonitorAlgorithm::m_rpdSideAgoodChannelMaxADCFireThrsh
Gaudi::Property< int > m_rpdSideAgoodChannelMaxADCFireThrsh
Definition
ZdcLEDMonitorAlgorithm.h:47
ZdcLEDMonitorAlgorithm::m_zdcSumContainerName
Gaudi::Property< std::string > m_zdcSumContainerName
Definition
ZdcLEDMonitorAlgorithm.h:37
ZdcLEDMonitorAlgorithm::m_nModules
static const int m_nModules
Definition
ZdcLEDMonitorAlgorithm.h:56
ZdcLEDMonitorAlgorithm::NoDecodingErrorBit
@ NoDecodingErrorBit
Definition
ZdcLEDMonitorAlgorithm.h:25
ZdcLEDMonitorAlgorithm::ZDCDecodingErrorBit
@ ZDCDecodingErrorBit
Definition
ZdcLEDMonitorAlgorithm.h:26
ZdcLEDMonitorAlgorithm::RPDDecodingErrorBit
@ RPDDecodingErrorBit
Definition
ZdcLEDMonitorAlgorithm.h:27
ZdcLEDMonitorAlgorithm::m_CalReq1
Gaudi::Property< std::string > m_CalReq1
Definition
ZdcLEDMonitorAlgorithm.h:42
ZdcLEDMonitorAlgorithm::m_LEDMaxSampleKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDMaxSampleKey
Definition
ZdcLEDMonitorAlgorithm.h:83
ZdcLEDMonitorAlgorithm::m_LEDNames
const std::vector< std::string > m_LEDNames
Definition
ZdcLEDMonitorAlgorithm.h:59
ZdcLEDMonitorAlgorithm::m_eventTypeKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_eventTypeKey
Definition
ZdcLEDMonitorAlgorithm.h:73
ZdcLEDMonitorAlgorithm::m_LEDADCSumKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDADCSumKey
Definition
ZdcLEDMonitorAlgorithm.h:81
ZdcLEDMonitorAlgorithm::m_enableRPD
Gaudi::Property< bool > m_enableRPD
Definition
ZdcLEDMonitorAlgorithm.h:40
ZdcLEDMonitorAlgorithm::m_enableZDC
Gaudi::Property< bool > m_enableZDC
Definition
ZdcLEDMonitorAlgorithm.h:39
ZdcLEDMonitorAlgorithm::m_ZDCModuleLEDToolIndices
std::map< std::string, std::map< std::string, std::map< std::string, int > > > m_ZDCModuleLEDToolIndices
Definition
ZdcLEDMonitorAlgorithm.h:63
ZdcLEDMonitorAlgorithm::m_CalReq0
Gaudi::Property< std::string > m_CalReq0
Definition
ZdcLEDMonitorAlgorithm.h:41
ZdcLEDMonitorAlgorithm::m_nChannels
static const int m_nChannels
Definition
ZdcLEDMonitorAlgorithm.h:57
ZdcLEDMonitorAlgorithm::m_ZdcModuleContainerKey
SG::ReadHandleKey< xAOD::ZdcModuleContainer > m_ZdcModuleContainerKey
Definition
ZdcLEDMonitorAlgorithm.h:71
ZdcLEDMonitorAlgorithm::m_LEDMaxADCKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDMaxADCKey
Definition
ZdcLEDMonitorAlgorithm.h:82
ZdcLEDMonitorAlgorithm::m_auxSuffix
Gaudi::Property< std::string > m_auxSuffix
Definition
ZdcLEDMonitorAlgorithm.h:38
ZdcLEDMonitorAlgorithm
Definition
ZdcLEDMonitorAlgorithm.py:1
initialize
void initialize()
Definition
run_EoverP.cxx:894
EventInfo.h
Generated on
for ATLAS Offline Software by
1.17.0