ATLAS Offline Software
Loading...
Searching...
No Matches
LArDigitMonAlg.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 LARMONITORING_LARDIGITMON_H
6#define LARMONITORING_LARDIGITMON_H
7
8//inheritance:
10
11//LAr services:
15
16//STL:
17#include <string>
18#include <atomic>
19
22
23//Events infos:
28
29
30#include <mutex>
31
32class LArEM_ID;
33class LArOnlineID;
34class HWIdentifier;
36
38{
39
40
41public:
42 LArDigitMonAlg(const std::string& name, ISvcLocator* pSvcLocator);
43
45 virtual ~LArDigitMonAlg();
46
47 virtual StatusCode initialize() override;
48
49 virtual StatusCode fillHistograms(const EventContext& ctx) const override;
50
51private:
52
54 Gaudi::Property<std::string> m_MonGroupName {this, "LArDigitsGroupName", "LArDigitsMonGroup"};
55 Gaudi::Property<std::vector<std::string> > m_SubDetNames {this, "LArDigitsSubDetNames", {} };
56 Gaudi::Property<std::vector<std::string> > m_partitions {this, "LArDigitsPartitionNames", {} };
57 Gaudi::Property<std::vector<int> > m_Nslots {this, "LArDigitsNslots", {} };
59 Gaudi::Property<int> m_AskedSampleRangeLow{this, "SampleRangeLow", -1};
60 Gaudi::Property<int> m_AskedSampleRangeUp {this, "SampleRangeUp", -1};
62 Gaudi::Property<int> m_ADCsatureCut {this, "ADCSatureCut", 4095};
64 Gaudi::Property<int> m_SigmaCut {this, "SigmaCut", 5};
66 Gaudi::Property<int> m_ExpectedSampleMax {this, "ExpectedSampleMax", 0};
67 Gaudi::Property<int> m_SampleNumberFromDB{this, "SampleNumberFromDB", 0};
69 Gaudi::Property<int> m_NumberBadFebs {this, "NumberBadFebs", 5};
71 Gaudi::Property<bool> m_ignoreKnownBadChannels{this, "IgnoreBadChannels", false};
73 Gaudi::Property<bool> m_IsOnline {this, "IsOnline", false};
75 Gaudi::Property<double> m_TreshOut {this, "TreshOut", 5.};
76 Gaudi::Property<double> m_TreshNull {this, "TreshNull", 5.};
77 Gaudi::Property<double> m_TreshSat {this, "TreshSat", 5.};
78
79 //Added for Stream aware:
81 Gaudi::Property<std::vector<std::string> > m_streams {this, "Streams", {}};
82
83 //std::vector<unsigned> m_streamsThisEvent;
84
85 //Histogram group names
86 Gaudi::Property<std::string> m_summaryMonGroupName {this, "SummaryMonGroup", "Summary"};
87
88 //** Handle to cabling */
89 SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this, "CablingKey", "LArOnOffIdMap","Cabling key"};
90
93 SG::ReadCondHandleKey<LArBadChannelCont> m_bcContKey {this, "BadChanKey", "LArBadChannel", "SG key for LArBadChan object"};
94 Gaudi::Property<std::vector<std::string> > m_problemsToMask{this,"ProblemsToMask",{}, "Bad-Channel categories to mask"};
95
97 SG::ReadCondHandleKey<ILArPedestal> m_keyPedestal{this,"LArPedestalKey","LArPedestal","SG key of LArPedestal CDO"};
98
100 SG::ReadHandleKey<LArNoisyROSummary> m_noisyROSummaryKey{this,"NoisyROSumKey","LArNoisyROSummary","SG key of LArNoisyROSummary object"};
101 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this,"EventInfo","EventInfo","SG Key of EventInfo object"};
102
104 SG::ReadHandleKey<LArDigitContainer> m_digitContainerKey{this,"LArDigitContainerKey","FREE","SG key of LArDigitContainer read from Bytestream"};
105
106 /* Id helpers */
109
110 /* Histograms grouping (subdet)(side) */
111 std::vector<std::map<std::string,int> > m_histoGroups;
112
114 /* set once, guarded by mutex */
115 mutable std::atomic<int> m_Samplenbr ATLAS_THREAD_SAFE;
116 mutable std::mutex m_lock;
117 mutable int m_SampleRangeLow ATLAS_THREAD_SAFE = 0;
118 mutable int m_SampleRangeUp ATLAS_THREAD_SAFE = 0;
119
120 int WhatPartition(HWIdentifier id, int side) const;
121};
122
123#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
const LArOnlineID * m_LArOnlineIDHelper
Gaudi::Property< int > m_ExpectedSampleMax
Use the SampleMax expected and the SampleNumber from DB.
Gaudi::Property< std::vector< int > > m_Nslots
Gaudi::Property< int > m_AskedSampleRangeUp
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Gaudi::Property< double > m_TreshNull
Gaudi::Property< std::string > m_MonGroupName
declaration variables used in joboptions
const LArEM_ID * m_LArEM_IDHelper
LArBadChannelMask m_bcMask
Handle to bad-channel mask.
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
std::atomic< int > m_Samplenbr ATLAS_THREAD_SAFE
Private members.
Gaudi::Property< double > m_TreshSat
Gaudi::Property< int > m_ADCsatureCut
default saturation cuts
SG::ReadHandleKey< LArDigitContainer > m_digitContainerKey
Handle to digits.
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey
SG::ReadCondHandleKey< ILArPedestal > m_keyPedestal
Handle to pedestal.
Gaudi::Property< bool > m_ignoreKnownBadChannels
bool use to mask the bad channels
Gaudi::Property< std::vector< std::string > > m_SubDetNames
SG::ReadHandleKey< LArNoisyROSummary > m_noisyROSummaryKey
Handle to NoisyRO info.
Gaudi::Property< int > m_SampleNumberFromDB
std::vector< std::map< std::string, int > > m_histoGroups
std::mutex m_lock
Gaudi::Property< double > m_TreshOut
Treshold to declare a bad event.
Gaudi::Property< int > m_NumberBadFebs
Number of Bad FEBs used to declare an event noisy and exclude it from monitoring.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Gaudi::Property< std::vector< std::string > > m_streams
Give the name of the streams you want to monitor:
Gaudi::Property< int > m_AskedSampleRangeLow
Range to check for the max sample.
Gaudi::Property< std::string > m_summaryMonGroupName
Gaudi::Property< int > m_SigmaCut
default cut to select events
int WhatPartition(HWIdentifier id, int side) const
Say which partition is a channel.
Gaudi::Property< bool > m_IsOnline
Switch to online/offline mode.
Gaudi::Property< std::vector< std::string > > m_problemsToMask
Gaudi::Property< std::vector< std::string > > m_partitions
Helper class for LArEM offline identifiers.
Definition LArEM_ID.h:111
Property holding a SG store/key/clid from which a ReadHandle is made.
void initialize()