CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
cond::OMSServiceResultRef Class Reference

#include <OMSAccess.h>

Public Member Functions

bool empty ()
 
template<typename T >
T get (const std::string &attributeName)
 
template<typename primitive >
std::vector< primitive > getArray (const std::string &attributeName)
 
 OMSServiceResultRef ()=delete
 
 OMSServiceResultRef (const boost::property_tree::ptree *row)
 

Private Member Functions

std::string getAttribute (const std::string &attributeName)
 

Private Attributes

const boost::property_tree::ptree * m_row = nullptr
 

Detailed Description

Definition at line 105 of file OMSAccess.h.

Constructor & Destructor Documentation

◆ OMSServiceResultRef() [1/2]

cond::OMSServiceResultRef::OMSServiceResultRef ( )
delete

◆ OMSServiceResultRef() [2/2]

cond::OMSServiceResultRef::OMSServiceResultRef ( const boost::property_tree::ptree *  row)

Definition at line 7 of file OMSAccess.cc.

7 : m_row(row) {}
const boost::property_tree::ptree * m_row
Definition: OMSAccess.h:129

Member Function Documentation

◆ empty()

bool cond::OMSServiceResultRef::empty ( )

Definition at line 9 of file OMSAccess.cc.

References m_row.

9 { return m_row == nullptr; }
const boost::property_tree::ptree * m_row
Definition: OMSAccess.h:129

◆ get()

template<typename T >
T cond::OMSServiceResultRef::get ( const std::string &  attributeName)
inline

◆ getArray()

template<typename primitive >
std::vector<primitive> cond::OMSServiceResultRef::getArray ( const std::string &  attributeName)
inline

Definition at line 119 of file OMSAccess.h.

References B2GTnPMonitor_cfi::item, m_row, funct::primitive(), and runTheMatrix::ret.

119  {
120  std::vector<primitive> ret;
121  for (auto& item : m_row->get_child(attributeName)) {
122  ret.push_back(item.second.get_value<primitive>());
123  }
124  return ret;
125  }
ret
prodAgent to be discontinued
Primitive< F, X >::type primitive(const F &f)
Definition: Primitive.h:41
const boost::property_tree::ptree * m_row
Definition: OMSAccess.h:129

◆ getAttribute()

std::string cond::OMSServiceResultRef::getAttribute ( const std::string &  attributeName)
private

Definition at line 11 of file OMSAccess.cc.

References m_row, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by get().

11  {
12  return m_row->get<std::string>(attributeName);
13  }
const boost::property_tree::ptree * m_row
Definition: OMSAccess.h:129

Member Data Documentation

◆ m_row

const boost::property_tree::ptree* cond::OMSServiceResultRef::m_row = nullptr
private

Definition at line 129 of file OMSAccess.h.

Referenced by empty(), getArray(), and getAttribute().