ATLAS Offline Software
Loading...
Searching...
No Matches
LastBinThresholdAction.h
Go to the documentation of this file.
1/*
2Copyright (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
12namespace 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
22 public:
23 bool operator() (double a, double b, double /*error = 0.*/) const {
24 return a > b;
25 }
26 };
27
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
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;
60 Action m_doAction;
61 };
62}
63
64#endif // DQM_ALGORITHMS_LASTBINTHRESHOLDACTION_H
static Double_t a
bool operator()(double a, double b, double error=0.) const
bool operator()(double a, double b, double) const
virtual dqm_core::Result * execute(const std::string &, const TObject &, const dqm_core::AlgorithmConfig &) override
virtual LastBinThresholdAction * clone() override
virtual void printDescription(std::ostream &out) const
bool operator()(double a, double b, double) const
void operator()(const std::string &, std::string &, double, double) const
void operator()(const std::string &histogramName, std::string action, double averageBinContent, double lastBinContent) const