ATLAS Offline Software
Typedefs | Functions
JsonFileWriterHLT.cxx File Reference
#include "TrigConfIO/JsonFileWriterHLT.h"
#include <iomanip>
#include <fstream>
#include <algorithm>
#include <nlohmann/json.hpp>
Include dependency graph for JsonFileWriterHLT.cxx:

Go to the source code of this file.

Typedefs

using json = nlohmann::json
 

Functions

template<typename T >
std::vector< T > ToVector (const TrigConf::DataStructure &ds, const std::string &child)
 Helper function ptree key->[] to std::vector<T> More...
 
template<typename T >
std::vector< std::vector< T > > ToVectorVector (const TrigConf::DataStructure &ds, const std::string &child)
 Helper function ptree key->[[]] to std::vector<std::vector<T>> More...
 

Typedef Documentation

◆ json

using json = nlohmann::json

Definition at line 12 of file JsonFileWriterHLT.cxx.

Function Documentation

◆ ToVector()

template<typename T >
std::vector<T> ToVector ( const TrigConf::DataStructure ds,
const std::string &  child 
)

Helper function ptree key->[] to std::vector<T>

Definition at line 23 of file JsonFileWriterHLT.cxx.

23  {
25  std::vector<T> return_vector;
26  for( const ptree::value_type& entry : ds.data().get_child(child) ) {
27  return_vector.push_back( entry.second.get_value<T>() );
28  }
29  return return_vector;
30 }

◆ ToVectorVector()

template<typename T >
std::vector<std::vector<T> > ToVectorVector ( const TrigConf::DataStructure ds,
const std::string &  child 
)

Helper function ptree key->[[]] to std::vector<std::vector<T>>

Definition at line 34 of file JsonFileWriterHLT.cxx.

34  {
36  std::vector<std::vector<T>> return_vector;
37  for( const ptree::value_type& outer : ds.data().get_child(child) ) {
38  return_vector.push_back(std::vector<T>());
39  for (const ptree::value_type& inner : outer.second) {
40  return_vector.back().push_back( inner.second.get_value<T>() );
41  }
42  }
43  return return_vector;
44 }
checkxAOD.ds
ds
Definition: Tools/PyUtils/bin/checkxAOD.py:258
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
ptree
boost::property_tree::ptree ptree
Definition: JsonFileLoader.cxx:16
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35