#include <SiPixelCPEGenericErrorParm.h>
Classes | |
struct | DbEntry |
A struct to hold information for a given (alpha,beta,size) More... | |
struct | DbEntryBinSize |
A struct to hold the binning information for (part, size, alpha, beta) More... | |
Public Types | |
typedef std::vector < DbEntryBinSize > | DbBinSizeVector |
typedef std::vector< DbEntry > | DbVector |
Public Member Functions | |
DbVector & | errors () |
Accessors for the vectors -- non-const version. | |
const DbVector & | errors () const |
Accessors for the vectors -- const version. | |
DbBinSizeVector & | errorsBin () |
const DbBinSizeVector & | errorsBinSize () const |
void | fillCPEGenericErrorParm (double version, std::string file) |
Function to fill the db object given a filename. | |
void | reserve () |
Reserve some reasonable sizes for the vectors. | |
void | set_version (double v) |
SiPixelCPEGenericErrorParm () | |
const double & | version () const |
double & | version () |
virtual | ~SiPixelCPEGenericErrorParm () |
Private Attributes | |
DbVector | errors_ |
DbBinSizeVector | errorsBinSize_ |
double | version_ |
Friends | |
std::ostream & | operator<< (std::ostream &s, const SiPixelCPEGenericErrorParm &genericErrors) |
Function to output the contents of the db object. |
Definition at line 13 of file SiPixelCPEGenericErrorParm.h.
typedef std::vector<DbEntryBinSize> SiPixelCPEGenericErrorParm::DbBinSizeVector |
Definition at line 39 of file SiPixelCPEGenericErrorParm.h.
typedef std::vector<DbEntry> SiPixelCPEGenericErrorParm::DbVector |
Definition at line 27 of file SiPixelCPEGenericErrorParm.h.
SiPixelCPEGenericErrorParm::SiPixelCPEGenericErrorParm | ( | ) | [inline] |
Definition at line 41 of file SiPixelCPEGenericErrorParm.h.
: errors_(), errorsBinSize_() {}
virtual SiPixelCPEGenericErrorParm::~SiPixelCPEGenericErrorParm | ( | ) | [inline, virtual] |
Definition at line 42 of file SiPixelCPEGenericErrorParm.h.
{}
DbVector& SiPixelCPEGenericErrorParm::errors | ( | ) | [inline] |
Accessors for the vectors -- non-const version.
Definition at line 51 of file SiPixelCPEGenericErrorParm.h.
References errors_.
Referenced by SiPixelCPEGenericDBErrorParametrization::getError().
{ return errors_ ; }
const DbVector& SiPixelCPEGenericErrorParm::errors | ( | ) | const [inline] |
Accessors for the vectors -- const version.
Definition at line 56 of file SiPixelCPEGenericErrorParm.h.
References errors_.
{ return errors_ ; }
DbBinSizeVector& SiPixelCPEGenericErrorParm::errorsBin | ( | ) | [inline] |
Definition at line 52 of file SiPixelCPEGenericErrorParm.h.
References errorsBinSize_.
{ return errorsBinSize_ ; }
const DbBinSizeVector& SiPixelCPEGenericErrorParm::errorsBinSize | ( | ) | const [inline] |
Definition at line 57 of file SiPixelCPEGenericErrorParm.h.
References errorsBinSize_.
{ return errorsBinSize_ ; }
void SiPixelCPEGenericErrorParm::fillCPEGenericErrorParm | ( | double | version, |
std::string | file | ||
) |
Function to fill the db object given a filename.
Definition at line 5 of file SiPixelCPEGenericErrorParm.cc.
References SiPixelCPEGenericErrorParm::DbEntryBinSize::alphaBin_size, SiPixelCPEGenericErrorParm::DbEntry::ave_Qclus, SiPixelCPEGenericErrorParm::DbEntryBinSize::betaBin_size, SiPixelCPEGenericErrorParm::DbEntry::bias, errors_, errorsBinSize_, recoMuon::in, SiPixelCPEGenericErrorParm::DbEntryBinSize::partBin_size, SiPixelCPEGenericErrorParm::DbEntry::pix_height, SiPixelCPEGenericErrorParm::DbEntry::rms, set_version(), SiPixelCPEGenericErrorParm::DbEntry::sigma, and SiPixelCPEGenericErrorParm::DbEntryBinSize::sizeBin_size.
{ //--- Open the file std::ifstream in(file.c_str(), std::ios::in); //--- Currently do not need to store part of detector, but is in input file int part; set_version(version); DbEntry Entry; in >> part >> Entry.bias >> Entry.pix_height >> Entry.ave_Qclus >> Entry.sigma >> Entry.rms; while(!in.eof()) { errors_.push_back( Entry ); in >> part >> Entry.bias >> Entry.pix_height >> Entry.ave_Qclus >> Entry.sigma >> Entry.rms; } //--- Finished parsing the file, we're done. in.close(); //--- Specify the current binning sizes to use DbEntryBinSize ErrorsBinSize; //--- Part = 1 By ErrorsBinSize.partBin_size = 0; ErrorsBinSize.sizeBin_size = 40; ErrorsBinSize.alphaBin_size = 10; ErrorsBinSize.betaBin_size = 1; errorsBinSize_.push_back(ErrorsBinSize); //--- Part = 2 Bx ErrorsBinSize.partBin_size = 240; ErrorsBinSize.alphaBin_size = 1; ErrorsBinSize.betaBin_size = 10; errorsBinSize_.push_back(ErrorsBinSize); //--- Part = 3 Fy ErrorsBinSize.partBin_size = 360; ErrorsBinSize.alphaBin_size = 10; ErrorsBinSize.betaBin_size = 1; errorsBinSize_.push_back(ErrorsBinSize); //--- Part = 4 Fx ErrorsBinSize.partBin_size = 380; ErrorsBinSize.alphaBin_size = 1; ErrorsBinSize.betaBin_size = 10; errorsBinSize_.push_back(ErrorsBinSize); }
void SiPixelCPEGenericErrorParm::reserve | ( | ) | [inline] |
Reserve some reasonable sizes for the vectors.
Definition at line 61 of file SiPixelCPEGenericErrorParm.h.
References errors_, and errorsBinSize_.
{ errors_.reserve(1000); errorsBinSize_.reserve(4); }
void SiPixelCPEGenericErrorParm::set_version | ( | double | v | ) | [inline] |
Definition at line 71 of file SiPixelCPEGenericErrorParm.h.
Referenced by fillCPEGenericErrorParm().
const double& SiPixelCPEGenericErrorParm::version | ( | ) | const [inline] |
Definition at line 58 of file SiPixelCPEGenericErrorParm.h.
References version_.
{ return version_;}
double& SiPixelCPEGenericErrorParm::version | ( | ) | [inline] |
Definition at line 53 of file SiPixelCPEGenericErrorParm.h.
References version_.
{ return version_;}
std::ostream& operator<< | ( | std::ostream & | s, |
const SiPixelCPEGenericErrorParm & | genericErrors | ||
) | [friend] |
Function to output the contents of the db object.
Definition at line 51 of file SiPixelCPEGenericErrorParm.cc.
{ for (unsigned int count=0; count < genericErrors.errors_.size(); ++count) { s.precision(6); s << genericErrors.errors_[count].bias << " " << genericErrors.errors_[count].pix_height << " " << genericErrors.errors_[count].ave_Qclus << " " << std::fixed << genericErrors.errors_[count].sigma << " " << genericErrors.errors_[count].rms << std::endl; s.unsetf ( std::ios_base::fixed ); } return s; }
DbVector SiPixelCPEGenericErrorParm::errors_ [private] |
Definition at line 76 of file SiPixelCPEGenericErrorParm.h.
Referenced by errors(), fillCPEGenericErrorParm(), operator<<(), and reserve().
Definition at line 77 of file SiPixelCPEGenericErrorParm.h.
Referenced by errorsBin(), errorsBinSize(), fillCPEGenericErrorParm(), and reserve().
double SiPixelCPEGenericErrorParm::version_ [private] |
Definition at line 78 of file SiPixelCPEGenericErrorParm.h.
Referenced by set_version(), and version().