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 54 of file SiPixelGenErrorDBObject.h.

References isInvalid_.

Referenced by SiPixelGenError::pushfile().

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

Definition at line 95 of file SiPixelGenErrorDBObject.h.

References templ_ID.

Referenced by PixelCPEBase::fillDetParams().

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("SiPixelGenErrorDBObject") << "GenError 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>& SiPixelGenErrorDBObject::getGenErrorIDs ( ) const
inline

Definition at line 81 of file SiPixelGenErrorDBObject.h.

References templ_ID.

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

Definition at line 70 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_.

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  }
SiPixelGenErrorDBObject& SiPixelGenErrorDBObject::operator>> ( float &  f)
inline

Definition at line 39 of file SiPixelGenErrorDBObject.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 SiPixelGenErrorDBObject::push_back ( float  entry)
inline

Definition at line 57 of file SiPixelGenErrorDBObject.h.

References sVector_.

Referenced by SiPixelFakeGenErrorDBObjectESSource::produce().

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

Definition at line 83 of file SiPixelGenErrorDBObject.h.

References 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("SiPixelGenErrorDBObject") << "GenError 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 SiPixelGenErrorDBObject::putGenErrorIDs ( std::map< unsigned int, short > &  t_ID)
inline

Definition at line 80 of file SiPixelGenErrorDBObject.h.

References templ_ID.

80 {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 58 of file SiPixelGenErrorDBObject.h.

References index(), and index_.

void SiPixelGenErrorDBObject::setInvalid ( void  )
inline

Definition at line 53 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 67 of file SiPixelGenErrorDBObject.h.

References sVector_.

Referenced by SiPixelGenErrorDBObjectESProducer::produce(), and SiPixelGenError::pushfile().

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

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 113 of file SiPixelGenErrorDBObject.h.

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

Definition at line 113 of file SiPixelGenErrorDBObject.h.

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

Member Data Documentation

int SiPixelGenErrorDBObject::index_
private

Definition at line 105 of file SiPixelGenErrorDBObject.h.

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

bool SiPixelGenErrorDBObject::isInvalid_
private

Definition at line 109 of file SiPixelGenErrorDBObject.h.

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

int SiPixelGenErrorDBObject::maxIndex_
private

Definition at line 106 of file SiPixelGenErrorDBObject.h.

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

int SiPixelGenErrorDBObject::numOfTempl_
private

Definition at line 107 of file SiPixelGenErrorDBObject.h.

Referenced by numOfTempl(), and setNumOfTempl().

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

Definition at line 110 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 108 of file SiPixelGenErrorDBObject.h.

Referenced by setVersion(), and version().