ATLAS Offline Software
Typedefs | Functions
JsonFileWriterHLT.cxx File Reference
#include "TrigConfIO/JsonFileWriterHLT.h"
#include "TrigConfData/HLTMenu.h"
#include "TrigConfData/HLTPrescalesSet.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 13 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 24 of file JsonFileWriterHLT.cxx.

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

◆ 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 35 of file JsonFileWriterHLT.cxx.

35  {
37  std::vector<std::vector<T>> return_vector;
38  for( const ptree::value_type& outer : ds.data().get_child(child) ) {
39  return_vector.push_back(std::vector<T>());
40  for (const ptree::value_type& inner : outer.second) {
41  return_vector.back().push_back( inner.second.get_value<T>() );
42  }
43  }
44  return return_vector;
45 }
checkxAOD.ds
ds
Definition: Tools/PyUtils/bin/checkxAOD.py:260
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