CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends
LHCInfoVectorizedFields Class Reference

#include <LHCInfoVectorizedFields.h>

Inheritance diagram for LHCInfoVectorizedFields:
LHCInfoPerFill LHCInfoPerLS

Public Types

enum  FloatParamIndex { FSIZE = 0 }
 
enum  IntParamIndex { ISIZE = 0 }
 
enum  StringParamIndex { SSIZE = 0 }
 
enum  TimeParamIndex { TSIZE = 0 }
 

Public Member Functions

template<typename T >
const TgetOneParam (const std::vector< std::vector< T >> &params, size_t index)
 
 LHCInfoVectorizedFields ()
 
template<typename T >
void setOneParam (std::vector< std::vector< T >> &params, size_t index, const T &value)
 

Static Public Member Functions

template<typename T >
static TaccessParams (std::vector< T > &params, size_t index)
 
template<typename T >
static const TgetOneParam (const std::vector< std::vector< T > > &params, size_t index)
 
template<typename T >
static const TgetParams (const std::vector< T > &params, size_t index)
 
template<typename T >
static void setOneParam (std::vector< std::vector< T > > &params, size_t index, const T &value)
 
template<typename T >
static void setParams (std::vector< T > &params, size_t index, const T &value)
 

Protected Member Functions

 LHCInfoVectorizedFields (size_t iSize, size_t fSize, size_t tSize, size_t sSize)
 

Protected Attributes

std::vector< std::vector< float > > m_floatParams
 
std::vector< std::vector< unsigned int > > m_intParams
 
bool m_isData = false
 
std::vector< std::vector< std::string > > m_stringParams
 
std::vector< std::vector< unsigned long long > > m_timeParams
 

Private Member Functions

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

Friends

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

Detailed Description

Definition at line 7 of file LHCInfoVectorizedFields.h.

Member Enumeration Documentation

◆ FloatParamIndex

Enumerator
FSIZE 

Definition at line 10 of file LHCInfoVectorizedFields.h.

◆ IntParamIndex

Enumerator
ISIZE 

Definition at line 9 of file LHCInfoVectorizedFields.h.

◆ StringParamIndex

Enumerator
SSIZE 

Definition at line 12 of file LHCInfoVectorizedFields.h.

◆ TimeParamIndex

Enumerator
TSIZE 

Definition at line 11 of file LHCInfoVectorizedFields.h.

Constructor & Destructor Documentation

◆ LHCInfoVectorizedFields() [1/2]

LHCInfoVectorizedFields::LHCInfoVectorizedFields ( )

◆ LHCInfoVectorizedFields() [2/2]

LHCInfoVectorizedFields::LHCInfoVectorizedFields ( size_t  iSize,
size_t  fSize,
size_t  tSize,
size_t  sSize 
)
protected

Definition at line 6 of file LHCInfoVectorizedFields.cc.

References m_floatParams, m_intParams, m_stringParams, and m_timeParams.

6  {
7  m_intParams.resize(iSize, std::vector<unsigned int>(1, 0));
8  m_floatParams.resize(fSize, std::vector<float>(1, 0.));
9  m_timeParams.resize(tSize, std::vector<unsigned long long>(1, 0ULL));
10  m_stringParams.resize(sSize, std::vector<std::string>(1, ""));
11 }
std::vector< std::vector< unsigned int > > m_intParams
std::vector< std::vector< std::string > > m_stringParams
std::vector< std::vector< unsigned long long > > m_timeParams
std::vector< std::vector< float > > m_floatParams

Member Function Documentation

◆ accessParams()

template<typename T >
template std::vector< std::string > & LHCInfoVectorizedFields::accessParams ( std::vector< T > &  params,
size_t  index 
)
static

Definition at line 29 of file LHCInfoVectorizedFields.cc.

References submitPVValidationJobs::params, and to_string().

Referenced by LHCInfoPerFill::beam1RF(), LHCInfoPerFill::beam1VC(), LHCInfoPerFill::beam2RF(), and LHCInfoPerFill::beam2VC().

29  {
30  if (index >= params.size())
31  throw cond::Exception("Parameter with index " + std::to_string(index) + " is out of range.");
32  return params[index];
33 }
Base exception class for the object to relational access.
Definition: Exception.h:11
static std::string to_string(const XMLCh *ch)

◆ getOneParam() [1/2]

