CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 i, and index_.

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

Definition at line 51 of file SiPixelTemplateDBObject.h.

References index_.

Referenced by BeautifulSoup.PageElement::_invert().

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

Definition at line 52 of file SiPixelTemplateDBObject.h.

References db, and SiPixelTemplateDBObject::numOfTempl().

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

Definition at line 22 of file SiPixelTemplateDBObject.h.

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

23  {
24  isInvalid_ = false;
25  if(index_<=db.maxIndex()) {
26  i = (int) db.sVector()[index_];
27  index_++;
28  }
29  else
30  setInvalid();
31  return *this;
32  }
int i
Definition: DBlmapReader.cc:9
SiPixelTemplateDBObject const & db
std::vector< float > const & sVector() const
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

Definition at line 53 of file SiPixelTemplateDBObject.h.

References db, and SiPixelTemplateDBObject::version().

53 {return db.version();}
SiPixelTemplateDBObject const & db

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_

Definition at line 60 of file SiPixelTemplateDBObject.h.

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

bool SiPixelTemplateDBObject::Reader::isInvalid_

Definition at line 61 of file SiPixelTemplateDBObject.h.

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