ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger
TrigHypothesis
TrigHLTJetHypo
src
ArgStrToSizeT.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TRIGHLTJETHYPO_ARGSTRINGTOSIZET_H
6
#define TRIGHLTJETHYPO_ARGSTRINGTOSIZET_H
7
8
#include <string>
9
#include <vector>
10
#include <algorithm>
11
#include <limits>
12
13
class
ArgStrToSizeT
{
14
public
:
15
16
unsigned
long
long
operator()
(
const
std::string& s){
17
18
static
const
std::array<std::string,4> posinf{
"inf"
,
"+inf"
,
"pinf"
,
"INF"
};
19
unsigned
long
long
val{0};
20
if
(std::find(posinf.begin(), posinf.end(), s) != posinf.end()) {
21
val = std::numeric_limits<std::size_t>::max();
22
}
23
else
{
24
val = std::stoull(s);
25
}
26
27
return
val;
28
}
29
};
30
31
#endif
ArgStrToSizeT
Definition
ArgStrToSizeT.h:13
ArgStrToSizeT::operator()
unsigned long long operator()(const std::string &s)
Definition
ArgStrToSizeT.h:16
Generated on
for ATLAS Offline Software by
1.14.0