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>> (float &f)
 
Readeroperator>> (int &i)
 
 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

Definition at line 19 of file SiPixelTemplateDBObject.h.

19 : index_(0), isInvalid_(false), db(idb) {}

Member Function Documentation

◆ fail()

bool SiPixelTemplateDBObject::Reader::fail ( )
inline

Definition at line 44 of file SiPixelTemplateDBObject.h.

44 { return isInvalid_; }

References isInvalid_.

◆ incrementIndex()

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

Definition at line 51 of file SiPixelTemplateDBObject.h.

51 { index_ += i; }

References mps_fire::i, and index_.

◆ index()

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

Definition at line 45 of file SiPixelTemplateDBObject.h.

45 { return index_; }

References index_.

Referenced by BeautifulSoup.PageElement::insert().

◆ numOfTempl()

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

Definition at line 46 of file SiPixelTemplateDBObject.h.

46 { return db.numOfTempl(); }

References db, and SiPixelTemplateDBObject::numOfTempl().

◆ operator>>() [1/2]

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

Definition at line 32 of file SiPixelTemplateDBObject.h.

32  {
33  isInvalid_ = false;
34  if (index_ <= db.maxIndex()) {
35  f = db.sVector()[index_];
36  index_++;
37  } else
38  setInvalid();
39  return *this;
40  }

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

◆ operator>>() [2/2]

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

Definition at line 22 of file SiPixelTemplateDBObject.h.

22  {
23  isInvalid_ = false;
24  if (index_ <= db.maxIndex()) {
25  i = (int)db.sVector()[index_];
26  index_++;
27  } else
28  setInvalid();
29  return *this;
30  }

References db, mps_fire::i, index_, createfilelist::int, isInvalid_, SiPixelTemplateDBObject::maxIndex(), setInvalid(), and SiPixelTemplateDBObject::sVector().

◆ setInvalid()

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

Definition at line 43 of file SiPixelTemplateDBObject.h.

43 { isInvalid_ = true; }

References isInvalid_.

Referenced by operator>>().

◆ sVector()

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

Definition at line 48 of file SiPixelTemplateDBObject.h.

48 { return db.sVector(); }

References db, and SiPixelTemplateDBObject::sVector().

◆ version()

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

Definition at line 47 of file SiPixelTemplateDBObject.h.

47 { return db.version(); }

References db, and SiPixelTemplateDBObject::version().

Referenced by validation.Sample::datasetpattern(), and validation.Sample::filename().

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().

mps_fire.i
i
Definition: mps_fire.py:355
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
SiPixelTemplateDBObject::Reader::isInvalid_
bool isInvalid_
Definition: SiPixelTemplateDBObject.h:54
SiPixelTemplateDBObject::numOfTempl
int numOfTempl() const
Definition: SiPixelTemplateDBObject.h:103
SiPixelTemplateDBObject::version
float version() const
Definition: SiPixelTemplateDBObject.h:104
SiPixelTemplateDBObject::maxIndex
int maxIndex() const
Definition: SiPixelTemplateDBObject.h:102
SiPixelTemplateDBObject::Reader::index_
int index_
Definition: SiPixelTemplateDBObject.h:53
SiPixelTemplateDBObject::sVector
std::vector< float > const & sVector() const
Definition: SiPixelTemplateDBObject.h:105
createfilelist.int
int
Definition: createfilelist.py:10
SiPixelTemplateDBObject::Reader::db
SiPixelTemplateDBObject const & db
Definition: SiPixelTemplateDBObject.h:55
SiPixelTemplateDBObject::Reader::setInvalid
void setInvalid()
Definition: SiPixelTemplateDBObject.h:43