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 
5 
6 #include <vector>
7 #include <iosfwd>
8 
9 //--- Maybe should make this a class const, but that'd be too much work.
10 //--- This usage is not worth it, since in the debugger will be obvious
11 //--- what this is! ;)
12 #define NONSENSE -99999.9
13 #define NONSENSE_I -99999
14 
16  public:
18  struct DbEntry {
19  float sigma;
20  float rms;
21  float bias; // For irradiated pixels
22  float pix_height; // For decapitation
23  float ave_Qclus; // Average cluster charge, For
27  ~DbEntry() {}
28 
30 };
31  typedef std::vector<DbEntry> DbVector;
32 
34  struct DbEntryBinSize {
42 
44 };
45  typedef std::vector<DbEntryBinSize> DbBinSizeVector;
46 
49 
51  friend std::ostream& operator<<(std::ostream& s, const SiPixelCPEGenericErrorParm& genericErrors);
52 
55 
57  inline DbVector & errors() { return errors_ ; }
58  inline DbBinSizeVector & errorsBin() { return errorsBinSize_ ; }
59  inline double & version() { return version_;}
60 
62  inline const DbVector & errors() const { return errors_ ; }
63  inline const DbBinSizeVector & errorsBinSize() const { return errorsBinSize_ ; }
64  inline const double & version() const { return version_;}
65 
67  inline void reserve() {
68  errors_.reserve(1000);
69  errorsBinSize_.reserve(4);
70  }
71  // &&& Should these sizes be computed on the fly from other
72  // &&& variables (which are currently not stored in this object,
73  // &&& but maybe should be?)
74 
75  //inline void push_back( DbEntry e) {errors_.push_back(e);}
76  // inline void push_back_bin( DbEntryBinSize e) {errorsBinSize_.push_back(e);}
77  inline void set_version (double v) {version_ = v;}
78 
79  // &&& Should we be able to read this from an iostream? See PxCPEdbUploader...
80 
81  private:
84  double version_;
85 
87 };
88 
89 #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 COND_SERIALIZABLE
Definition: Serializable.h:37
#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.