CMS 3D CMS Logo

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

#include <SiPixelGenErrorDBObject.h>

Classes

union  char2float
 

Public Member Functions

bool fail ()
 
short getGenErrorID (const uint32_t &detid) const
 
const std::map< unsigned int, short > & getGenErrorIDs () const
 
void incrementIndex (int i)
 
int index () const
 
int maxIndex () const
 
int numOfTempl () const
 
SiPixelGenErrorDBObjectoperator>> (int &i)
 
SiPixelGenErrorDBObjectoperator>> (float &f)
 
void push_back (float entry)
 
bool putGenErrorID (const uint32_t &detid, short &value)
 
void putGenErrorIDs (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)
 
 SiPixelGenErrorDBObject ()
 
std::vector< float > sVector () const
 
float version () const
 
virtual ~SiPixelGenErrorDBObject ()
 

Private Member Functions

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

Private Attributes

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

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 
std::ostream & operator<< (std::ostream &s, const SiPixelGenErrorDBObject &dbobject)
 

Detailed Description

Definition at line 16 of file SiPixelGenErrorDBObject.h.

Constructor & Destructor Documentation

SiPixelGenErrorDBObject::SiPixelGenErrorDBObject ( )
inline
virtual SiPixelGenErrorDBObject::~SiPixelGenErrorDBObject ( )
inlinevirtual

Definition at line 21 of file SiPixelGenErrorDBObject.h.

References operator<<, and alignCSCRings::s.

21 {}

Member Function Documentation

bool SiPixelGenErrorDBObject::fail ( )
inline

Definition at line 50 of file SiPixelGenErrorDBObject.h.

References isInvalid_.

Referenced by SiPixelGenError::pushfile().

short SiPixelGenErrorDBObject::getGenErrorID ( const uint32_t &  detid) const
inline

Definition at line 89 of file SiPixelGenErrorDBObject.h.

References templ_ID.

Referenced by PixelCPEBase::fillDetParams().

89  {
90  std::map<unsigned int, short>::const_iterator id = templ_ID.find(detid);
91  if (id != templ_ID.end())
92  return id->second;
93  else
94  edm::LogError("SiPixelGenErrorDBObject") << "GenError ID for DetID " << detid << " is not stored" << std::endl;
95  return 0;
96  }
std::map< unsigned int, short > templ_ID
const std::map<unsigned int, short>& SiPixelGenErrorDBObject::getGenErrorIDs ( ) const
inline

Definition at line 76 of file SiPixelGenErrorDBObject.h.

References templ_ID.

76 { return templ_ID; }
std::map< unsigned int, short > templ_ID
void SiPixelGenErrorDBObject::incrementIndex ( int  i)
inline

Definition at line 66 of file SiPixelGenErrorDBObject.h.

References mps_fire::i, and index_.

Referenced by SiPixelGenError::pushfile().

int SiPixelGenErrorDBObject::index ( ) const
inline
int SiPixelGenErrorDBObject::maxIndex ( ) const
inline
int SiPixelGenErrorDBObject::numOfTempl ( ) const
inline
SiPixelGenErrorDBObject& SiPixelGenErrorDBObject::operator>> ( int &  i)
inline

Definition at line 27 of file SiPixelGenErrorDBObject.h.

References index_, createfilelist::int, isInvalid_, and maxIndex_.

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

Definition at line 37 of file SiPixelGenErrorDBObject.h.

References index_, isInvalid_, and maxIndex_.

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

Definition at line 53 of file SiPixelGenErrorDBObject.h.

References sVector_.

Referenced by SiPixelFakeGenErrorDBObjectESSource::produce().

53 { sVector_.push_back(entry); }
bool SiPixelGenErrorDBObject::putGenErrorID ( const uint32_t &  detid,
short &  value 
)
inline

Definition at line 78 of file SiPixelGenErrorDBObject.h.

References templ_ID, and relativeConstraints::value.

78  {
79  std::map<unsigned int, short>::const_iterator id = templ_ID.find(detid);
80  if (id != templ_ID.end()) {
81  edm::LogError("SiPixelGenErrorDBObject")
82  << "GenError ID for DetID " << detid << " is already stored. Skipping this put" << std::endl;
83  return false;
84  } else
85  templ_ID[detid] = value;
86  return true;
87  }
std::map< unsigned int, short > templ_ID
void SiPixelGenErrorDBObject::putGenErrorIDs ( std::map< unsigned int, short > &  t_ID)
inline

Definition at line 75 of file SiPixelGenErrorDBObject.h.

References templ_ID.

75 { templ_ID = t_ID; }
std::map< unsigned int, short > templ_ID
template<class Archive >
void SiPixelGenErrorDBObject::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void SiPixelGenErrorDBObject::setIndex ( int  index)
inline

Definition at line 54 of file SiPixelGenErrorDBObject.h.

References index(), and index_.

void SiPixelGenErrorDBObject::setInvalid ( void  )
inline

Definition at line 49 of file SiPixelGenErrorDBObject.h.

References isInvalid_.

void SiPixelGenErrorDBObject::setMaxIndex ( int  maxIndex)
inline
void SiPixelGenErrorDBObject::setNumOfTempl ( int  numOfTempl)
inline
void SiPixelGenErrorDBObject::setVersion ( float  version)
inline
std::vector<float> SiPixelGenErrorDBObject::sVector ( ) const
inline

Definition at line 63 of file SiPixelGenErrorDBObject.h.

References sVector_.

Referenced by SiPixelGenError::pushfile().

63 { return sVector_; }
float SiPixelGenErrorDBObject::version ( ) const
inline

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 107 of file SiPixelGenErrorDBObject.h.

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

Definition at line 107 of file SiPixelGenErrorDBObject.h.

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

Member Data Documentation

int SiPixelGenErrorDBObject::index_
private

Definition at line 99 of file SiPixelGenErrorDBObject.h.

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

bool SiPixelGenErrorDBObject::isInvalid_
private

Definition at line 103 of file SiPixelGenErrorDBObject.h.

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

int SiPixelGenErrorDBObject::maxIndex_
private

Definition at line 100 of file SiPixelGenErrorDBObject.h.

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

int SiPixelGenErrorDBObject::numOfTempl_
private

Definition at line 101 of file SiPixelGenErrorDBObject.h.

Referenced by numOfTempl(), and setNumOfTempl().

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

Definition at line 104 of file SiPixelGenErrorDBObject.h.

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

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

Definition at line 102 of file SiPixelGenErrorDBObject.h.

Referenced by setVersion(), and version().