Changeset 11972 for trunk


Ignore:
Timestamp:
09/05/11 21:42:44 (13 years ago)
Author:
tbretz
Message:
Read G-APD nominal bias voltage and added getters.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/PixelMap.h

    r11960 r11972  
    1313#endif
    1414
     15// FIXME: Replace 416 by BIAS::kNumChannels
     16
    1517struct PixelMapEntry
    1618{
    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
    2225
    2326    int crate() const { return cbpx/1000; }
     
    5861
    5962            int   idummy;
    60             float fdummy;
    6163
    6264            PixelMapEntry entry;
     
    6769            str >> idummy;
    6870            str >> entry.gapd;
    69             str >> fdummy;
     71            str >> entry.Vgapd;
    7072            str >> entry.hv_board;
    7173            str >> entry.hv_channel;
     
    139141            if (it->hv_board==board && it->hv_channel==channel)
    140142            {
    141                 avg += it->gapd;
     143                avg += it->Vgapd;
    142144                num ++;
    143145            }
     
    153155    std::vector<float> Vgapd() const
    154156    {
    155         std::vector<float> avg;
    156         std::vector<int>   num;
     157        std::vector<float> avg(416);
     158        std::vector<int>   num(416);
    157159
    158160        for (std::vector<PixelMapEntry>::const_iterator it=begin(); it!=end(); it++)
     
    160162            const int ch = it->hv_board*32 + it->hv_channel;
    161163
    162             avg[ch] += it->gapd;
     164            avg[ch] += it->Vgapd;
    163165            num[ch] ++;
    164166        }
    165167
    166168        for (int ch=0; ch<416; ch++)
     169        {
    167170            if (num[ch])
    168171                avg[ch] /= num[ch];
     172        }
    169173
    170174        return avg;
Note: See TracChangeset for help on using the changeset viewer.