CMS 3D CMS Logo

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

#include <SiPixelTemplateDBObject.h>

Classes

union  char2float
 

Public Member Functions

bool fail ()
 
short getTemplateID (const uint32_t &detid) const
 
const std::map< unsigned int,
short > & 
getTemplateIDs () const
 
void incrementIndex (int i)
 
int index () const
 
int maxIndex () const
 
int numOfTempl () const
 
SiPixelTemplateDBObjectoperator>> (int &i)
 
SiPixelTemplateDBObjectoperator>> (float &f)
 
void push_back (float entry)
 
bool putTemplateID (const uint32_t &detid, short &value)
 
void putTemplateIDs (std::map< unsigned int, short > &t_ID)
 
void setIndex (int index)
 
void setInvalid ()
 
void setMaxIndex (int maxIndex)
 
void setNumOfTempl (int numOfTempl)
 
void setVersion (float version)
 
 SiPixelTemplateDBObject ()
 
std::vector< float > sVector () const
 
float version () const
 
virtual ~SiPixelTemplateDBObject ()
 

Private Attributes

 COND_SERIALIZABLE
 
int index_
 
bool isInvalid_
 
int maxIndex_
 
int numOfTempl_
 
std::vector< float > sVector_
 
std::map< unsigned int, short > templ_ID
 
float version_
 

Friends

std::ostream & operator<< (std::ostream &s, const SiPixelTemplateDBObject &dbobject)
 

Detailed Description

Definition at line 16 of file SiPixelTemplateDBObject.h.

Constructor & Destructor Documentation

SiPixelTemplateDBObject::SiPixelTemplateDBObject ( )
inline
virtual SiPixelTemplateDBObject::~SiPixelTemplateDBObject ( )
inlinevirtual

Definition at line 21 of file SiPixelTemplateDBObject.h.

21 {}

Member Function Documentation

bool SiPixelTemplateDBObject::fail ( )
inline
short SiPixelTemplateDBObject::getTemplateID ( const uint32_t &  detid) const
inline

Definition at line 95 of file SiPixelTemplateDBObject.h.

References templ_ID.

Referenced by PixelCPEBase::fillDetParams(), and PixelCPETemplateReco::localPosition().

96  {
97  std::map<unsigned int,short>::const_iterator id=templ_ID.find(detid);
98  if(id!=templ_ID.end()) return id->second;
99  else edm::LogError("SiPixelTemplateDBObject") << "Template ID for DetID " << detid
100  << " is not stored" << std::endl;
101  return 0;
102  }
std::map< unsigned int, short > templ_ID
const std::map<unsigned int,short>& SiPixelTemplateDBObject::getTemplateIDs ( ) const
inline

Definition at line 81 of file SiPixelTemplateDBObject.h.

References templ_ID.

81 {return templ_ID;}
std::map< unsigned int, short > templ_ID
void SiPixelTemplateDBObject::incrementIndex ( int  i)
inline
int SiPixelTemplateDBObject::index ( ) const
inline
int SiPixelTemplateDBObject::maxIndex ( ) const
inline

Definition at line 64 of file SiPixelTemplateDBObject.h.

References maxIndex_.

Referenced by setMaxIndex().

int SiPixelTemplateDBObject::numOfTempl ( ) const
inline
SiPixelTemplateDBObject& SiPixelTemplateDBObject::operator>> ( int &  i)
inline

Definition at line 27 of file SiPixelTemplateDBObject.h.

References index_, isInvalid_, and maxIndex_.

28  {
29  isInvalid_ = false;
30  if(index_<=maxIndex_) {
31  i = (int) (*this).sVector_[index_];
32  index_++;
33  }
34  else
35  (*this).setInvalid();
36  return *this;
37  }
int i
Definition: DBlmapReader.cc:9
SiPixelTemplateDBObject& SiPixelTemplateDBObject::operator>> ( float &  f)
inline

