5#ifndef LARMONITORING_LArRODMONALG_H
6#define LARMONITORING_LArRODMONALG_H
14#include "GaudiKernel/ToolHandle.h"
42 virtual StatusCode
initialize()
override final;
44 virtual StatusCode
finalize()
override final;
47 virtual StatusCode
fillHistograms(
const EventContext& ctx)
const override final;
54 static constexpr auto m_PARTNAMES=std::to_array<const char*>({
"EMBC",
"EMBA",
"EMECC",
"EMECA",
"HECC",
"HECA",
"FCalC",
"FCalA",
"UNKNOWN"});
85 const EventContext& ctx)
const;
91 const EventContext& ctx,
92 const diff_t & comp)
const;
113 Gaudi::Property<std::vector<std::string> >
m_problemsToMask{
this,
"ProblemsToMask",{},
"Bad-Channel categories to mask"};
124 Gaudi::Property<std::vector<std::string> >
m_SubDetNames {
this,
"LArRODSubDetNames", {} };
125 Gaudi::Property<std::vector<std::string> >
m_partitions {
this,
"LArRODPartitionNames", {} };
126 Gaudi::Property<std::vector<int> >
m_Nslots {
this,
"LArRODNslots", {} };
129 Gaudi::Property<std::string>
m_DigitsFileName{
this,
"DigitsFileName",
"digits.txt",
"Digits dump output filename"};
130 Gaudi::Property<std::string>
m_EnergyFileName{
this,
"EnergyFileName",
"energy.txt",
" Energies dump output filename"};
131 Gaudi::Property<std::string>
m_AiFileName{
this,
"AiFileName",
"Calib_ai.dat",
"dump output filename"};
132 Gaudi::Property<std::string>
m_DumpCellsFileName{
this,
"DumpCellsFileName",
"dumpCells.txt",
"Cells dump output filename"};
134 Gaudi::Property<bool>
m_doDspTestDump{
this,
"DoDspTestDump",
false,
"dsp dump switch"};
135 Gaudi::Property<bool>
m_doCellsDump{
this,
"DoCellsDump",
false,
"cell dump switch"};
136 Gaudi::Property<bool>
m_doCheckSum{
this,
"DoCheckSum",
true,
"checksum test switch"};
137 Gaudi::Property<bool>
m_doRodStatus{
this,
"DoRodStatus",
true,
"ROD status test switch"};
139 Gaudi::Property<bool>
m_removeNoiseBursts{
this,
"RemoveNoiseBursts",
true,
"removing events with noise bursts"};
143 Gaudi::Property<bool>
m_skipNullPed{
this,
"SkipNullPed",
false,
"skipping no pedestal channels ?"};
144 Gaudi::Property<bool>
m_skipNullQT{
this,
"SkipNullQT",
false,
"skipping no quality channe4ls ?"};
147 Gaudi::Property<short>
m_adc_th{
this,
"ADCthreshold", 50,
"Minimal number of ADC amplitude among samples required to compare online/offline"};
148 Gaudi::Property<float>
m_peakTime_cut{
this,
"peakTimeCut", 5.,
"Cut on abs(peak time) to compare online/offline (all quantities)"};
158 Gaudi::Property<std::vector<std::pair<int, int>>>
m_E_precision{
this,
"EnergyPrecisionRanges",
159 {{8192,2},{65536,9},{524288,65},{4194304,513},{std::numeric_limits<int>::max(),8193}},
160 "Energy precision ranges vector<pair<upperLimit,ExpectedPrecision>"};
161 Gaudi::Property<std::vector<std::pair<int, int>>>
m_T_precision{
this,
"TimePrecisionRanges",
162 {{1000,340},{5000,340},{25000,340},{50000,340},{std::numeric_limits<int>::max(),340}},
163 "Time precision ranges as vector<pair<upperLImit,ExpectedPrecision"};
164 Gaudi::Property<std::vector<std::pair<int, int>>>
m_Q_precision{
this,
"QualityPrecisionRanges",
165 {{std::numeric_limits<int>::max(),3}},
166 "Quality precision ranges as vector<pair<upperLImit,ExpectedPrecision"};
172 Gaudi::Property<std::vector<std::string> >
m_streams{
this,
"Streams", {} };
174 Gaudi::Property<unsigned>
m_max_dump{
this,
"MaxEvDump", 0,
"max number of channels for detailed log-output"};
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
Liquid Argon digit base class.
std::array< unsigned, 3 > errors_T
std::array< unsigned, 3 > errors_Q
std::array< unsigned, 3 > errors_E
Gaudi::Property< std::vector< std::pair< int, int > > > m_T_precision
Gaudi::Property< std::vector< std::pair< int, int > > > m_E_precision
std::ofstream m_fai ATLAS_THREAD_SAFE
const char * getPartitionName(const HWIdentifier chid) const
Gaudi::Property< float > m_timeOffset
Gaudi::Property< bool > m_printEnergyErrors
Gaudi::Property< bool > m_doRodStatus
Gaudi::Property< std::string > m_DigitsFileName
Gaudi::Property< std::string > m_AiFileName
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
SG::ReadCondHandleKey< ILArPedestal > m_keyPedestal
Gaudi::Property< std::vector< std::pair< int, int > > > m_Q_precision
void dumpCellInfo(const HWIdentifier chid, const int gain, const EventContext &ctx, const diff_t &comp) const
Dump a cell's information and calculated energies into a txt file.
Gaudi::Property< bool > m_skipNullPed
const LArOnlineID * m_LArOnlineIDHelper
SG::ReadHandleKey< LArFebHeaderContainer > m_headerContainerKey
Gaudi::Property< std::vector< std::string > > m_streams
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevKey
virtual StatusCode fillHistograms(const EventContext &ctx) const override final
adds event to the monitoring histograms
Gaudi::Property< bool > m_removeNoiseBursts
Gaudi::Property< std::vector< std::string > > m_SubDetNames
Gaudi::Property< float > m_peakTime_cut
PARTITION getPartition(const HWIdentifier chid) const
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Gaudi::Property< bool > m_skipNullQT
Gaudi::Property< bool > m_skipKnownProblematicChannels
SG::ReadCondHandleKey< ILArOFC > m_keyOFC
Gaudi::Property< std::string > m_DumpCellsFileName
SG::ReadDecorHandleKey< xAOD::EventInfo > m_eventInfoKey
Gaudi::Property< std::vector< std::string > > m_problemsToMask
Gaudi::Property< bool > m_doCellsDump
Gaudi::Property< std::vector< int > > m_Nslots
virtual StatusCode finalize() override final
diff_t compareChannel(const LArRawChannel &rcDig, const LArRawChannel &rcBS) const
SG::ReadHandleKey< LArRawChannelContainer > m_channelKey_fromBytestream
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey
LArBadChannelMask m_bcMask
Gaudi::Property< std::string > m_EnergyFileName
SG::ReadCondHandleKey< ILArShape > m_keyShape
Gaudi::Property< unsigned > m_max_dump
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
static constexpr auto m_PARTNAMES
std::atomic< unsigned > m_ndump
Gaudi::Property< bool > m_doCheckSum
Gaudi::Property< bool > m_doDspTestDump
Gaudi::Property< std::string > m_MonGroupName
Gaudi::Property< std::vector< std::string > > m_partitions
Gaudi::Property< short > m_adc_th
std::map< std::string, int > m_histoGroups
SG::ReadHandleKey< LArDigitContainer > m_digitContainerKey
void detailedOutput(const LArRODMonAlg::diff_t &, const LArDigit &dig, const EventContext &ctx) const
SG::ReadHandleKey< LArRawChannelContainer > m_channelKey_fromDigits
SG::ReadCondHandleKey< ILArHVScaleCorr > m_keyHVScaleCorr
Liquid Argon ROD output object base class.
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid from which a ReadHandle is made.