ATLAS Offline Software
Loading...
Searching...
No Matches
LArFebErrorSummaryMaker.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef LARROD_LARFEBERRORSUMMARYMAKER
6#define LARROD_LARFEBERRORSUMMARYMAKER
7
8
9/********************************************************************
10
11NAME: LArFebSummaryMaker
12 Algorithm that makes LArFebSummary
13
14********************************************************************/
15
18#include <GaudiKernel/ServiceHandle.h>
19#include <GaudiKernel/ToolHandle.h>
20
24
27
31
33
34#include <array>
35#include <set>
36
37class LArOnlineID;
38
40{
41 public:
42
43 using AthReentrantAlgorithm::AthReentrantAlgorithm;
44 virtual ~LArFebErrorSummaryMaker() = default;
45
46 virtual StatusCode initialize() override final;
47 virtual StatusCode execute(const EventContext& ctx) const override final;
48 virtual StatusCode finalize() override final;
49
50 private:
51
52 //Counters:
53 mutable std::atomic<int> m_missingFebsWarns{0}; //counter for missing FEB warnings
54 //Lock used when keeping track of errors (rare)
55 mutable std::mutex m_mtx; //mutex to guards write-ops on the following objects:
56 mutable std::array<unsigned, LArFebErrorSummary::N_LArFebErrorType> m_errors ATLAS_THREAD_SAFE; //error types accumulator
57 mutable std::map<unsigned,unsigned> m_errsPerFeb ATLAS_THREAD_SAFE;
58
59
60 //The following variables are set in initialize:
61 std::set<unsigned int> m_all_febs ;
62 bool m_isHec=false;
63 bool m_isFcal=false;
64 bool m_isEmb=false;
65 bool m_isEmec=false;
66 bool m_isEmPS=false;
67 bool m_isAside=false;
68 bool m_isCside=false;
69
71
72 // properties:
73 Gaudi::Property<int> m_warnLimit{ this, "warnLimit", 10, "Limit the number of warning messages for missing input" };
74 Gaudi::Property<bool> m_checkAllFeb{ this, "CheckAllFEB", true, "Check all FEBS ?" };
75 Gaudi::Property<std::string> m_partition{ this, "PartitionId", "", "Should contain DAQ partition (+ eventually the EventBuilder)" };
76 Gaudi::Property<std::set<unsigned int> > m_knownEvtId{ this, "MaskFebEvtId", {}, "ignore these FEBs for EvtId" };
77 Gaudi::Property<std::set<unsigned int> > m_knownSCACStatus{ this, "MaskFebScacStatus", {}, "ignore these FEBs for ScacStatus" };
78 Gaudi::Property<std::set<unsigned int> > m_knownZeroSample{ this, "MaskFebZeroSample", {}, "ignore these FEBs for ZeroSample" };
79
83 Gaudi::Property<int> m_minFebsInError{this,"minFebInError",1,
84 "Minimum number of FEBs in error to trigger EventInfo::LArError (1 by default/bulk, 4 in online/express"};
85
86 SG::ReadCondHandleKey<LArBadFebCont> m_bfKey{this,"BFKey","LArBadFeb","Key of the BadFebContainer in the conditions store"};
88 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this,"EventInfoKey","EventInfo"};
90 SG::WriteHandleKey<LArFebErrorSummary> m_writeKey{this,"WriteKey","LArFebErrorSummary"};
91
92 // methods:
93 static bool masked (unsigned int hid, const std::set<unsigned int>& v_feb) ;
94};
95#endif
96
97
98
99
100
101
102
103
104
105
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Define macros for attributes used to control the static checker.
An algorithm that can be simultaneously executed in multiple threads.
std::set< unsigned int > m_all_febs
static bool masked(unsigned int hid, const std::set< unsigned int > &v_feb)
virtual StatusCode initialize() override final
Gaudi::Property< int > m_warnLimit
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
virtual ~LArFebErrorSummaryMaker()=default
SG::ReadCondHandleKey< LArBadFebCont > m_bfKey
const LArOnlineID * m_onlineHelper
Gaudi::Property< std::set< unsigned int > > m_knownZeroSample
std::atomic< int > m_missingFebsWarns
std::array< unsigned, LArFebErrorSummary::N_LArFebErrorType > m_errors ATLAS_THREAD_SAFE
SG::WriteDecorHandleKey< xAOD::EventInfo > m_eventInfoDecorKey
Gaudi::Property< int > m_minFebsInError
Minimum number of FEBs in error to trigger EventInfo::LArError Defined as 1 by default/bulk,...
Gaudi::Property< std::set< unsigned int > > m_knownSCACStatus
SG::ReadHandleKey< LArFebHeaderContainer > m_readKey
Gaudi::Property< std::set< unsigned int > > m_knownEvtId
Gaudi::Property< bool > m_checkAllFeb
SG::WriteHandleKey< LArFebErrorSummary > m_writeKey
virtual StatusCode finalize() override final
virtual StatusCode execute(const EventContext &ctx) const override final
Gaudi::Property< std::string > m_partition
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
STL namespace.
#define private