FACT++  1.0
void FactGui::handleFscTemp ( const DimData d)
inlineprivate

Definition at line 2120 of file FactGui.h.

References i, DimData::ptr(), and DimData::size().

Referenced by infoHandler().

2121  {
2122  const bool enable = d.size()>0 && CheckSize(d, 60*sizeof(float));
2123  if (!enable)
2124  return;
2125 
2126  QDoubleSpinBox *boxes[] = {
2127  fTempCam00, fTempCam01,
2128  fTempCam10, fTempCam11, fTempCam12, fTempCam13, fTempCam14,
2129  fTempCam20, fTempCam21, fTempCam22, fTempCam23, fTempCam24, fTempCam25,
2130  fTempCam30, fTempCam31, fTempCam32, fTempCam33, fTempCam34,
2131  fTempCam40, fTempCam41, fTempCam42, fTempCam43, fTempCam44, fTempCam45,
2132  fTempCam50, fTempCam51, fTempCam52, fTempCam53, fTempCam54,
2133  fTempCam60, fTempCam61,
2134  // 0:b/f 1:b/f 2:b/f 3:b/f
2135  fTempCrate0back, fTempCrate0front,
2136  fTempCrate1back, fTempCrate1front,
2137  fTempCrate2back, fTempCrate2front,
2138  fTempCrate3back, fTempCrate3front,
2139  // 0:b/f 1:b/f 2:b/f 3:b/f
2140  fTempPS0back, fTempPS0front,
2141  fTempPS1back, fTempPS1front,
2142  fTempPS2back, fTempPS2front,
2143  fTempPS3back, fTempPS3front,
2144  // AUX PS: FTM t/b; FSC t/b
2145  fTempAuxFTMtop, fTempAuxFTMbottom,
2146  fTempAuxFSCtop, fTempAuxFSCbottom,
2147  // Backpanel: FTM t/b; FSC t/b
2148  fTempBackpanelFTMtop, fTempBackpanelFTMbottom,
2149  fTempBackpanelFSCtop, fTempBackpanelFSCbottom,
2150  // top front/back; bottom front/back
2151  fTempSwitchboxTopFront, fTempSwitchboxTopBack,
2152  fTempSwitchboxBottomFront, fTempSwitchboxBottomBack,
2153  };
2154 
2155  for (int i=0; i<59; i++)
2156  SetFscValue(boxes[i], d, i, enable);
2157 
2158  if (!enable)
2159  return;
2160 
2161  const float *ptr = d.ptr<float>();
2162 
2163  double avg = 0;
2164  int num = 0;
2165  for (int i=1; i<32; i++)
2166  if (ptr[i]!=0)
2167  {
2168  avg += ptr[i];
2169  num ++;
2170  }
2171 
2172  fTempCamAvg->setValue(num?avg/num:0);
2173  }
int i
Definition: db_dim_client.c:21
bool CheckSize(const DimData &d, size_t sz, bool print=true) const
Definition: FactGui.h:639
void SetFscValue(QDoubleSpinBox *box, const DimData &d, int idx, bool enable)
Definition: FactGui.h:2103
size_t size() const
Definition: DimData.h:39
const T * ptr(uint32_t offset=0) const
Definition: DimData.h:32

+ Here is the call graph for this function:

+ Here is the caller graph for this function: