CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
DYTParamObject Class Reference

#include <DYTParamObject.h>

Public Member Functions

 DYTParamObject ()
 
 DYTParamObject (uint32_t id, std::vector< double > &params)
 
uint32_t id () const
 
double parameter (unsigned int iParam) const
 
unsigned int paramSize () const
 
 ~DYTParamObject ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

uint32_t m_id
 
std::vector< double > m_params
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 8 of file DYTParamObject.h.

Constructor & Destructor Documentation

◆ DYTParamObject() [1/2]

DYTParamObject::DYTParamObject ( )
inline

Definition at line 10 of file DYTParamObject.h.

10 {}

◆ DYTParamObject() [2/2]

DYTParamObject::DYTParamObject ( uint32_t  id,
std::vector< double > &  params 
)
inline

Definition at line 11 of file DYTParamObject.h.

11 : m_id(id), m_params(params) {}
std::vector< double > m_params

◆ ~DYTParamObject()

DYTParamObject::~DYTParamObject ( )
inline

Definition at line 12 of file DYTParamObject.h.

References m_params.

12 { m_params.clear(); };
std::vector< double > m_params

Member Function Documentation

◆ id()

uint32_t DYTParamObject::id ( ) const
inline

Definition at line 15 of file DYTParamObject.h.

References m_id.

15 { return m_id; };

◆ parameter()

double DYTParamObject::parameter ( unsigned int  iParam) const

Definition at line 4 of file DYTParamObject.cc.

References m_params, and paramSize().

4  {
5  if (iParam >= paramSize()) {
6  edm::LogWarning("DYTParamObject") << "The requested parameter (" << (iParam + 1) << ") is outside size range ("
7  << paramSize() << ").";
8  return 0.;
9  }
10 
11  return m_params.at(iParam);
12 }
unsigned int paramSize() const
std::vector< double > m_params
Log< level::Warning, false > LogWarning

◆ paramSize()

unsigned int DYTParamObject::paramSize ( ) const
inline

Definition at line 21 of file DYTParamObject.h.

References m_params.

Referenced by parameter().

21 { return m_params.size(); };
std::vector< double > m_params

◆ serialize()

template<class Archive >
void DYTParamObject::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 27 of file DYTParamObject.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 27 of file DYTParamObject.h.

Member Data Documentation

◆ m_id

uint32_t DYTParamObject::m_id
private

Definition at line 21 of file DYTParamObject.h.

Referenced by id().

◆ m_params

std::vector<double> DYTParamObject::m_params
private

Definition at line 25 of file DYTParamObject.h.

Referenced by parameter(), paramSize(), and ~DYTParamObject().