ATLAS Offline Software
LastBinThresholdAction.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_LASTBINTHRESHOLDACTION_H
6 #define DQM_ALGORITHMS_LASTBINTHRESHOLDACTION_H
7 
8 #include <dqm_core/Algorithm.h>
9 #include <string>
10 #include <iosfwd>
11 
12 namespace dqm_algorithms {
13 
14  class LessThan {
15  public:
16  bool operator() (double a, double b, double /*error = 0.*/) const {
17  return a < b;
18  }
19  };
20 
21  class GreaterThan {
22  public:
23  bool operator() (double a, double b, double /*error = 0.*/) const {
24  return a > b;
25  }
26  };
27 
28  class DifferentThan {
29  public:
30  bool operator() (double a, double b, double error = 0.) const {
31  return std::abs(a - b) > error;
32  }
33  };
34 
35  class NoAction {
36  public:
37  void operator() (const std::string&, std::string&, double, double) const {}
38  };
39 
40  class TileDQAction {
41  public:
42  void operator() (const std::string& histogramName, std::string action,
43  double averageBinContent, double lastBinContent) const;
44  };
45 
46  template<class Exceed, class Action>
47  class LastBinThresholdAction : public dqm_core::Algorithm {
48  public:
49  LastBinThresholdAction(const std::string & name);
50 
51  // Overwrites virtual functions
52  virtual LastBinThresholdAction* clone( ) override;
53  virtual dqm_core::Result* execute( const std::string& , const TObject& , const dqm_core::AlgorithmConfig& ) override;
54  using dqm_core::Algorithm::printDescription;
55  virtual void printDescription(std::ostream& out) const;
56 
57  private:
58  std::string m_name;
59  Exceed m_exceeds;
61  };
62 }
63 
64 #endif // DQM_ALGORITHMS_LASTBINTHRESHOLDACTION_H
dqm_algorithms::LessThan::operator()
bool operator()(double a, double b, double) const
Definition: LastBinThresholdAction.h:16
dqm_algorithms::DifferentThan
Definition: LastBinThresholdAction.h:28
dqm_algorithms::LastBinThresholdAction::clone
virtual LastBinThresholdAction * clone() override
Definition: LastBinThresholdAction.cxx:72
dqm_algorithms::TileDQAction
Definition: LastBinThresholdAction.h:40
dqm_algorithms::LastBinThresholdAction::printDescription
virtual void printDescription(std::ostream &out) const
Definition: LastBinThresholdAction.cxx:190
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
dqm_algorithms::LastBinThresholdAction::m_doAction
Action m_doAction
Definition: LastBinThresholdAction.h:60
dqm_algorithms::NoAction
Definition: LastBinThresholdAction.h:35
Result
ICscStripFitter::Result Result
Definition: CalibCscStripFitter.cxx:13
dqm_algorithms::LastBinThresholdAction::execute
virtual dqm_core::Result * execute(const std::string &, const TObject &, const dqm_core::AlgorithmConfig &) override
Definition: LastBinThresholdAction.cxx:78
dqm_algorithms::DifferentThan::operator()
bool operator()(double a, double b, double error=0.) const
Definition: LastBinThresholdAction.h:30
dqm_algorithms::LastBinThresholdAction
Definition: LastBinThresholdAction.h:47
dqm_algorithms::GreaterThan
Definition: LastBinThresholdAction.h:21
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
dqm_algorithms::GreaterThan::operator()
bool operator()(double a, double b, double) const
Definition: LastBinThresholdAction.h:23
dqm_algorithms::LessThan
Definition: LastBinThresholdAction.h:14
Crest::Action
Action
Definition: CrestRequest.h:21
dqm_algorithms::TileDQAction::operator()
void operator()(const std::string &histogramName, std::string action, double averageBinContent, double lastBinContent) const
Definition: LastBinThresholdAction.cxx:36
dqm_algorithms
Definition: AddReference.h:17
a
TList * a
Definition: liststreamerinfos.cxx:10
python.CaloScaleNoiseConfig.action
action
Definition: CaloScaleNoiseConfig.py:77
dqm_algorithms::LastBinThresholdAction::m_name
std::string m_name
Definition: LastBinThresholdAction.h:58
dqm_algorithms::LastBinThresholdAction::LastBinThresholdAction
LastBinThresholdAction(const std::string &name)
Definition: LastBinThresholdAction.cxx:64
dqm_algorithms::LastBinThresholdAction::m_exceeds
Exceed m_exceeds
Definition: LastBinThresholdAction.h:59
get_generator_info.error
error
Definition: get_generator_info.py:40
error
Definition: IImpactPoint3dEstimator.h:70
dqm_algorithms::NoAction::operator()
void operator()(const std::string &, std::string &, double, double) const
Definition: LastBinThresholdAction.h:37