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 
26 
29 
30 #include <string>
31 #include <array>
32 
34 {
35 public:
36  LArNoisyROMonAlg(const std::string& name, ISvcLocator* pSvcLocator);
37 
38  virtual ~LArNoisyROMonAlg() override final {};
39 
40  virtual StatusCode initialize() override final;
41  virtual StatusCode fillHistograms(const EventContext& ctx) const override final;
42 
44 
45 private:
46 
48 
49  Gaudi::Property<std::string> m_MonGroupName {this, "NoisyROGroupName", "LArNoisyROMonGroup"};
50  Gaudi::Property<std::vector<std::string> > m_SubDetNames{this, "SubDetNames", {} };
51  Gaudi::Property<std::vector<std::string> > m_partitions {this, "PartitionNames", {} };
52  Gaudi::Property<bool> m_doTrigger {this, "doTrigger", false};
53  Gaudi::Property<bool> m_storeLooseMNBFEBs {this, "storeLooseMNBFEBs", false};
54 
55  Gaudi::Property<std::vector<std::string> > m_EF_NoiseBurst_Triggers {this, "EFNoiseBurstTriggers", {} };
56  Gaudi::Property<std::vector<std::string> > m_L1_NoiseBurst_Triggers {this, "L1NoiseBurstTriggers", {} };
57 
58  Gaudi::Property<bool> m_doHisto {this, "doHisto", true};
59 
60  SG::ReadHandleKey<LArNoisyROSummary> m_inputKey {this, "inputKey", "LArNoisyROSummary"};
61 
62  SG::ReadCondHandleKey<LArBadFebCont> m_badFebKey{this,"KonwnBadFebKey","LArKnownBadFEBs","Key of known Bad-Feb object"};
63  SG::ReadCondHandleKey<LArBadFebCont> m_MNBFebKey{this,"KonwnMNBFebKey","LArKnownMNBFEBs","Key of known MNB-Feb object"};
64  SG::ReadCondHandleKey<LArHVIdMapping> m_hvMapKey {this, "HVMapKey", "LArHVIdMap", "key to read OnOff mapping"};
65 
66  //To get the data-dependency right ...
67  SG::ReadDecorHandleKey<xAOD::EventInfo> m_eventInfoDecorKey{this, "LArStatusFlag", "EventInfo.larFlags", "Key for EventInfo object"};
68 
70  {
71  unsigned int candidate_MNB_time;
72  unsigned int candidate_MNB_time_ns;
76  std::vector<int>* v_candidate_MNBTightFEB;
77  std::vector<int>* v_candidate_MNBTight_PsVetoFEB;
78  std::vector<int>* v_candidate_MNBLooseFEB;
79  };
80 
81  /* Histogram grouping (part) */
82  std::vector<std::map<std::string,int> > m_histoGroups;
83 
84  // fill histogram of triggers
85  void fillTriggerHisto(size_t partition, unsigned long triggerbits, unsigned long L1triggerbits) const;
86 
87  void fillHistogramsOnce(const EventContext& ctx, const bool isMC) const;
88 
89  mutable std::once_flag m_onceFlag ATLAS_THREAD_SAFE;
90 
91 };
92 
93 inline size_t LArNoisyROMonAlg::partitionNumber(const HWIdentifier hwid) const {
94 
95  int pn=m_LArOnlineIDHelper->pos_neg(hwid);
97  if (pn)
98  return 3; //positive EMECA side
99  else
100  return 2; //negative EMECC side
101  }
102  if (m_LArOnlineIDHelper->isEMBchannel(hwid)) {
103  if (pn)
104  return 1; //positive EMBA side
105  else
106  return 0; //negative EMBC side
107  }
108 
109  return 4;//Anything else
110 }
111 
112 
113 #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:13
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
LArNoisyROMonAlg::CandidateMNBStruct
Definition: LArNoisyROMonAlg.h:70
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:77
LArNoisyROMonAlg::partitionNumber
size_t partitionNumber(const HWIdentifier) const
Definition: LArNoisyROMonAlg.h:93
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:38
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
python.ZdcRecConfig.pn
pn
Definition: ZdcRecConfig.py:524
LArNoisyROMonAlg
Definition: LArNoisyROMonAlg.py:1
LArBadChannelCont.h
LArNoisyROMonAlg::CandidateMNBStruct::n_candidate_MNBTight_FEB
int n_candidate_MNBTight_FEB
Definition: LArNoisyROMonAlg.h:73
LArNoisyROMonAlg::m_badFebKey
SG::ReadCondHandleKey< LArBadFebCont > m_badFebKey
Definition: LArNoisyROMonAlg.h:62
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:71
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArHVIdMapping.h
AthMonitorAlgorithm.h
LArNoisyROMonAlg::m_MonGroupName
Gaudi::Property< std::string > m_MonGroupName
Definition: LArNoisyROMonAlg.h:49
LArNoisyROMonAlg::m_eventInfoDecorKey
SG::ReadDecorHandleKey< xAOD::EventInfo > m_eventInfoDecorKey
Definition: LArNoisyROMonAlg.h:67
LArNoisyROMonAlg::m_EF_NoiseBurst_Triggers
Gaudi::Property< std::vector< std::string > > m_EF_NoiseBurst_Triggers
Definition: LArNoisyROMonAlg.h:55
LArNoisyROMonAlg::m_doHisto
Gaudi::Property< bool > m_doHisto
Definition: LArNoisyROMonAlg.h:58
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:76
LArNoisyROMonAlg::m_L1_NoiseBurst_Triggers
Gaudi::Property< std::vector< std::string > > m_L1_NoiseBurst_Triggers
Definition: LArNoisyROMonAlg.h:56
LArNoisyROMonAlg::m_partitions
Gaudi::Property< std::vector< std::string > > m_partitions
Definition: LArNoisyROMonAlg.h:51
LArNoisyROMonAlg::CandidateMNBStruct::n_candidate_MNBLoose_FEB
int n_candidate_MNBLoose_FEB
Definition: LArNoisyROMonAlg.h:75
LArNoisyROMonAlg.isMC
isMC
Definition: LArNoisyROMonAlg.py:274
LArNoisyROMonAlg::m_MNBFebKey
SG::ReadCondHandleKey< LArBadFebCont > m_MNBFebKey
Definition: LArNoisyROMonAlg.h:63
LArNoisyROMonAlg::CandidateMNBStruct::v_candidate_MNBLooseFEB
std::vector< int > * v_candidate_MNBLooseFEB
Definition: LArNoisyROMonAlg.h:78
ReadCondHandleKey.h
LArNoisyROMonAlg::m_inputKey
SG::ReadHandleKey< LArNoisyROSummary > m_inputKey
Definition: LArNoisyROMonAlg.h:60
LArNoisyROMonAlg::initialize
virtual StatusCode initialize() override final
initialize
Definition: LArNoisyROMonAlg.cxx:20
HWIdentifier.h
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
LArNoisyROMonAlg::CandidateMNBStruct::n_candidate_MNBTight_PsVeto_FEB
int n_candidate_MNBTight_PsVeto_FEB
Definition: LArNoisyROMonAlg.h:74
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:82
StateLessPT_NewConfig.partition
partition
Definition: StateLessPT_NewConfig.py:49
LArNoisyROMonAlg::CandidateMNBStruct::candidate_MNB_time_ns
unsigned int candidate_MNB_time_ns
Definition: LArNoisyROMonAlg.h:72
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273
LArNoisyROMonAlg::ATLAS_THREAD_SAFE
std::once_flag m_onceFlag ATLAS_THREAD_SAFE
Definition: LArNoisyROMonAlg.h:89
LArNoisyROMonAlg::m_SubDetNames
Gaudi::Property< std::vector< std::string > > m_SubDetNames
Definition: LArNoisyROMonAlg.h:50
LArNoisyROMonAlg::m_storeLooseMNBFEBs
Gaudi::Property< bool > m_storeLooseMNBFEBs
Definition: LArNoisyROMonAlg.h:53
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:52
LArNoisyROMonAlg::m_hvMapKey
SG::ReadCondHandleKey< LArHVIdMapping > m_hvMapKey
Definition: LArNoisyROMonAlg.h:64
LArNoisyROMonAlg::m_LArOnlineIDHelper
const LArOnlineID * m_LArOnlineIDHelper
Definition: LArNoisyROMonAlg.h:47
LArOnlineID.h
LArNoisyROMonAlg::fillTriggerHisto
void fillTriggerHisto(size_t partition, unsigned long triggerbits, unsigned long L1triggerbits) const
Definition: LArNoisyROMonAlg.cxx:420