ATLAS Offline Software
LArDigitMonAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef LARMONITORING_LARDIGITMON_H
6 #define LARMONITORING_LARDIGITMON_H
7 
8 //inheritance:
10 
11 //LAr services:
15 
16 //STL:
17 #include <string>
18 
21 
22 //Events infos:
27 
28 
29 #include <mutex>
30 
31 class LArEM_ID;
32 class LArOnlineID;
33 class HWIdentifier;
34 class LArOnOffIdMapping;
35 
37 {
38 
39 
40 public:
41  LArDigitMonAlg(const std::string& name, ISvcLocator* pSvcLocator);
42 
44  virtual ~LArDigitMonAlg();
45 
46  virtual StatusCode initialize() override;
47 
48  virtual StatusCode fillHistograms(const EventContext& ctx) const override;
49 
50 private:
51 
53  Gaudi::Property<std::string> m_MonGroupName {this, "LArDigitsGroupName", "LArDigitsMonGroup"};
54  Gaudi::Property<std::vector<std::string> > m_SubDetNames {this, "LArDigitsSubDetNames", {} };
55  Gaudi::Property<std::vector<std::string> > m_partitions {this, "LArDigitsPartitionNames", {} };
56  Gaudi::Property<std::vector<int> > m_Nslots {this, "LArDigitsNslots", {} };
58  Gaudi::Property<int> m_AskedSampleRangeLow{this, "SampleRangeLow", -1};
59  Gaudi::Property<int> m_AskedSampleRangeUp {this, "SampleRangeUp", -1};
61  Gaudi::Property<int> m_ADCsatureCut {this, "ADCSatureCut", 4095};
63  Gaudi::Property<int> m_SigmaCut {this, "SigmaCut", 5};
65  Gaudi::Property<int> m_ExpectedSampleMax {this, "ExpectedSampleMax", 0};
66  Gaudi::Property<int> m_SampleNumberFromDB{this, "SampleNumberFromDB", 0};
68  Gaudi::Property<int> m_NumberBadFebs {this, "NumberBadFebs", 5};
70  Gaudi::Property<bool> m_ignoreKnownBadChannels{this, "IgnoreBadChannels", false};
72  Gaudi::Property<bool> m_IsOnline {this, "IsOnline", false};
74  Gaudi::Property<double> m_TreshOut {this, "TreshOut", 5.};
75  Gaudi::Property<double> m_TreshNull {this, "TreshNull", 5.};
76  Gaudi::Property<double> m_TreshSat {this, "TreshSat", 5.};
77 
78  //Added for Stream aware:
80  Gaudi::Property<std::vector<std::string> > m_streams {this, "Streams", {}};
81 
82  //std::vector<unsigned> m_streamsThisEvent;
83 
84  //Histogram group names
85  Gaudi::Property<std::string> m_summaryMonGroupName {this, "SummaryMonGroup", "Summary"};
86 
87  //** Handle to cabling */
88  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this, "CablingKey", "LArOnOffIdMap","Cabling key"};
89 
92  SG::ReadCondHandleKey<LArBadChannelCont> m_bcContKey {this, "BadChanKey", "LArBadChannel", "SG key for LArBadChan object"};
93  Gaudi::Property<std::vector<std::string> > m_problemsToMask{this,"ProblemsToMask",{}, "Bad-Channel categories to mask"};
94 
96  SG::ReadCondHandleKey<ILArPedestal> m_keyPedestal{this,"LArPedestalKey","LArPedestal","SG key of LArPedestal CDO"};
97 
99  SG::ReadHandleKey<LArNoisyROSummary> m_noisyROSummaryKey{this,"NoisyROSumKey","LArNoisyROSummary","SG key of LArNoisyROSummary object"};
100  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this,"EventInfo","EventInfo","SG Key of EventInfo object"};
101 
103  SG::ReadHandleKey<LArDigitContainer> m_digitContainerKey{this,"LArDigitContainerKey","FREE","SG key of LArDigitContainer read from Bytestream"};
104 
105  /* Id helpers */
108 
109  /* Histograms grouping (subdet)(side) */
110  std::vector<std::map<std::string,int> > m_histoGroups;
111 
113  /* set once, guarded by mutex */
114  mutable int m_Samplenbr ATLAS_THREAD_SAFE;
116  mutable int m_SampleRangeLow ATLAS_THREAD_SAFE = 0;
117  mutable int m_SampleRangeUp ATLAS_THREAD_SAFE = 0;
118 
119  int WhatPartition(HWIdentifier id, int side) const;
120 };
121 
122 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
LArDigitMonAlg::m_noisyROSummaryKey
SG::ReadHandleKey< LArNoisyROSummary > m_noisyROSummaryKey
Handle to NoisyRO info.
Definition: LArDigitMonAlg.h:99
LArDigitMonAlg::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: LArDigitMonAlg.h:100
LArDigitMonAlg::m_lock
std::mutex m_lock
Definition: LArDigitMonAlg.h:115
LArDigitMonAlg::initialize
virtual StatusCode initialize() override
initialize
Definition: LArDigitMonAlg.cxx:62
LArDigitMonAlg::m_problemsToMask
Gaudi::Property< std::vector< std::string > > m_problemsToMask
Definition: LArDigitMonAlg.h:93
LArDigitMonAlg::m_bcMask
LArBadChannelMask m_bcMask
Handle to bad-channel mask.
Definition: LArDigitMonAlg.h:91
LArDigitMonAlg::m_TreshNull
Gaudi::Property< double > m_TreshNull
Definition: LArDigitMonAlg.h:75
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
LArDigitMonAlg
Definition: LArDigitMonAlg.py:1
LArDigitMonAlg::m_bcContKey
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey
Definition: LArDigitMonAlg.h:92
LArDigitMonAlg::m_SampleNumberFromDB
Gaudi::Property< int > m_SampleNumberFromDB
Definition: LArDigitMonAlg.h:66
LArDigitMonAlg::m_keyPedestal
SG::ReadCondHandleKey< ILArPedestal > m_keyPedestal
Handle to pedestal.
Definition: LArDigitMonAlg.h:96
LArDigitMonAlg::m_Nslots
Gaudi::Property< std::vector< int > > m_Nslots
Definition: LArDigitMonAlg.h:56
SG::ReadHandleKey< LArNoisyROSummary >
HWIdentifier
Definition: HWIdentifier.h:13
LArDigitMonAlg::m_TreshSat
Gaudi::Property< double > m_TreshSat
Definition: LArDigitMonAlg.h:76
LArDigitMonAlg::LArDigitMonAlg
LArDigitMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: LArDigitMonAlg.cxx:47
TRT::Hit::side
@ side
Definition: HitInfo.h:83
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
LArDigitMonAlg::m_NumberBadFebs
Gaudi::Property< int > m_NumberBadFebs
Number of Bad FEBs used to declare an event noisy and exclude it from monitoring.
Definition: LArDigitMonAlg.h:68
LArDigitMonAlg::m_partitions
Gaudi::Property< std::vector< std::string > > m_partitions
Definition: LArDigitMonAlg.h:55
LArBadChannelCont.h
LArOnOffIdMapping.h
LArDigitMonAlg::m_ExpectedSampleMax
Gaudi::Property< int > m_ExpectedSampleMax
Use the SampleMax expected and the SampleNumber from DB.
Definition: LArDigitMonAlg.h:65
LArDigitMonAlg::m_SigmaCut
Gaudi::Property< int > m_SigmaCut
default cut to select events
Definition: LArDigitMonAlg.h:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthMonitorAlgorithm.h
LArDigitMonAlg::WhatPartition
int WhatPartition(HWIdentifier id, int side) const
Say which partition is a channel.
Definition: LArDigitMonAlg.cxx:405
LArDigitMonAlg::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArDigitMonAlg.h:88
LArDigitMonAlg::m_LArEM_IDHelper
const LArEM_ID * m_LArEM_IDHelper
Definition: LArDigitMonAlg.h:107
LArDigitMonAlg::m_streams
Gaudi::Property< std::vector< std::string > > m_streams
Give the name of the streams you want to monitor:
Definition: LArDigitMonAlg.h:80
LArDigitMonAlg::ATLAS_THREAD_SAFE
int m_Samplenbr ATLAS_THREAD_SAFE
Private members.
Definition: LArDigitMonAlg.h:114
LArDigitMonAlg::m_digitContainerKey
SG::ReadHandleKey< LArDigitContainer > m_digitContainerKey
Handle to digits.
Definition: LArDigitMonAlg.h:103
ReadCondHandleKey.h
LArDigitMonAlg::m_SubDetNames
Gaudi::Property< std::vector< std::string > > m_SubDetNames
Definition: LArDigitMonAlg.h:54
LArDigitMonAlg::m_AskedSampleRangeUp
Gaudi::Property< int > m_AskedSampleRangeUp
Definition: LArDigitMonAlg.h:59
LArDigitMonAlg::m_summaryMonGroupName
Gaudi::Property< std::string > m_summaryMonGroupName
Definition: LArDigitMonAlg.h:85
LArDigitMonAlg::m_IsOnline
Gaudi::Property< bool > m_IsOnline
Switch to online/offline mode.
Definition: LArDigitMonAlg.h:72
LArDigitMonAlg::m_MonGroupName
Gaudi::Property< std::string > m_MonGroupName
declaration variables used in joboptions
Definition: LArDigitMonAlg.h:53
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
LArNoisyROSummary.h
LArOnlineID
Definition: LArOnlineID.h:20
LArDigitContainer.h
EventInfo.h
SG::ReadCondHandleKey< LArOnOffIdMapping >
LArDigitMonAlg::~LArDigitMonAlg
virtual ~LArDigitMonAlg()
Default destructor.
Definition: LArDigitMonAlg.cxx:56
LArDigitMonAlg::m_histoGroups
std::vector< std::map< std::string, int > > m_histoGroups
Definition: LArDigitMonAlg.h:110
LArDigitMonAlg::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition: LArDigitMonAlg.cxx:117
ILArPedestal.h
LArDigitMonAlg::m_AskedSampleRangeLow
Gaudi::Property< int > m_AskedSampleRangeLow
Range to check for the max sample.
Definition: LArDigitMonAlg.h:58
LArDigitMonAlg::m_ADCsatureCut
Gaudi::Property< int > m_ADCsatureCut
default saturation cuts
Definition: LArDigitMonAlg.h:61
LArDigitMonAlg::m_LArOnlineIDHelper
const LArOnlineID * m_LArOnlineIDHelper
Definition: LArDigitMonAlg.h:106
LArEM_ID
Helper class for LArEM offline identifiers.
Definition: LArEM_ID.h:118
LArDigitMonAlg::m_TreshOut
Gaudi::Property< double > m_TreshOut
Treshold to declare a bad event.
Definition: LArDigitMonAlg.h:74
LArDigitMonAlg::m_ignoreKnownBadChannels
Gaudi::Property< bool > m_ignoreKnownBadChannels
bool use to mask the bad channels
Definition: LArDigitMonAlg.h:70
LArBadChannelMask.h
LArBadChannelMask
Definition: LArBadChannelMask.h:18
LArOnOffIdMapping
Definition: LArOnOffIdMapping.h:20