CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Attributes | Private Member Functions | Friends
HcalSiPMCharacteristics Class Reference

#include <HcalSiPMCharacteristics.h>

Classes

class  PrecisionItem
 

Public Member Functions

const PrecisionItemfindByType (int type) const
 
int getAuxi1 (int type) const
 get auxiliary words More...
 
float getAuxi2 (int type) const
 
float getCrossTalk (int type) const
 get cross talk More...
 
std::vector< float > getNonLinearities (int type) const
 get nonlinearity constants More...
 
int getPixels (int type) const
 get # of pixels More...
 
int getType (unsigned int k) const
 
unsigned int getTypes () const
 get # of types More...
 
 HcalSiPMCharacteristics ()
 
 HcalSiPMCharacteristics (const HcalSiPMCharacteristicsAddons::Helper &helper)
 
 HcalSiPMCharacteristics (const HcalSiPMCharacteristics &src)
 
 HcalSiPMCharacteristics (HcalSiPMCharacteristics &&other)
 
void initialize ()
 
HcalSiPMCharacteristicsoperator= (const HcalSiPMCharacteristics &rhs)
 
void sortByType ()
 
void swap (HcalSiPMCharacteristics &other)
 
 ~HcalSiPMCharacteristics ()
 

Protected Attributes

std::vector< PrecisionItemmPItems
 
std::vector< const
PrecisionItem * > 
mPItemsByType
 

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 18 of file HcalSiPMCharacteristics.h.

Constructor & Destructor Documentation

HcalSiPMCharacteristics::HcalSiPMCharacteristics ( )
inline

Definition at line 49 of file HcalSiPMCharacteristics.h.

49 {}
HcalSiPMCharacteristics::HcalSiPMCharacteristics ( const HcalSiPMCharacteristicsAddons::Helper helper)

Definition at line 9 of file HcalSiPMCharacteristics.cc.

References initialize().

10  : mPItems(helper.mPItems.begin(), helper.mPItems.end()) {
11  initialize();
12 }
std::set< HcalSiPMCharacteristics::PrecisionItem, LessByType > mPItems
std::vector< PrecisionItem > mPItems
HcalSiPMCharacteristics::~HcalSiPMCharacteristics ( )

Definition at line 14 of file HcalSiPMCharacteristics.cc.

14 {}
HcalSiPMCharacteristics::HcalSiPMCharacteristics ( const HcalSiPMCharacteristics src)

Definition at line 17 of file HcalSiPMCharacteristics.cc.

std::vector< const PrecisionItem * > mPItemsByType
std::vector< PrecisionItem > mPItems
HcalSiPMCharacteristics::HcalSiPMCharacteristics ( HcalSiPMCharacteristics &&  other)

Definition at line 34 of file HcalSiPMCharacteristics.cc.

References swap().

35  other.swap(*this);
36 }
void swap(HcalSiPMCharacteristics &other)

Member Function Documentation

const HcalSiPMCharacteristics::PrecisionItem * HcalSiPMCharacteristics::findByType ( int  type) const

Definition at line 38 of file HcalSiPMCharacteristics.cc.

References getTypes(), mps_fire::i, and mPItems.

38  {
39  const HcalSiPMCharacteristics::PrecisionItem* retItem = nullptr;
40 
41  for (unsigned int i = 0; i < getTypes(); i++) {
42  auto iter = &mPItems.at(i);
43  if (type == iter->type_)
44  retItem = iter;
45  }
46  return retItem;
47 
48  //NOT WORKING:
49  //PrecisionItem target(type, 0, 0, 0, 0, 0, 0, 0);
50  //return HcalObjectAddons::findByT<PrecisionItem,HcalSiPMCharacteristicsAddons::LessByType>(&target,mPItemsByType);
51 }
unsigned int getTypes() const
get # of types
std::vector< PrecisionItem > mPItems
int HcalSiPMCharacteristics::getAuxi1 ( int  type) const
float HcalSiPMCharacteristics::getAuxi2 ( int  type) const
float HcalSiPMCharacteristics::getCrossTalk ( int  type) const

get cross talk

Definition at line 88 of file HcalSiPMCharacteristics.cc.

References HcalSiPMCharacteristics::PrecisionItem::crossTalk_, and B2GTnPMonitor_cfi::item.

Referenced by HcalSiPMCharacteristicsGPU::HcalSiPMCharacteristicsGPU(), HBHEPhase1Reconstructor::processData(), and HcalSimParameters::sipmCrossTalk().

88  {
89  const PrecisionItem* item = findByType(type);
90  return (item ? item->crossTalk_ : 0);
91 }
const PrecisionItem * findByType(int type) const
std::vector< float > HcalSiPMCharacteristics::getNonLinearities ( int  type) const
int HcalSiPMCharacteristics::getPixels ( int  type) const
int HcalSiPMCharacteristics::getType ( unsigned int  k) const
inline

Definition at line 66 of file HcalSiPMCharacteristics.h.

References isotrackApplyRegressor::k, and mPItems.

Referenced by HcalSiPMCharacteristicsGPU::HcalSiPMCharacteristicsGPU().

66 { return mPItems[k].type_; }
std::vector< PrecisionItem > mPItems
unsigned int HcalSiPMCharacteristics::getTypes ( ) const
inline

get # of types

Definition at line 65 of file HcalSiPMCharacteristics.h.

References mPItems.

Referenced by findByType(), and HcalSiPMCharacteristicsGPU::HcalSiPMCharacteristicsGPU().

65 { return mPItems.size(); }
std::vector< PrecisionItem > mPItems
void HcalSiPMCharacteristics::initialize ( )
HcalSiPMCharacteristics & HcalSiPMCharacteristics::operator= ( const HcalSiPMCharacteristics rhs)

Definition at line 21 of file HcalSiPMCharacteristics.cc.

References swap(), and groupFilesInBlocks::temp.

21  {
23  temp.swap(*this);
24  return *this;
25 }
template<class Archive >
void HcalSiPMCharacteristics::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void HcalSiPMCharacteristics::sortByType ( )

Definition at line 103 of file HcalSiPMCharacteristics.cc.

Referenced by initialize().

103  {
104  HcalObjectAddons::sortByT<PrecisionItem, HcalSiPMCharacteristicsAddons::LessByType>(mPItems, mPItemsByType);
105 }
std::vector< const PrecisionItem * > mPItemsByType
std::vector< PrecisionItem > mPItems
void HcalSiPMCharacteristics::swap ( HcalSiPMCharacteristics other)

Definition at line 28 of file HcalSiPMCharacteristics.cc.

References mPItems, mPItemsByType, and std::swap().

Referenced by HcalSiPMCharacteristics(), and operator=().

28  {
29  std::swap(mPItems, other.mPItems);
31 }
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
std::vector< const PrecisionItem * > mPItemsByType
std::vector< PrecisionItem > mPItems

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 87 of file HcalSiPMCharacteristics.h.

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

Definition at line 87 of file HcalSiPMCharacteristics.h.

Member Data Documentation

std::vector<PrecisionItem> HcalSiPMCharacteristics::mPItems
protected

Definition at line 84 of file HcalSiPMCharacteristics.h.

Referenced by findByType(), getType(), getTypes(), and swap().

std::vector<const PrecisionItem*> HcalSiPMCharacteristics::mPItemsByType
protected

Definition at line 85 of file HcalSiPMCharacteristics.h.

Referenced by swap().