ATLAS Offline Software
Loading...
Searching...
No Matches
EtaJESCalibStep.cxx File Reference
#include "JetCalibTools/EtaJESCalibStep.h"
#include "PathResolver/PathResolver.h"
#include "TFile.h"
Include dependency graph for EtaJESCalibStep.cxx:

Go to the source code of this file.

Functions

VecD VectorizeD (const TString &str, const TString &sep=" ")

Function Documentation

◆ VectorizeD()

VecD JetCalibUtils::VectorizeD ( const TString & str,
const TString & sep = " " )

Definition at line 25 of file JetCalibUtils.cxx.

26 {
27 std::vector<double> result;
28 std::unique_ptr<TObjArray> tokens(str.Tokenize(sep));
29 std::unique_ptr<TIter> istr(new TIter(tokens.get()));
30 while (TObjString* os = dynamic_cast<TObjString*>(istr->Next())) {
31 result.push_back(atof(os->GetString()));
32 }
33
34 return result;
35 }
double atof(std::string_view str)
Converts a string into a double / float.