CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiPixelCPEGenericErrorParm.h
Go to the documentation of this file.
1 #ifndef CondFormats_SiPixelObjects_SiPixelCPEGenericErrorParm_h
2 #define CondFormats_SiPixelObjects_SiPixelCPEGenericErrorParm_h 1
3 
4 #include <vector>
5 #include <iosfwd>
6 
7 //--- Maybe should make this a class const, but that'd be too much work.
8 //--- This usage is not worth it, since in the debugger will be obvious
9 //--- what this is! ;)
10 #define NONSENSE -99999.9
11 #define NONSENSE_I -99999
12 
14  public:
16  struct DbEntry {
17  float sigma;
18  float rms;
19  float bias; // For irradiated pixels
20  float pix_height; // For decapitation
21  float ave_Qclus; // Average cluster charge, For
25  ~DbEntry() {}
26  };
27  typedef std::vector<DbEntry> DbVector;
28 
30  struct DbEntryBinSize {
38  };
39  typedef std::vector<DbEntryBinSize> DbBinSizeVector;
40 
43 
45  friend std::ostream& operator<<(std::ostream& s, const SiPixelCPEGenericErrorParm& genericErrors);
46 
49 
51  inline DbVector & errors() { return errors_ ; }
52  inline DbBinSizeVector & errorsBin() { return errorsBinSize_ ; }
53  inline double & version() { return version_;}
54 
56  inline const DbVector & errors() const { return errors_ ; }
57  inline const DbBinSizeVector & errorsBinSize() const { return errorsBinSize_ ; }
58  inline const double & version() const { return version_;}
59 
61  inline void reserve() {
62  errors_.reserve(1000);
63  errorsBinSize_.reserve(4);
64  }
65  // &&& Should these sizes be computed on the fly from other
66  // &&& variables (which are currently not stored in this object,
67  // &&& but maybe should be?)
68 
69  //inline void push_back( DbEntry e) {errors_.push_back(e);}
70  // inline void push_back_bin( DbEntryBinSize e) {errorsBinSize_.push_back(e);}
71  inline void set_version (double v) {version_ = v;}
72 
73  // &&& Should we be able to read this from an iostream? See PxCPEdbUploader...
74 
75  private:
78  double version_;
79 };
80 
81 #endif
const DbBinSizeVector & errorsBinSize() const
void fillCPEGenericErrorParm(double version, std::string file)
Function to fill the db object given a filename.
#define NONSENSE_I
A struct to hold the binning information for (part, size, alpha, beta)
std::vector< DbEntryBinSize > DbBinSizeVector
DbVector & errors()
Accessors for the vectors – non-const version.
void reserve()
Reserve some reasonable sizes for the vectors.
#define NONSENSE
const DbVector & errors() const
Accessors for the vectors – const version.
A struct to hold information for a given (alpha,beta,size)
friend std::ostream & operator<<(std::ostream &s, const SiPixelCPEGenericErrorParm &genericErrors)
Function to output the contents of the db object.