ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TrigJetConditionConfig_phi Class Reference

#include <TrigJetConditionConfig_phi.h>

Inheritance diagram for TrigJetConditionConfig_phi:
Collaboration diagram for TrigJetConditionConfig_phi:

Public Member Functions

 TrigJetConditionConfig_phi (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual StatusCode initialize () override
 
virtual Condition getCondition () const override
 

Private Member Functions

StatusCode checkVals () const
 

Private Attributes

Gaudi::Property< std::string > m_strmin {this, "min", {}, "min for phi region"}
 
Gaudi::Property< std::string > m_strmax {this, "max", {}, "max for phi region"}
 
double m_min {0.}
 
double m_max {0.}
 

Detailed Description

Definition at line 13 of file TrigJetConditionConfig_phi.h.

Constructor & Destructor Documentation

◆ TrigJetConditionConfig_phi()

TrigJetConditionConfig_phi::TrigJetConditionConfig_phi ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 11 of file TrigJetConditionConfig_phi.cxx.

13  :
14  base_class(type, name, parent){
15 
16 }

Member Function Documentation

◆ checkVals()

StatusCode TrigJetConditionConfig_phi::checkVals ( ) const
private

Definition at line 54 of file TrigJetConditionConfig_phi.cxx.

54  {
55 
56  if (m_min > m_max){
57  ATH_MSG_ERROR(" min phi > max phi");
58  return StatusCode::FAILURE;
59  }
60 
61  if (m_min < -M_PI) {
62  ATH_MSG_ERROR(" min phi " << m_min << " out of range");
63  return StatusCode::FAILURE;
64  }
65 
66  if (m_max > M_PI) {
67  ATH_MSG_ERROR(" max phi " << m_max << " out of range");
68  return StatusCode::FAILURE;
69  }
70 
71  return StatusCode::SUCCESS;
72 }

◆ getCondition()

Condition TrigJetConditionConfig_phi::getCondition ( ) const
overridevirtual

Definition at line 49 of file TrigJetConditionConfig_phi.cxx.

49  {
50  return std::make_unique<PhiCondition>(m_min, m_max);
51 }

◆ initialize()

StatusCode TrigJetConditionConfig_phi::initialize ( )
overridevirtual

Definition at line 18 of file TrigJetConditionConfig_phi.cxx.

18  {
19 
20  auto convert = [](const std::string& s) {
21 
22  if (s == "PI"){
23  return M_PI;
24  } else if (s == "-PI") {
25  return -M_PI;
26  }
27  return std::stod(s);
28  };
29 
30  try {
32  } catch (...) {
33  ATH_MSG_ERROR ("Cannot convert " + m_strmin + " to double");
34  return StatusCode::FAILURE;
35  }
36 
37  try {
39  } catch (...) {
40  ATH_MSG_ERROR ("Cannot convert " + m_strmax + " to double");
41  return StatusCode::FAILURE;
42  }
43 
44  CHECK(checkVals());
45  return StatusCode::SUCCESS;
46 }

Member Data Documentation

◆ m_max

double TrigJetConditionConfig_phi::m_max {0.}
private

Definition at line 38 of file TrigJetConditionConfig_phi.h.

◆ m_min

double TrigJetConditionConfig_phi::m_min {0.}
private

Definition at line 37 of file TrigJetConditionConfig_phi.h.

◆ m_strmax

Gaudi::Property<std::string> TrigJetConditionConfig_phi::m_strmax {this, "max", {}, "max for phi region"}
private

Definition at line 35 of file TrigJetConditionConfig_phi.h.

◆ m_strmin

Gaudi::Property<std::string> TrigJetConditionConfig_phi::m_strmin {this, "min", {}, "min for phi region"}
private

Definition at line 32 of file TrigJetConditionConfig_phi.h.


The documentation for this class was generated from the following files:
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
M_PI
#define M_PI
Definition: ActiveFraction.h:11
TrigJetConditionConfig_phi::m_strmin
Gaudi::Property< std::string > m_strmin
Definition: TrigJetConditionConfig_phi.h:32
TrigJetConditionConfig_phi::m_min
double m_min
Definition: TrigJetConditionConfig_phi.h:37
TrigJetConditionConfig_phi::m_max
double m_max
Definition: TrigJetConditionConfig_phi.h:38
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
TrigJetConditionConfig_phi::m_strmax
Gaudi::Property< std::string > m_strmax
Definition: TrigJetConditionConfig_phi.h:35
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
TMVAToMVAUtils::convert
std::unique_ptr< MVAUtils::BDT > convert(TMVA::MethodBDT *bdt, bool isRegression=true, bool useYesNoLeaf=false)
Definition: TMVAToMVAUtils.h:114
TrigJetConditionConfig_phi::checkVals
StatusCode checkVals() const
Definition: TrigJetConditionConfig_phi.cxx:54
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78