Go to the documentation of this file.00001 #ifndef CondFormats_SiPixelObjects_SiPixelCPEGenericErrorParm_h
00002 #define CondFormats_SiPixelObjects_SiPixelCPEGenericErrorParm_h 1
00003
00004 #include <vector>
00005 #include <iosfwd>
00006
00007
00008
00009
00010 #define NONSENSE -99999.9
00011 #define NONSENSE_I -99999
00012
00013 class SiPixelCPEGenericErrorParm {
00014 public:
00016 struct DbEntry {
00017 float sigma;
00018 float rms;
00019 float bias;
00020 float pix_height;
00021 float ave_Qclus;
00022 DbEntry() : sigma(NONSENSE), rms(NONSENSE),
00023 bias(NONSENSE), pix_height(NONSENSE),
00024 ave_Qclus(NONSENSE) {}
00025 ~DbEntry() {}
00026 };
00027 typedef std::vector<DbEntry> DbVector;
00028
00030 struct DbEntryBinSize {
00031 int partBin_size;
00032 int sizeBin_size;
00033 int alphaBin_size;
00034 int betaBin_size;
00035 DbEntryBinSize() : partBin_size(NONSENSE_I), sizeBin_size(NONSENSE_I),
00036 alphaBin_size(NONSENSE_I), betaBin_size(NONSENSE_I) {}
00037 ~DbEntryBinSize() {}
00038 };
00039 typedef std::vector<DbEntryBinSize> DbBinSizeVector;
00040
00041 SiPixelCPEGenericErrorParm() : errors_(), errorsBinSize_() {}
00042 virtual ~SiPixelCPEGenericErrorParm(){}
00043
00045 friend std::ostream& operator<<(std::ostream& s, const SiPixelCPEGenericErrorParm& genericErrors);
00046
00048 void fillCPEGenericErrorParm(double version, std::string file);
00049
00051 inline DbVector & errors() { return errors_ ; }
00052 inline DbBinSizeVector & errorsBin() { return errorsBinSize_ ; }
00053 inline double & version() { return version_;}
00054
00056 inline const DbVector & errors() const { return errors_ ; }
00057 inline const DbBinSizeVector & errorsBinSize() const { return errorsBinSize_ ; }
00058 inline const double & version() const { return version_;}
00059
00061 inline void reserve() {
00062 errors_.reserve(1000);
00063 errorsBinSize_.reserve(4);
00064 }
00065
00066
00067
00068
00069
00070
00071 inline void set_version (double v) {version_ = v;}
00072
00073
00074
00075 private:
00076 DbVector errors_ ;
00077 DbBinSizeVector errorsBinSize_;
00078 double version_;
00079 };
00080
00081 #endif