ATLAS Offline Software
Loading...
Searching...
No Matches
BTaggingToolUtil Class Reference

#include <BTaggingToolUtil.h>

Collaboration diagram for BTaggingToolUtil:

Static Public Member Functions

static float getExtendedFloat (const nlohmann::json &pt)
static std::string getExtendedString (const nlohmann::json &pt)

Detailed Description

Definition at line 11 of file BTaggingToolUtil.h.

Member Function Documentation

◆ getExtendedFloat()

float BTaggingToolUtil::getExtendedFloat ( const nlohmann::json & pt)
static

Definition at line 7 of file BTaggingToolUtil.cxx.

7 {
8 if (pt.is_string() && pt.get<std::string>() == "inf") {
9 return std::numeric_limits<float>::infinity();
10 } else {
11 return pt.get<float>();
12 }
13}

◆ getExtendedString()

std::string BTaggingToolUtil::getExtendedString ( const nlohmann::json & pt)
static

Definition at line 15 of file BTaggingToolUtil.cxx.

15 {
16 if (pt.is_string()){
17 return pt.get<std::string>();
18 }
19 else{
20 return pt.dump();
21 }
22}

The documentation for this class was generated from the following files: