1739 const float *dat = d.
Ptr<
float>(1440*
sizeof(float)*2)+2;
1756 vector<float> val(1440);
1757 for (
int i=0;
i<1440;
i++)
1758 val[
i] = dat[
i%9==8 ?
i-2 :
i]/1000;
1760 vector<float> sorted(val);
1761 nth_element(sorted.begin(), sorted.begin()+3, sorted.end(),
1762 std::greater<float>());
1774 scale = max(0.25f, sorted[3]);
1780 WriteCam(d,
"cam-fadcontrol-eventdata", val, scale, min);
int GetCurrentState() const
return the current state of the machine
bool CheckDataSize(const EventImp &d, const char *name, size_t size, bool min=false)
virtual int GetQoS() const
vector< uint32_t > fFadControlDrsRuns
void WriteCam(const EventImp &d, const string &fname, const T &t, double scale, double offset=0)
const T * Ptr(size_t offset=0) const