ATLAS Offline Software
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 
12 namespace dqm_core { class AlgorithmConfig; }
13 class TObject;
14 
15 namespace dqm_algorithms
16 {
17 
18 class LastBinThreshold: public dqm_core::Algorithm
19 {
20 public:
21  explicit LastBinThreshold(const std::string &name);
22  virtual ~LastBinThreshold();
23 
24 public:
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 
30 private:
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 
35 private:
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  bool m_greaterThan{}; // greater-than or less-than comparison against thresholds? (default = true)
40  bool m_valueThresholds{}; // thresholds set w.r.t num entries per bin (false) or w.r.t to X-axis value? (default = false)
41  int m_getEntries{}; // search the rightmost non-zero bin (default)
42  // or just use GetEntries()
43  // or search the rightmost bin regardless of the bin content
44  // neither MinStat nor xmin/xmax makes sense for this kind of algorithm, I assume
45 
46  // thresholds
47  double m_grn{};
48  double m_red{};
49 
50  // other properties
51  const std::string m_name;
52 };
53 
54 } // namespace
55 
56 #endif // DQM_ALGORITHMS_LASTBINTHRESHOLD_H
dqm_algorithms::LastBinThreshold::getParameters
void getParameters(const std::string &name, const dqm_core::AlgorithmConfig &config)
Definition: LastBinThreshold.cxx:125
dqm_algorithms::LastBinThreshold::~LastBinThreshold
virtual ~LastBinThreshold()
Definition: LastBinThreshold.cxx:39
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
dqm_algorithms::LastBinThreshold::m_grn
double m_grn
Definition: LastBinThreshold.h:47
athena.value
value
Definition: athena.py:124
dqm_algorithms::LastBinThreshold::m_greaterThan
bool m_greaterThan
Definition: LastBinThreshold.h:39
dqm_algorithms::LastBinThreshold
Definition: LastBinThreshold.h:19
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
dqm_core
Definition: HanConfig.h:34
dqm_algorithms::LastBinThreshold::printDescription
virtual void printDescription(std::ostream &out)
Definition: LastBinThreshold.cxx:101
dqm_algorithms::LastBinThreshold::m_red
double m_red
Definition: LastBinThreshold.h:48
dqm_algorithms::LastBinThreshold::m_nBinsToExceed
int m_nBinsToExceed
Definition: LastBinThreshold.h:38
dqm_algorithms::LastBinThreshold::m_nBinsToWatch
int m_nBinsToWatch
Definition: LastBinThreshold.h:37
Result
ICscStripFitter::Result Result
Definition: CalibCscStripFitter.cxx:13
dqm_algorithms::LastBinThreshold::clone
virtual LastBinThreshold * clone()
Definition: LastBinThreshold.cxx:44
dqm_algorithms::LastBinThreshold::m_valueThresholds
bool m_valueThresholds
Definition: LastBinThreshold.h:40
dqm_algorithms::LastBinThreshold::m_getEntries
int m_getEntries
Definition: LastBinThreshold.h:41
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
dqm_algorithms::LastBinThreshold::execute
virtual dqm_core::Result * execute(const std::string &name, const TObject &object, const dqm_core::AlgorithmConfig &config)
Definition: LastBinThreshold.cxx:49
threshold
Definition: chainparser.cxx:74
dqm_algorithms::LastBinThreshold::LastBinThreshold
LastBinThreshold(const std::string &name)
Definition: LastBinThreshold.cxx:26
dqm_algorithms
Definition: AddReference.h:17
dqm_algorithms::LastBinThreshold::getThresholds
void getThresholds(const std::string &name, const dqm_core::AlgorithmConfig &config)
Definition: LastBinThreshold.cxx:157
dqm_algorithms::LastBinThreshold::m_name
const std::string m_name
Definition: LastBinThreshold.h:51
dqm_algorithms::LastBinThreshold::exceeds
bool exceeds(double value, double threshold) const
Definition: LastBinThreshold.cxx:168