template<typename T >
static const T& LHCInfoVectorizedFields::getOneParam ( const std::vector< std::vector< T > > &  params,
size_t  index 
)
static

◆ getOneParam() [2/2]

template<typename T >
const T& LHCInfoVectorizedFields::getOneParam ( const std::vector< std::vector< T >> &  params,
size_t  index 
)

Definition at line 44 of file LHCInfoVectorizedFields.cc.

References SurfaceOrientation::inner, Skims_PA_cff::name, submitPVValidationJobs::params, and to_string().

44  {
45  if (index >= params.size())
46  throw cond::Exception("Parameter with index " + std::to_string(index) + " is out of range.");
47  const std::vector<T>& inner = params[index];
48  if (inner.empty())
49  throw cond::Exception("Parameter with index " + std::to_string(index) + " type=" + typeid(T).name() +
50  " has no value stored.");
51  return inner[0];
52 }
Base exception class for the object to relational access.
Definition: Exception.h:11
static std::string to_string(const XMLCh *ch)
long double T

◆ getParams()

template<typename T >
template const std::vector< std::string > & LHCInfoVectorizedFields::getParams ( const std::vector< T > &  params,
size_t  index 
)
static

Definition at line 14 of file LHCInfoVectorizedFields.cc.

References submitPVValidationJobs::params, and to_string().

Referenced by LHCInfoPerFill::beam1RF(), LHCInfoPerFill::beam1VC(), LHCInfoPerFill::beam2RF(), LHCInfoPerFill::beam2VC(), and LHCInfoPerFill::lumiPerBX().

14  {
15  if (index >= params.size())
16  throw cond::Exception("Parameter with index " + std::to_string(index) + " is out of range.");
17  return params[index];
18 }
Base exception class for the object to relational access.
Definition: Exception.h:11
static std::string to_string(const XMLCh *ch)

◆ serialize()

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

◆ setOneParam() [1/2]

template<typename T >
static void LHCInfoVectorizedFields::setOneParam ( std::vector< std::vector< T > > &  params,
size_t  index,
const T value 
)
static

◆ setOneParam() [2/2]

template<typename T >
void LHCInfoVectorizedFields::setOneParam ( std::vector< std::vector< T >> &  params,
size_t  index,
const T value 
)

Definition at line 62 of file LHCInfoVectorizedFields.cc.

References submitPVValidationJobs::params, to_string(), and relativeConstraints::value.

62  {
63  if (index >= params.size())
64  throw cond::Exception("Parameter with index " + std::to_string(index) + " is out of range.");
65  params[index] = std::vector<T>(1, value);
66 }
Base exception class for the object to relational access.
Definition: Exception.h:11
static std::string to_string(const XMLCh *ch)

◆ setParams()

template<typename T >
template void LHCInfoVectorizedFields::setParams ( std::vector< T > &  params,
size_t  index,
const T value 
)
static

Definition at line 82 of file LHCInfoVectorizedFields.cc.

References submitPVValidationJobs::params, to_string(), and relativeConstraints::value.

Referenced by LHCInfoPerFill::setBeam1RF(), LHCInfoPerFill::setBeam1VC(), LHCInfoPerFill::setBeam2RF(), LHCInfoPerFill::setBeam2VC(), and LHCInfoPerFill::setLumiPerBX().

82  {
83  if (index >= params.size())
84  throw cond::Exception("Parameter with index " + std::to_string(index) + " is out of range.");
85  params[index] = value;
86 }
Base exception class for the object to relational access.
Definition: Exception.h:11
static std::string to_string(const XMLCh *ch)

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 41 of file LHCInfoVectorizedFields.h.

◆ cond::serialization::access

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

Definition at line 41 of file LHCInfoVectorizedFields.h.

Member Data Documentation

◆ m_floatParams

std::vector<std::vector<float> > LHCInfoVectorizedFields::m_floatParams
protected

◆ m_intParams

std::vector<std::vector<unsigned int> > LHCInfoVectorizedFields::m_intParams
protected

◆ m_isData

bool LHCInfoVectorizedFields::m_isData = false
protected

◆ m_stringParams

std::vector<std::vector<std::string> > LHCInfoVectorizedFields::m_stringParams
protected

◆ m_timeParams

std::vector<std::vector<unsigned long long> > LHCInfoVectorizedFields::m_timeParams
protected