ATLAS Offline Software
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 
25 class TTree;
26 
28 
29 public:
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;
37 
38 private:
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;
78 
79 };
80 
81 #endif // LARFEBMONALG_H
LArFEBMonAlg::~LArFEBMonAlg
virtual ~LArFEBMonAlg()
Definition: LArFEBMonAlg.h:32
PlotCalibFromCool.ft
ft
Definition: PlotCalibFromCool.py:329
LArFEBMonAlg::returnPartition
unsigned int returnPartition(int be, int pn, int ft, int sl) const
Definition: LArFEBMonAlg.cxx:742
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
LArFEBMonAlg::m_eventInfoDecorKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_eventInfoDecorKey
Definition: LArFEBMonAlg.h:57
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
LArFEBMonAlg::m_monGroupName
Gaudi::Property< std::string > m_monGroupName
Definition: LArFEBMonAlg.h:55
LArBadXCont
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
Definition: LArBadChannelCont.h:28
LArFEBMonAlg::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override final
adds event to the monitoring histograms
Definition: LArFEBMonAlg.cxx:78
LArFEBMonAlg::fillErrorsSummary
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
Definition: LArFEBMonAlg.cxx:419
LArFEBMonAlg::procHistograms
StatusCode procHistograms()
LArFEBMonAlg::m_hdrContKey
SG::ReadHandleKey< LArFebHeaderContainer > m_hdrContKey
Definition: LArFEBMonAlg.h:45
LArFEBMonAlg::m_SubDetNames
Gaudi::Property< std::vector< std::string > > m_SubDetNames
Definition: LArFEBMonAlg.h:53
LArFEBMonAlg::m_nFEBnominal
Gaudi::Property< int > m_nFEBnominal
Definition: LArFEBMonAlg.h:49
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
SG::ReadHandleKey< LArFebHeaderContainer >
LArFEBMonAlg::m_onlineHelper
const LArOnlineID * m_onlineHelper
Definition: LArFEBMonAlg.h:63
AthenaAttributeList.h
LArFEBMonAlg::m_nbOfFebBlocksTotal
std::atomic< int > m_nbOfFebBlocksTotal
Definition: LArFEBMonAlg.h:75
LArFEBMonAlg::initialize
virtual StatusCode initialize() override final
initialize
Definition: LArFEBMonAlg.cxx:41
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
python.ZdcRecConfig.pn
pn
Definition: ZdcRecConfig.py:506
LArBadChannelCont.h
LArFEBMonAlg::ATLAS_THREAD_SAFE
std::mutex m_mut ATLAS_THREAD_SAFE
Definition: LArFEBMonAlg.h:77
LArFEBMonAlg::m_run2DSPThresholdsKey
SG::ReadCondHandleKey< AthenaAttributeList > m_run2DSPThresholdsKey
Definition: LArFEBMonAlg.h:44
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
LArDSPThresholdsComplete.h
A LArRawConditionsContainer holding thresholds used by the DSP.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthMonitorAlgorithm.h
ReadCondHandleKey.h
LArFEBMonAlg::m_streams
Gaudi::Property< std::vector< std::string > > m_streams
Definition: LArFEBMonAlg.h:51
LArFebHeaderContainer.h
LArFEBMonAlg::MaskedFebs
std::map< std::pair< unsigned int, unsigned int >, unsigned int > MaskedFebs
Definition: LArFEBMonAlg.h:67
LArFEBMonAlg::m_ignoreMissingHeaderPS
Gaudi::Property< bool > m_ignoreMissingHeaderPS
Definition: LArFEBMonAlg.h:48
HWIdentifier.h
LArFEBMonAlg::m_histoGroups
std::vector< std::map< std::string, int > > m_histoGroups
Definition: LArFEBMonAlg.h:60
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
LArFEBMonAlg::plotMaskedFEB
void plotMaskedFEB() const
Definition: LArFEBMonAlg.cxx:599
LArFEBMonAlg::m_excoscalo
Gaudi::Property< std::vector< std::string > > m_excoscalo
Definition: LArFEBMonAlg.h:50
LArOnlineID
Definition: LArOnlineID.h:20
LArFEBMonAlg::m_partitions
Gaudi::Property< std::vector< std::string > > m_partitions
Definition: LArFEBMonAlg.h:52
LArFEBMonAlg::ATLAS_THREAD_SAFE
bool m_maskedDone ATLAS_THREAD_SAFE
Definition: LArFEBMonAlg.h:74
LArFEBMonAlg
Definition: LArFEBMonAlg.py:1
SG::ReadCondHandleKey< LArDSPThresholdsComplete >
LArFEBMonAlg::LArFEBMonAlg
LArFEBMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: LArFEBMonAlg.cxx:29
LArFEBMonAlg::ATLAS_THREAD_SAFE
MaskedFebs m_badFebs ATLAS_THREAD_SAFE
Definition: LArFEBMonAlg.h:76
LArFEBMonAlg::m_trigok
bool m_trigok
Definition: LArFEBMonAlg.h:65
LArFEBMonAlg::m_ignoreMissingHeaderEMB
Gaudi::Property< bool > m_ignoreMissingHeaderEMB
Definition: LArFEBMonAlg.h:47
LArFebErrorSummary.h
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
LArFEBMonAlg::m_lArFebErrorSummaryKey
SG::ReadHandleKey< LArFebErrorSummary > m_lArFebErrorSummaryKey
Definition: LArFEBMonAlg.h:46
LArFEBMonAlg::ATLAS_THREAD_SAFE
bool m_dspThrDone ATLAS_THREAD_SAFE
Definition: LArFEBMonAlg.h:73
error
Definition: IImpactPoint3dEstimator.h:70
PlotCalibFromCool.be
be
Definition: PlotCalibFromCool.py:398
LArFEBMonAlg::m_BFKey
SG::ReadCondHandleKey< LArBadFebCont > m_BFKey
Definition: LArFEBMonAlg.h:40
LArFEBMonAlg::m_run1DSPThresholdsKey
SG::ReadCondHandleKey< LArDSPThresholdsComplete > m_run1DSPThresholdsKey
Definition: LArFEBMonAlg.h:42
LArOnlineID.h