CMS 3D CMS Logo

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

#include <SiPixelVCal.h>

Classes

struct  VCal
 

Public Member Functions

float getOffset (const uint32_t &) const
 
float getSlope (const uint32_t &) const
 
const std::map< unsigned int, VCal > & getSlopeAndOffset () const
 
VCal getSlopeAndOffset (const uint32_t &) const
 
bool putSlopeAndOffset (const uint32_t &, float &, float &)
 
void putSlopeAndOffset (std::map< unsigned int, VCal > &vcal)
 
 SiPixelVCal ()
 
 ~SiPixelVCal ()
 

Private Member Functions

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

Private Attributes

std::map< unsigned int, VCalm_vcal
 

Friends

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

Detailed Description

Definition at line 9 of file SiPixelVCal.h.

Constructor & Destructor Documentation

◆ SiPixelVCal()

SiPixelVCal::SiPixelVCal ( )
inline

Definition at line 11 of file SiPixelVCal.h.

11 {};

◆ ~SiPixelVCal()

SiPixelVCal::~SiPixelVCal ( )
inline

Definition at line 12 of file SiPixelVCal.h.

12 {};

Member Function Documentation

◆ getOffset()

float SiPixelVCal::getOffset ( const uint32_t &  pixid) const

Definition at line 35 of file SiPixelVCal.cc.

35  {
36  std::map<unsigned int, VCal>::const_iterator id = m_vcal.find(pixid);
37  if (id != m_vcal.end())
38  return id->second.offset;
39  else
40  edm::LogError("SiPixelVCal") << "SiPixelVCal offset for pixid " << pixid << " is not stored" << std::endl;
41  return -60.;
42 }

References triggerObjects_cff::id, and m_vcal.

◆ getSlope()

float SiPixelVCal::getSlope ( const uint32_t &  pixid) const

Definition at line 26 of file SiPixelVCal.cc.

26  {
27  std::map<unsigned int, VCal>::const_iterator id = m_vcal.find(pixid);
28  if (id != m_vcal.end())
29  return id->second.slope;
30  else
31  edm::LogError("SiPixelVCal") << "SiPixelVCal slope for pixid " << pixid << " is not stored" << std::endl;
32  return 47.;
33 }

References triggerObjects_cff::id, and m_vcal.

◆ getSlopeAndOffset() [1/2]

const std::map<unsigned int, VCal>& SiPixelVCal::getSlopeAndOffset ( ) const
inline

Definition at line 21 of file SiPixelVCal.h.

21 { return m_vcal; }

References m_vcal.

◆ getSlopeAndOffset() [2/2]

SiPixelVCal::VCal SiPixelVCal::getSlopeAndOffset ( const uint32_t &  pixid) const

Definition at line 16 of file SiPixelVCal.cc.

16  {
17  std::map<unsigned int, VCal>::const_iterator id = m_vcal.find(pixid);
18  if (id != m_vcal.end())
19  return id->second;
20  else
21  edm::LogError("SiPixelVCal") << "SiPixelVCal for pixid " << pixid << " is not stored" << std::endl;
22  VCal vcal_default;
23  return vcal_default;
24 }

References triggerObjects_cff::id, and m_vcal.

◆ putSlopeAndOffset() [1/2]

bool SiPixelVCal::putSlopeAndOffset ( const uint32_t &  pixid,
float &  slopeValue,
float &  offsetValue 
)

Definition at line 4 of file SiPixelVCal.cc.

4  {
5  std::map<unsigned int, VCal>::const_iterator id = m_vcal.find(pixid);
6  if (id != m_vcal.end()) {
7  edm::LogError("SiPixelVCal") << "SiPixelVCal for pixid " << pixid << " is already stored. Skippig this put"
8  << std::endl;
9  return false;
10  } else {
11  m_vcal[pixid] = {slopeValue, offsetValue};
12  }
13  return true;
14 }

References m_vcal.

◆ putSlopeAndOffset() [2/2]

void SiPixelVCal::putSlopeAndOffset ( std::map< unsigned int, VCal > &  vcal)
inline

Definition at line 20 of file SiPixelVCal.h.

20 { m_vcal = vcal; }

References m_vcal.

◆ serialize()

template<class Archive >
void SiPixelVCal::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 37 of file SiPixelVCal.h.

◆ cond::serialization::access

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

Definition at line 37 of file SiPixelVCal.h.

Member Data Documentation

◆ m_vcal

std::map<unsigned int, VCal> SiPixelVCal::m_vcal
private

Definition at line 35 of file SiPixelVCal.h.

Referenced by getOffset(), getSlope(), getSlopeAndOffset(), and putSlopeAndOffset().

edm::LogError
Definition: MessageLogger.h:183
SiPixelVCal::m_vcal
std::map< unsigned int, VCal > m_vcal
Definition: SiPixelVCal.h:35
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31