ATLAS Offline Software
Loading...
Searching...
No Matches
LastBinThreshold.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef DQM_ALGORITHMS_LASTBINTHRESHOLD_H
6#define DQM_ALGORITHMS_LASTBINTHRESHOLD_H
7
8#include "dqm_core/Algorithm.h"
9#include <string>
10#include <iosfwd>
11
12namespace dqm_core { class AlgorithmConfig; }
13class TObject;
14
15namespace dqm_algorithms
16{
17
18class LastBinThreshold: public dqm_core::Algorithm
19{
20public:
21 explicit LastBinThreshold(const std::string &name);
22 virtual ~LastBinThreshold();
23
24public:
25 virtual LastBinThreshold *clone();
26 virtual dqm_core::Result *execute(const std::string &name, const TObject &object, const dqm_core::AlgorithmConfig &config);
27 using dqm_core::Algorithm::printDescription;
28 virtual void printDescription(std::ostream& out);
29
30private:
31 void getParameters(const std::string &name, const dqm_core::AlgorithmConfig &config);
32 void getThresholds(const std::string &name, const dqm_core::AlgorithmConfig &config);
33 inline bool exceeds(double value, double threshold) const;
34
35private:
36 // optional parameters
37 int m_nBinsToWatch{}; // how many bins to watch (default = 1), returning worst-case result of those bins
38 int m_nBinsToExceed{}; // how many bins have to exceed the threshold (default = 1), less will be ignored
39 int m_binMinEntries{}; // Minimum number of entries in a TProfile (1D only) for a bin to be checked against thresolds
40 bool m_greaterThan{}; // greater-than or less-than comparison against thresholds? (default = true)
41 bool m_valueThresholds{}; // thresholds set w.r.t num entries per bin (false) or w.r.t to X-axis value? (default = false)
42 int m_getEntries{}; // search the rightmost non-zero bin (default)
43 // or just use GetEntries()
44 // or search the rightmost bin regardless of the bin content
45 // neither MinStat nor xmin/xmax makes sense for this kind of algorithm, I assume
46
47 // thresholds
48 double m_grn{};
49 double m_red{};
50
51 // other properties
52 const std::string m_name;
53};
54
55} // namespace
56
57#endif // DQM_ALGORITHMS_LASTBINTHRESHOLD_H
void getThresholds(const std::string &name, const dqm_core::AlgorithmConfig &config)
bool exceeds(double value, double threshold) const
virtual void printDescription(std::ostream &out)
virtual dqm_core::Result * execute(const std::string &name, const TObject &object, const dqm_core::AlgorithmConfig &config)
virtual LastBinThreshold * clone()
LastBinThreshold(const std::string &name)
void getParameters(const std::string &name, const dqm_core::AlgorithmConfig &config)