ATLAS Offline Software
Loading...
Searching...
No Matches
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//---------------------------------------------------
21
23public:
24 enum{
28 };
29 ZdcLEDMonitorAlgorithm( const std::string& name, ISvcLocator* pSvcLocator );
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
35private:
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
71 SG::ReadHandleKey<xAOD::ZdcModuleContainer> m_ZdcModuleContainerKey {this, "ZdcModuleContainerKey", "ZdcModules"};
72
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
85
86};
87#endif
Header file to be included by clients of the Monitored infrastructure.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Handle class for reading a decoration on an object.
Define enumerations for event-level ZDC data.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
Gaudi::Property< int > m_rpdSideCgoodChannelSumADCFireThrsh
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDPresampleADCKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDTypeKey
Gaudi::Property< int > m_rpdSideCgoodChannelNum
Gaudi::Property< int > m_rpdSideAgoodChannelSumADCFireThrsh
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDAvgTimeKey
static const int m_nDecodingErrorBits
std::map< std::string, std::map< std::string, std::map< std::string, int > > > m_RPDChannelLEDToolIndices
Gaudi::Property< std::string > m_zdcModuleContainerName
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_DAQModeKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_robBCIDKey
Gaudi::Property< int > m_rpdSideAgoodChannelNum
Gaudi::Property< std::string > m_CalReq2
Gaudi::Property< int > m_rpdSideCgoodChannelMaxADCFireThrsh
SG::ReadHandleKey< xAOD::ZdcModuleContainer > m_ZdcSumContainerKey
Gaudi::Property< int > m_rpdSideAgoodChannelMaxADCFireThrsh
Gaudi::Property< std::string > m_zdcSumContainerName
Gaudi::Property< std::string > m_CalReq1
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDMaxSampleKey
const std::vector< std::string > m_LEDNames
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_eventTypeKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDADCSumKey
Gaudi::Property< bool > m_enableRPD
Gaudi::Property< bool > m_enableZDC
std::map< std::string, std::map< std::string, std::map< std::string, int > > > m_ZDCModuleLEDToolIndices
Gaudi::Property< std::string > m_CalReq0
SG::ReadHandleKey< xAOD::ZdcModuleContainer > m_ZdcModuleContainerKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainer > m_LEDMaxADCKey
Gaudi::Property< std::string > m_auxSuffix
void initialize()