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

#include <ArgStrToDouble.h>

Collaboration diagram for ArgStrToDouble:

Public Member Functions

double operator() (const std::string &s)
 

Private Attributes

std::vector< std::string > m_posinf {"inf", "+inf", "pinf", "INF"}
 
std::vector< std::string > m_neginf {"-inf", "ninf", "-INF"}
 

Detailed Description

Definition at line 13 of file ArgStrToDouble.h.

Member Function Documentation

◆ operator()()

double ArgStrToDouble::operator() ( const std::string &  s)
inline

Definition at line 16 of file ArgStrToDouble.h.

16  {
17 
18  double val{0};
19  if(std::find(m_posinf.begin(), m_posinf.end(), s) != m_posinf.end()){
21  else if (std::find(m_neginf.begin(), m_neginf.end(), s) != m_neginf.end()){
22  val = std::numeric_limits<double>::lowest();}
23  else {
24  val = std::stod(s);
25  }
26 
27  return val;
28  }

Member Data Documentation

◆ m_neginf

std::vector<std::string> ArgStrToDouble::m_neginf {"-inf", "ninf", "-INF"}
private

Definition at line 33 of file ArgStrToDouble.h.

◆ m_posinf

std::vector<std::string> ArgStrToDouble::m_posinf {"inf", "+inf", "pinf", "INF"}
private

Definition at line 32 of file ArgStrToDouble.h.


The documentation for this class was generated from the following file:
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
max
#define max(a, b)
Definition: cfImp.cxx:41
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
ArgStrToDouble::m_posinf
std::vector< std::string > m_posinf
Definition: ArgStrToDouble.h:32
ArgStrToDouble::m_neginf
std::vector< std::string > m_neginf
Definition: ArgStrToDouble.h:33
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14