Definition at line 39 of file SiPixelTemplateDBObject.h.

References index_, isInvalid_, and maxIndex_.

40  {
41  isInvalid_ = false;
42  if(index_<=maxIndex_) {
43  f = (*this).sVector_[index_];
44  index_++;
45  }
46  else
47  (*this).setInvalid();
48  return *this;
49  }
double f[11][100]
void SiPixelTemplateDBObject::push_back ( float  entry)
inline

Definition at line 57 of file SiPixelTemplateDBObject.h.

References sVector_.

57 {sVector_.push_back(entry);}
bool SiPixelTemplateDBObject::putTemplateID ( const uint32_t &  detid,
short &  value 
)
inline

Definition at line 83 of file SiPixelTemplateDBObject.h.

References cond::rpcobgas::detid, templ_ID, and relativeConstraints::value.

84  {
85  std::map<unsigned int,short>::const_iterator id=templ_ID.find(detid);
86  if(id!=templ_ID.end()){
87  edm::LogError("SiPixelTemplateDBObject") << "Template ID for DetID " << detid
88  << " is already stored. Skipping this put" << std::endl;
89  return false;
90  }
91  else templ_ID[detid] = value;
92  return true;
93  }
std::map< unsigned int, short > templ_ID
void SiPixelTemplateDBObject::putTemplateIDs ( std::map< unsigned int, short > &  t_ID)
inline

Definition at line 80 of file SiPixelTemplateDBObject.h.

References templ_ID.

80 {templ_ID = t_ID;}
std::map< unsigned int, short > templ_ID
void SiPixelTemplateDBObject::setIndex ( int  index)
inline

Definition at line 58 of file SiPixelTemplateDBObject.h.

References index(), and index_.

void SiPixelTemplateDBObject::setInvalid ( void  )
inline

Definition at line 53 of file SiPixelTemplateDBObject.h.

References isInvalid_.

void SiPixelTemplateDBObject::setMaxIndex ( int  maxIndex)
inline
void SiPixelTemplateDBObject::setNumOfTempl ( int  numOfTempl)
inline
void SiPixelTemplateDBObject::setVersion ( float  version)
inline

Definition at line 52 of file SiPixelTemplateDBObject.h.

References version(), and version_.

std::vector<float> SiPixelTemplateDBObject::sVector ( ) const
inline
float SiPixelTemplateDBObject::version ( ) const
inline

Definition at line 66 of file SiPixelTemplateDBObject.h.

References version_.

Referenced by setVersion().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const SiPixelTemplateDBObject dbobject 
)
friend

Member Data Documentation

SiPixelTemplateDBObject::COND_SERIALIZABLE
private

Definition at line 113 of file SiPixelTemplateDBObject.h.

int SiPixelTemplateDBObject::index_
private

Definition at line 105 of file SiPixelTemplateDBObject.h.

Referenced by incrementIndex(), index(), operator>>(), and setIndex().

bool SiPixelTemplateDBObject::isInvalid_
private

Definition at line 109 of file SiPixelTemplateDBObject.h.

Referenced by fail(), operator>>(), and setInvalid().

int SiPixelTemplateDBObject::maxIndex_
private

Definition at line 106 of file SiPixelTemplateDBObject.h.

Referenced by maxIndex(), operator>>(), and setMaxIndex().

int SiPixelTemplateDBObject::numOfTempl_
private

Definition at line 107 of file SiPixelTemplateDBObject.h.

Referenced by numOfTempl(), and setNumOfTempl().

std::vector<float> SiPixelTemplateDBObject::sVector_
private

Definition at line 110 of file SiPixelTemplateDBObject.h.

Referenced by push_back(), SiPixelTemplateDBObject(), and sVector().

std::map<unsigned int,short> SiPixelTemplateDBObject::templ_ID
private
float SiPixelTemplateDBObject::version_
private

Definition at line 108 of file SiPixelTemplateDBObject.h.

Referenced by setVersion(), and version().