CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
SiPixelTemplateDBObject::Reader Struct Reference

#include <SiPixelTemplateDBObject.h>

Public Member Functions

bool fail ()
 
void incrementIndex (int i)
 
int index () const
 
int numOfTempl () const
 
Readeroperator>> (int &i)
 
Readeroperator>> (float &f)
 
 Reader (SiPixelTemplateDBObject const &idb)
 
void setInvalid ()
 
std::vector< float > const & sVector () const
 
float version () const
 

Public Attributes

SiPixelTemplateDBObject const & db
 
int index_
 
bool isInvalid_
 

Detailed Description

Definition at line 18 of file SiPixelTemplateDBObject.h.

Constructor & Destructor Documentation

◆ Reader()

SiPixelTemplateDBObject::Reader::Reader ( SiPixelTemplateDBObject const &  idb)
inlineexplicit

Member Function Documentation

◆ fail()

bool SiPixelTemplateDBObject::Reader::fail ( )
inline

Definition at line 44 of file SiPixelTemplateDBObject.h.

References isInvalid_.

◆ incrementIndex()

void SiPixelTemplateDBObject::Reader::incrementIndex ( int  i)
inline

Definition at line 51 of file SiPixelTemplateDBObject.h.

References mps_fire::i, and index_.

◆ index()

int SiPixelTemplateDBObject::Reader::index ( ) const
inline

Definition at line 45 of file SiPixelTemplateDBObject.h.

References index_.

◆ numOfTempl()

int SiPixelTemplateDBObject::Reader::numOfTempl ( ) const
inline

Definition at line 46 of file SiPixelTemplateDBObject.h.

References db, and SiPixelTemplateDBObject::numOfTempl().

46 { return db.numOfTempl(); }
SiPixelTemplateDBObject const & db

◆ operator>>() [1/2]

Reader& SiPixelTemplateDBObject::Reader::operator>> ( int &  i)
inline

◆ operator>>() [2/2]

Reader& SiPixelTemplateDBObject::Reader::operator>> ( float &  f)
inline

Definition at line 32 of file SiPixelTemplateDBObject.h.

References db, f, index_, isInvalid_, SiPixelTemplateDBObject::maxIndex(), setInvalid(), and SiPixelTemplateDBObject::sVector().

32  {
33  isInvalid_ = false;
34  if (index_ <= db.maxIndex()) {
35  f = db.sVector()[index_];
36  index_++;
37  } else
38  setInvalid();
39  return *this;
40  }
SiPixelTemplateDBObject const & db
double f[11][100]
std::vector< float > const & sVector() const

◆ setInvalid()

void SiPixelTemplateDBObject::Reader::setInvalid ( void  )
inline

Definition at line 43 of file SiPixelTemplateDBObject.h.

References isInvalid_.

Referenced by operator>>().

◆ sVector()

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

Definition at line 48 of file SiPixelTemplateDBObject.h.

References db, and SiPixelTemplateDBObject::sVector().

48 { return db.sVector(); }
SiPixelTemplateDBObject const & db
std::vector< float > const & sVector() const

◆ version()

float SiPixelTemplateDBObject::Reader::version ( ) const
inline

Member Data Documentation

◆ db

SiPixelTemplateDBObject const& SiPixelTemplateDBObject::Reader::db

Definition at line 55 of file SiPixelTemplateDBObject.h.

Referenced by numOfTempl(), operator>>(), sVector(), and version().

◆ index_

int SiPixelTemplateDBObject::Reader::index_

Definition at line 53 of file SiPixelTemplateDBObject.h.

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

◆ isInvalid_

bool SiPixelTemplateDBObject::Reader::isInvalid_

Definition at line 54 of file SiPixelTemplateDBObject.h.

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