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

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

Member Function Documentation

bool SiPixelTemplateDBObject::Reader::fail ( )
inline

Definition at line 50 of file SiPixelTemplateDBObject.h.

References isInvalid_.

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

Definition at line 58 of file SiPixelTemplateDBObject.h.

References mps_fire::i, and index_.

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

Definition at line 52 of file SiPixelTemplateDBObject.h.

References db, and SiPixelTemplateDBObject::numOfTempl().

Referenced by SiPixelTemplateDBObject::setNumOfTempl().

52 {return db.numOfTempl();}
SiPixelTemplateDBObject const & db
Reader& SiPixelTemplateDBObject::Reader::operator>> ( int &  i)
inline
Reader& SiPixelTemplateDBObject::Reader::operator>> ( float &  f)
inline

Definition at line 34 of file SiPixelTemplateDBObject.h.

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

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

Definition at line 49 of file SiPixelTemplateDBObject.h.

References isInvalid_.

Referenced by operator>>().

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

Definition at line 54 of file SiPixelTemplateDBObject.h.

References db, and SiPixelTemplateDBObject::sVector().

54 {return db.sVector();}
SiPixelTemplateDBObject const & db
std::vector< float > const & sVector() const
float SiPixelTemplateDBObject::Reader::version ( ) const
inline

Member Data Documentation

SiPixelTemplateDBObject const& SiPixelTemplateDBObject::Reader::db

Definition at line 62 of file SiPixelTemplateDBObject.h.

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

int SiPixelTemplateDBObject::Reader::index_
bool SiPixelTemplateDBObject::Reader::isInvalid_