ATLAS Offline Software
Enumerations | Functions
SignEnum Namespace Reference

the conversion key for comparison operators for Event Selection Algorithms More...

Enumerations

enum  ComparisonOperator {
  LT, GT, EQ, GE,
  LE
}
 all possible comparison user inputs More...
 

Functions

template<typename T >
bool checkValue (T reference, ComparisonOperator sign, T test)
 the comparison test given the specified sign and two test values More...
 

Detailed Description

the conversion key for comparison operators for Event Selection Algorithms

Author
Baptiste Ravina

Enumeration Type Documentation

◆ ComparisonOperator

all possible comparison user inputs

Enumerator
LT 
GT 
EQ 
GE 
LE 

Definition at line 16 of file SignEnums.h.

16  {
17  LT,
18  GT,
19  EQ,
20  GE,
21  LE
22  };

Function Documentation

◆ checkValue()

template<typename T >
bool SignEnum::checkValue ( reference,
ComparisonOperator  sign,
test 
)

the comparison test given the specified sign and two test values

Definition at line 35 of file SignEnums.h.

35  {
36  switch (sign) {
38  return test < reference;
40  return test > reference;
42  return test == reference;
44  return test >= reference;
46  return test <= reference;
47  }
48  throw std::runtime_error("SignEnum::checkValue did not recognise the sign argument! Make sure it is listed within SignEnum::ComparisonOperator.");
49  }
SignEnum::EQ
@ EQ
Definition: SignEnums.h:19
TrigInDetValidation_Base.test
test
Definition: TrigInDetValidation_Base.py:147
SignEnum::GE
@ GE
Definition: SignEnums.h:20
SignEnum::LE
@ LE
Definition: SignEnums.h:21
sign
int sign(int a)
Definition: TRT_StrawNeighbourSvc.h:107
SignEnum::GT
@ GT
Definition: SignEnums.h:18
SignEnum::LT
@ LT
Definition: SignEnums.h:17
dq_make_web_display.reference
reference
Definition: dq_make_web_display.py:44