Changeset 11972 for trunk/FACT++
- Timestamp:
- 09/05/11 21:42:44 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/PixelMap.h
r11960 r11972 13 13 #endif 14 14 15 // FIXME: Replace 416 by BIAS::kNumChannels 16 15 17 struct PixelMapEntry 16 18 { 17 int index; /// Software index 18 int cbpx; /// Hardware index as CBPX 19 int gapd; /// gAPD Bias voltage 20 int hv_board; /// Bias suppply board 21 int hv_channel; /// Bias supply channel 19 int index; /// Software index 20 int cbpx; /// Hardware index as CBPX 21 int gapd; /// gAPD index 22 float Vgapd; /// gAPD Bias voltage 23 int hv_board; /// Bias suppply board 24 int hv_channel; /// Bias supply channel 22 25 23 26 int crate() const { return cbpx/1000; } … … 58 61 59 62 int idummy; 60 float fdummy;61 63 62 64 PixelMapEntry entry; … … 67 69 str >> idummy; 68 70 str >> entry.gapd; 69 str >> fdummy;71 str >> entry.Vgapd; 70 72 str >> entry.hv_board; 71 73 str >> entry.hv_channel; … … 139 141 if (it->hv_board==board && it->hv_channel==channel) 140 142 { 141 avg += it-> gapd;143 avg += it->Vgapd; 142 144 num ++; 143 145 } … … 153 155 std::vector<float> Vgapd() const 154 156 { 155 std::vector<float> avg ;156 std::vector<int> num ;157 std::vector<float> avg(416); 158 std::vector<int> num(416); 157 159 158 160 for (std::vector<PixelMapEntry>::const_iterator it=begin(); it!=end(); it++) … … 160 162 const int ch = it->hv_board*32 + it->hv_channel; 161 163 162 avg[ch] += it-> gapd;164 avg[ch] += it->Vgapd; 163 165 num[ch] ++; 164 166 } 165 167 166 168 for (int ch=0; ch<416; ch++) 169 { 167 170 if (num[ch]) 168 171 avg[ch] /= num[ch]; 172 } 169 173 170 174 return avg;
Note:
See TracChangeset
for help on using the changeset viewer.