File indexing completed on 2023-03-17 10:46:35
0001 #ifndef big_h
0002 #define big_h 1
0003 #include "CondFormats/Serialization/interface/Serializable.h"
0004
0005 #include <vector>
0006 #include <string>
0007 #include "CondFormats/Calibration/interface/TensorIndex.h"
0008 class big {
0009 public:
0010 big() : id_current(-1), index_id(-1), cota_current(0.), cotb_current(0.), fpix_current(false) {
0011
0012 tVector_.reserve(1000);
0013 thVector_.reserve(1000);
0014 sVector_.reserve(1000);
0015 }
0016 void fill(size_t tVectorSize, size_t thVectorSize, size_t sVectorSize, const std::string& atitle);
0017
0018
0019 class bigEntry {
0020 public:
0021
0022 bigEntry() {
0023 par.reserve(parIDX::SIZE);
0024 ytemp.reserve(ytempIDX::SIZE);
0025 xtemp.reserve(xtempIDX::SIZE);
0026 avg.reserve(avgIDX::SIZE);
0027 aqfl.reserve(aqflIDX::SIZE);
0028 chi2.reserve(chi2IDX::SIZE);
0029 spare.reserve(spareIDX::SIZE);
0030 }
0031 void fill(int runnum, float seed);
0032
0033 public:
0034 int runnum;
0035 float alpha;
0036 float cotalpha;
0037 float beta;
0038 float cotbeta;
0039 float costrk[3];
0040 float qavg;
0041 float symax;
0042 float dyone;
0043 float syone;
0044 float sxmax;
0045 float dxone;
0046 float sxone;
0047 float dytwo;
0048 float sytwo;
0049 float dxtwo;
0050 float sxtwo;
0051 float qmin;
0052
0053 typedef TensorIndex<2, 2, 5> parIDX;
0054 std::vector<float> par;
0055
0056 typedef TensorIndex<9, 21> ytempIDX;
0057 std::vector<float> ytemp;
0058
0059 typedef TensorIndex<9, 7> xtempIDX;
0060 std::vector<float> xtemp;
0061
0062 typedef TensorIndex<2, 4, 4> avgIDX;
0063 std::vector<float> avg;
0064
0065 typedef TensorIndex<2, 4, 6> aqflIDX;
0066 std::vector<float> aqfl;
0067
0068 typedef TensorIndex<2, 2, 4> chi2IDX;
0069 std::vector<float> chi2;
0070
0071 typedef TensorIndex<2, 10> spareIDX;
0072 std::vector<float> spare;
0073
0074 COND_SERIALIZABLE;
0075 };
0076
0077
0078 class bigHeader {
0079 public:
0080 bigHeader() : title("") {}
0081 void fill(const std::string& atitle);
0082
0083 std::string title;
0084 int ID;
0085 int NBy;
0086 int NByx;
0087 int NBxx;
0088 int NFy;
0089 int NFyx;
0090 int NFxx;
0091 float vbias;
0092 float temperature;
0093 float fluence;
0094 float qscale;
0095 float s50;
0096 int templ_version;
0097
0098 COND_SERIALIZABLE;
0099 };
0100
0101
0102 class bigStore {
0103 public:
0104
0105 bigStore() {
0106 entby.reserve(entbyIDX::SIZE);
0107 entbx.reserve(entbxIDX::SIZE);
0108 entfy.reserve(entfyIDX::SIZE);
0109 entfx.reserve(entfxIDX::SIZE);
0110 }
0111
0112 void fill(const std::string& atitle);
0113
0114 bigHeader head;
0115 typedef TensorIndex<60> entbyIDX;
0116 std::vector<bigEntry> entby;
0117 typedef TensorIndex<5, 9> entbxIDX;
0118 std::vector<bigEntry> entbx;
0119 typedef TensorIndex<5> entfyIDX;
0120 std::vector<bigEntry> entfy;
0121 typedef TensorIndex<2, 9> entfxIDX;
0122 std::vector<bigEntry> entfx;
0123
0124 COND_SERIALIZABLE;
0125 };
0126
0127 typedef std::vector<bigEntry> entryVector;
0128 typedef std::vector<bigHeader> headVector;
0129 typedef std::vector<bigStore> storeVector;
0130
0131 private:
0132 entryVector tVector_;
0133 headVector thVector_;
0134 storeVector sVector_;
0135 int id_current;
0136 int index_id;
0137 float cota_current;
0138 float cotb_current;
0139 float abs_cotb;
0140 bool fpix_current;
0141
0142 COND_SERIALIZABLE;
0143 };
0144 #endif