CMS 3D CMS Logo

Functions
BeamSpotOnlineObjectsImpl Namespace Reference

Functions

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

Function Documentation

◆ accessParams()

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

Definition at line 14 of file BeamSpotOnlineObjects.cc.

14  {
15  if (index >= params.size())
16  throw std::out_of_range("Parameter with index " + std::to_string(index) + " is out of range.");
17  return params[index];
18  }

References CalibrationSummaryClient_cfi::params.

◆ getOneParam()

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

Definition at line 21 of file BeamSpotOnlineObjects.cc.

21  {
22  if (index >= params.size())
23  throw std::out_of_range("Parameter with index " + std::to_string(index) + " is out of range.");
24  const std::vector<T>& inner = params[index];
25  if (inner.empty())
26  throw std::out_of_range("Parameter with index " + std::to_string(index) + " type=" + typeid(T).name() +
27  " has no value stored.");
28  return inner[0];
29  }

References SurfaceOrientation::inner, Skims_PA_cff::name, and CalibrationSummaryClient_cfi::params.

Referenced by BeamSpotOnlineObjects::GetCreationTime(), BeamSpotOnlineObjects::GetNumPVs(), and BeamSpotOnlineObjects::GetNumTracks().

◆ getParams()

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

Definition at line 7 of file BeamSpotOnlineObjects.cc.

7  {
8  if (index >= params.size())
9  throw std::out_of_range("Parameter with index " + std::to_string(index) + " is out of range.");
10  return params[index];
11  }

References CalibrationSummaryClient_cfi::params.

◆ setOneParam()

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

Definition at line 32 of file BeamSpotOnlineObjects.cc.

32  {
33  if (index >= params.size())
34  throw std::out_of_range("Parameter with index " + std::to_string(index) + " is out of range.");
35  params[index] = std::vector<T>(1, value);
36  }

References CalibrationSummaryClient_cfi::params.

Referenced by BeamSpotOnlineObjects::SetCreationTime(), BeamSpotOnlineObjects::SetNumPVs(), and BeamSpotOnlineObjects::SetNumTracks().

◆ setParams()

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

Definition at line 39 of file BeamSpotOnlineObjects.cc.

39  {
40  if (index >= params.size())
41  throw std::out_of_range("Parameter with index " + std::to_string(index) + " is out of range.");
42  params[index] = value;
43  }

References CalibrationSummaryClient_cfi::params, and relativeConstraints::value.

CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
SurfaceOrientation::inner
Definition: Surface.h:19
value
Definition: value.py:1
T
long double T
Definition: Basic3DVectorLD.h:48
relativeConstraints.value
value
Definition: relativeConstraints.py:53
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46