FACT++  1.0
int StateMachineSmartFACT::HandleFscBiasTemp ( const EventImp d)
inlineprivate

Definition at line 1883 of file smartfact.cc.

References EventImp::Get(), PixelMapEntry::group(), PixelMap::hv(), PixelMapEntry::hw(), i, and EventImp::Ptr().

Referenced by StateMachineSmartFACT().

1884  {
1885  if (!CheckDataSize(d, "FscControl:BiasTemp", 323*4))
1886  return GetCurrentState();
1887 
1888  const float *ptr = d.Ptr<float>(4);
1889  const float avg = d.Get<float>(321*4);
1890  //const float rms = d.Get<float>(322*4);
1891 
1892  vector<double> tout(320);
1893  for (int i=0; i<320; i++)
1894  {
1895  const int idx = (fPixelMap.hv(i).hw()/9)*2+fPixelMap.hv(i).group();
1896  tout[idx] = ptr[i];
1897  }
1898 
1899  WriteCam(d, "cam-fsccontrol-temperature", tout, 3, avg-1.75);
1900 
1901  return GetCurrentState();
1902  }
int GetCurrentState() const
return the current state of the machine
bool CheckDataSize(const EventImp &d, const char *name, size_t size, bool min=false)
Definition: smartfact.cc:669
int i
Definition: db_dim_client.c:21
int group() const
Definition: PixelMap.h:40
int hw() const
Definition: PixelMap.h:39
T Get(size_t offset=0) const
Definition: EventImp.h:66
void WriteCam(const EventImp &d, const string &fname, const T &t, double scale, double offset=0)
Definition: smartfact.cc:758
const T * Ptr(size_t offset=0) const
Definition: EventImp.h:74
const PixelMapEntry & hv(int board, int channel) const
Definition: PixelMap.h:139

+ Here is the call graph for this function:

+ Here is the caller graph for this function: