ATLAS Offline Software
Loading...
Searching...
No Matches
LArFEBMonAlg.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 LARMONITORING_LARFEBMONALG_H
6#define LARMONITORING_LARFEBMONALG_H
7
9
18
19#include <string>
20#include <vector>
21#include <bitset>
22
23#include<mutex>
24
25class TTree;
26
28
29public:
30
31 LArFEBMonAlg(const std::string& name, ISvcLocator* pSvcLocator);
32 virtual ~LArFEBMonAlg(){};
33
34 virtual StatusCode initialize() override final;
35 virtual StatusCode fillHistograms(const EventContext& ctx) const override final;
36 StatusCode procHistograms();
37
39
40 SG::ReadCondHandleKey<LArBadFebCont> m_BFKey{this, "MissingFEBKey", "LArBadFeb", "SG key for missing FEBs"};
42 {this, "Run1DSPThresholdsKey", "", "SG key for DSP thresholds, run1"};
44 {this, "Run2DSPThresholdsKey", "", "SG key for DSP thresholds, run2"};
45 SG::ReadHandleKey<LArFebHeaderContainer> m_hdrContKey{this, "LArFebHeaderKey", "LArFebHeader"};
46 SG::ReadHandleKey<LArFebErrorSummary> m_lArFebErrorSummaryKey{this, "LArFebErrorSummaryKey", "LArFebErrorSummary"};
47 Gaudi::Property<bool> m_ignoreMissingHeaderEMB{this, "IgnoreMissingHeaderEMB", false};
48 Gaudi::Property<bool> m_ignoreMissingHeaderPS{this, "IgnoreMissingHeaderPS", false};
49 Gaudi::Property<int> m_nFEBnominal{this,"NominalFEBNumber",1524};
50 Gaudi::Property<std::vector<std::string> > m_excoscalo{this,"ExcludeInCosmicCalo",{}, "Triggers excluded in CosmicCalo stream"};
51 Gaudi::Property<std::vector<std::string> > m_streams{this, "Streams", {}, "Which streams to monitor, if empty, only simple profile per partition (offline case)"};
52 Gaudi::Property<std::vector<std::string> > m_partitions {this, "PartitionNames", {} };
53 Gaudi::Property<std::vector<std::string> > m_SubDetNames{this, "SubDetNames", {} };
54
55 Gaudi::Property<std::string> m_monGroupName {this, "MonGroup", "FEBMon", "LArLARFEBMonGroup"};
56 //To get the data-dependency right ...
57 SG::ReadDecorHandleKey<xAOD::EventInfo> m_eventInfoDecorKey{this, "LArStatusFlag", "EventInfo.larFlags", "Key for EventInfo object"};
58
59 /* Histogram grouping (part) */
60 std::vector<std::map<std::string,int> > m_histoGroups;
61
62 // Id helper
64
65 bool m_trigok = false;
66
67 typedef std::map<std::pair<unsigned int, unsigned int>, unsigned int > MaskedFebs;
68
69 void fillErrorsSummary(unsigned int partitNb_2,int ft,int slot,uint16_t error, bool lar_inerror, std::bitset<13> &rejectionBits, bool &currentFebStatus , bool &eventRejected) const;
70 void plotMaskedFEB() const;
71 unsigned int returnPartition(int be,int pn,int ft,int sl) const;
72
73 mutable bool m_dspThrDone ATLAS_THREAD_SAFE;
74 mutable bool m_maskedDone ATLAS_THREAD_SAFE;
75 mutable std::atomic<int> m_nbOfFebBlocksTotal;
76 mutable MaskedFebs m_badFebs ATLAS_THREAD_SAFE;
77 mutable std::mutex m_mut ATLAS_THREAD_SAFE;
78
79};
80
81#endif // LARFEBMONALG_H
LArBadXCont< LArBadFeb > LArBadFebCont
A LArRawConditionsContainer holding thresholds used by the DSP.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Gaudi::Property< std::vector< std::string > > m_partitions
Gaudi::Property< int > m_nFEBnominal
Gaudi::Property< std::string > m_monGroupName
SG::ReadHandleKey< LArFebErrorSummary > m_lArFebErrorSummaryKey
std::map< std::pair< unsigned int, unsigned int >, unsigned int > MaskedFebs
StatusCode procHistograms()
bool m_dspThrDone ATLAS_THREAD_SAFE
SG::ReadCondHandleKey< LArBadFebCont > m_BFKey
Gaudi::Property< bool > m_ignoreMissingHeaderPS
SG::ReadCondHandleKey< AthenaAttributeList > m_run2DSPThresholdsKey
Gaudi::Property< std::vector< std::string > > m_excoscalo
SG::ReadHandleKey< LArFebHeaderContainer > m_hdrContKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_eventInfoDecorKey
Gaudi::Property< bool > m_ignoreMissingHeaderEMB
std::atomic< int > m_nbOfFebBlocksTotal
std::vector< std::map< std::string, int > > m_histoGroups
void plotMaskedFEB() const
unsigned int returnPartition(int be, int pn, int ft, int sl) const
Gaudi::Property< std::vector< std::string > > m_streams
void fillErrorsSummary(unsigned int partitNb_2, int ft, int slot, uint16_t error, bool lar_inerror, std::bitset< 13 > &rejectionBits, bool &currentFebStatus, bool &eventRejected) const
const LArOnlineID * m_onlineHelper
Gaudi::Property< std::vector< std::string > > m_SubDetNames
SG::ReadCondHandleKey< LArDSPThresholdsComplete > m_run1DSPThresholdsKey
virtual ~LArFEBMonAlg()
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.
Forward declaration.
void initialize()
#define private