ATLAS Offline Software
LArNoisyROMonAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
11 #ifndef LARMONITORING_LARNOISYROMONALG_H
12 #define LARMONITORING_LARNOISYROMONALG_H
13 
16 
19 
22 
25 
28 
29 #include <string>
30 #include <array>
31 
33 {
34 public:
35  LArNoisyROMonAlg(const std::string& name, ISvcLocator* pSvcLocator);
36 
37  virtual ~LArNoisyROMonAlg() override final {};
38 
39  virtual StatusCode initialize() override final;
40  virtual StatusCode fillHistograms(const EventContext& ctx) const override final;
41 
43 
44 private:
45 
47 
48  Gaudi::Property<std::string> m_MonGroupName {this, "NoisyROGroupName", "LArNoisyROMonGroup"};
49  Gaudi::Property<std::vector<std::string> > m_SubDetNames{this, "SubDetNames", {} };
50  Gaudi::Property<std::vector<std::string> > m_partitions {this, "PartitionNames", {} };
51  Gaudi::Property<bool> m_doTrigger {this, "doTrigger", false};
52  Gaudi::Property<bool> m_storeLooseMNBFEBs {this, "storeLooseMNBFEBs", false};
53 
54  Gaudi::Property<std::vector<std::string> > m_EF_NoiseBurst_Triggers {this, "EFNoiseBurstTriggers", {} };
55  Gaudi::Property<std::vector<std::string> > m_L1_NoiseBurst_Triggers {this, "L1NoiseBurstTriggers", {} };
56 
57  Gaudi::Property<bool> m_doHisto {this, "doHisto", true};
58 
59  SG::ReadHandleKey<LArNoisyROSummary> m_inputKey {this, "inputKey", "LArNoisyROSummary"};
60 
61  SG::ReadCondHandleKey<LArBadFebCont> m_badFebKey{this,"KonwnBadFebKey","LArKnownBadFEBs","Key of known Bad-Feb object"};
62  SG::ReadCondHandleKey<LArBadFebCont> m_MNBFebKey{this,"KonwnMNBFebKey","LArKnownMNBFEBs","Key of known MNB-Feb object"};
63 
64  //To get the data-dependency right ...
65  SG::ReadDecorHandleKey<xAOD::EventInfo> m_eventInfoDecorKey{this, "LArStatusFlag", "EventInfo.larFlags", "Key for EventInfo object"};
66 
68  {
69  unsigned int candidate_MNB_time;
70  unsigned int candidate_MNB_time_ns;
74  std::vector<int>* v_candidate_MNBTightFEB;
75  std::vector<int>* v_candidate_MNBTight_PsVetoFEB;
76  std::vector<int>* v_candidate_MNBLooseFEB;
77  };
78 
79  /* Histogram grouping (part) */
80  std::vector<std::map<std::string,int> > m_histoGroups;
81 
82  // fill histogram of triggers
83  void fillTriggerHisto(size_t partition, unsigned long triggerbits, unsigned long L1triggerbits) const;
84 
85  void fillHistogramsOnce(const EventContext& ctx, const bool isMC) const;
86 
87  mutable std::once_flag m_onceFlag ATLAS_THREAD_SAFE;
88 
89 };
90 
91 inline size_t LArNoisyROMonAlg::partitionNumber(const HWIdentifier hwid) const {
92 
93  int pn=m_LArOnlineIDHelper->pos_neg(hwid);
95  if (pn)
96  return 3; //positive EMECA side
97  else
98  return 2; //negative EMECC side
99  }
100  if (m_LArOnlineIDHelper->isEMBchannel(hwid)) {
101  if (pn)
102  return 1; //positive EMBA side
103  else
104  return 0; //negative EMBC side
105  }
106 
107  return 4;//Anything else
108 }
109 
110 
111 
112 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
LArNoisyROMonAlg::fillHistogramsOnce
void fillHistogramsOnce(const EventContext &ctx, const bool isMC) const
Definition: LArNoisyROMonAlg.cxx:42
LArNoisyROMonAlg::LArNoisyROMonAlg
LArNoisyROMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: LArNoisyROMonAlg.cxx:14
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
LArNoisyROMonAlg::CandidateMNBStruct
Definition: LArNoisyROMonAlg.h:68
LArNoisyROMonAlg::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override final
adds event to the monitoring histograms
Definition: LArNoisyROMonAlg.cxx:91
TrigDecisionTool.h
LArNoisyROMonAlg::CandidateMNBStruct::v_candidate_MNBTight_PsVetoFEB
std::vector< int > * v_candidate_MNBTight_PsVetoFEB
Definition: LArNoisyROMonAlg.h:75
LArNoisyROMonAlg::partitionNumber
size_t partitionNumber(const HWIdentifier) const
Definition: LArNoisyROMonAlg.h:91
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
SG::ReadHandleKey< LArNoisyROSummary >
HWIdentifier
Definition: HWIdentifier.h:13
Property
Support class for PropertyMgr.
Definition: Property.h:23
LArNoisyROMonAlg::~LArNoisyROMonAlg
virtual ~LArNoisyROMonAlg() override final
Definition: LArNoisyROMonAlg.h:37
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
python.ZdcRecConfig.pn
pn
Definition: ZdcRecConfig.py:506
LArNoisyROMonAlg
Definition: LArNoisyROMonAlg.py:1
LArBadChannelCont.h
LArNoisyROMonAlg::CandidateMNBStruct::n_candidate_MNBTight_FEB
int n_candidate_MNBTight_FEB
Definition: LArNoisyROMonAlg.h:71
LArNoisyROMonAlg::m_badFebKey
SG::ReadCondHandleKey< LArBadFebCont > m_badFebKey
Definition: LArNoisyROMonAlg.h:61
LArOnlineID::isEMECchannel
bool isEMECchannel(const HWIdentifier id) const override final
Definition: LArOnlineID.cxx:763
LArNoisyROMonAlg::CandidateMNBStruct::candidate_MNB_time
unsigned int candidate_MNB_time
Definition: LArNoisyROMonAlg.h:69
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthMonitorAlgorithm.h
LArNoisyROMonAlg::m_MonGroupName
Gaudi::Property< std::string > m_MonGroupName
Definition: LArNoisyROMonAlg.h:48
LArNoisyROMonAlg::m_eventInfoDecorKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_eventInfoDecorKey
Definition: LArNoisyROMonAlg.h:65
LArNoisyROMonAlg::m_EF_NoiseBurst_Triggers
Gaudi::Property< std::vector< std::string > > m_EF_NoiseBurst_Triggers
Definition: LArNoisyROMonAlg.h:54
LArNoisyROMonAlg::m_doHisto
Gaudi::Property< bool > m_doHisto
Definition: LArNoisyROMonAlg.h:57
LArOnlineID_Base::pos_neg
int pos_neg(const HWIdentifier id) const
Return the side of a hardware cell identifier pos_neg = [0,1] positive-side or negative-side Barrel...
Definition: LArOnlineID_Base.cxx:1950
LArNoisyROMonAlg::CandidateMNBStruct::v_candidate_MNBTightFEB
std::vector< int > * v_candidate_MNBTightFEB
Definition: LArNoisyROMonAlg.h:74
LArNoisyROMonAlg::m_L1_NoiseBurst_Triggers
Gaudi::Property< std::vector< std::string > > m_L1_NoiseBurst_Triggers
Definition: LArNoisyROMonAlg.h:55
LArNoisyROMonAlg::m_partitions
Gaudi::Property< std::vector< std::string > > m_partitions
Definition: LArNoisyROMonAlg.h:50
LArNoisyROMonAlg::CandidateMNBStruct::n_candidate_MNBLoose_FEB
int n_candidate_MNBLoose_FEB
Definition: LArNoisyROMonAlg.h:73
LArNoisyROMonAlg.isMC
isMC
Definition: LArNoisyROMonAlg.py:256
LArNoisyROMonAlg::m_MNBFebKey
SG::ReadCondHandleKey< LArBadFebCont > m_MNBFebKey
Definition: LArNoisyROMonAlg.h:62
LArNoisyROMonAlg::CandidateMNBStruct::v_candidate_MNBLooseFEB
std::vector< int > * v_candidate_MNBLooseFEB
Definition: LArNoisyROMonAlg.h:76
ReadCondHandleKey.h
LArNoisyROMonAlg::m_inputKey
SG::ReadHandleKey< LArNoisyROSummary > m_inputKey
Definition: LArNoisyROMonAlg.h:59
LArNoisyROMonAlg::initialize
virtual StatusCode initialize() override final
initialize
Definition: LArNoisyROMonAlg.cxx:21
HWIdentifier.h
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
LArNoisyROMonAlg::CandidateMNBStruct::n_candidate_MNBTight_PsVeto_FEB
int n_candidate_MNBTight_PsVeto_FEB
Definition: LArNoisyROMonAlg.h:72
LArNoisyROSummary.h
LArOnlineID
Definition: LArOnlineID.h:20
LArOnlineID_Base::isEMBchannel
bool isEMBchannel(const HWIdentifier id) const
Definition: LArOnlineID_Base.cxx:1648
EventInfo.h
SG::ReadCondHandleKey
Definition: ReadCondHandleKey.h:20
LArNoisyROMonAlg::m_histoGroups
std::vector< std::map< std::string, int > > m_histoGroups
Definition: LArNoisyROMonAlg.h:80
StateLessPT_NewConfig.partition
partition
Definition: StateLessPT_NewConfig.py:49
LArNoisyROMonAlg::CandidateMNBStruct::candidate_MNB_time_ns
unsigned int candidate_MNB_time_ns
Definition: LArNoisyROMonAlg.h:70
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273
LArNoisyROMonAlg::ATLAS_THREAD_SAFE
std::once_flag m_onceFlag ATLAS_THREAD_SAFE
Definition: LArNoisyROMonAlg.h:87
LArNoisyROMonAlg::m_SubDetNames
Gaudi::Property< std::vector< std::string > > m_SubDetNames
Definition: LArNoisyROMonAlg.h:49
LArNoisyROMonAlg::m_storeLooseMNBFEBs
Gaudi::Property< bool > m_storeLooseMNBFEBs
Definition: LArNoisyROMonAlg.h:52
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
LArNoisyROMonAlg::m_doTrigger
Gaudi::Property< bool > m_doTrigger
Definition: LArNoisyROMonAlg.h:51
LArNoisyROMonAlg::m_LArOnlineIDHelper
const LArOnlineID * m_LArOnlineIDHelper
Definition: LArNoisyROMonAlg.h:46
LArOnlineID.h
LArNoisyROMonAlg::fillTriggerHisto
void fillTriggerHisto(size_t partition, unsigned long triggerbits, unsigned long L1triggerbits) const
Definition: LArNoisyROMonAlg.cxx:392