CMS 3D CMS Logo

List of all members | Public Member Functions
cond::persistency::GetFromRow< std::array< char, n > > Struct Template Reference

#include <DbCore.h>

Public Member Functions

std::string operator() (const coral::AttributeList &row, const std::string &fullyQualifiedName)
 

Detailed Description

template<std::size_t n>
struct cond::persistency::GetFromRow< std::array< char, n > >

Definition at line 299 of file DbCore.h.

Member Function Documentation

template<std::size_t n>
std::string cond::persistency::GetFromRow< std::array< char, n > >::operator() ( const coral::AttributeList &  row,
const std::string &  fullyQualifiedName 
)
inline

Definition at line 299 of file DbCore.h.

References gen::n, operator()(), AlCaHLTBitMon_QueryRunRegistry::string, cond::persistency::throwException(), and heppy_batch::val.

Referenced by operator()().

299  { std::string operator()( const coral::AttributeList& row, const std::string& fullyQualifiedName ){
300  std::string val = row[ fullyQualifiedName ].data<std::string>();
301  if( val.size() != n ) throwException("Retrieved string size does not match with the expected string size.","getFromRow");
302  std::array<char,n> ret;
303  ::memcpy(ret.data(),val.c_str(),n);
304  return ret;
305  } };
std::string operator()(const coral::AttributeList &row, const std::string &fullyQualifiedName)
Definition: DbCore.h:299
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:14