FACT++  1.0
template<class T , class S >
int StateMachineFTM< T, S >::SetThreshold ( const EventImp evt)
inlineprivate

Definition at line 1634 of file ftmctrl.cc.

References data, EventImp::GetSize(), and EventImp::Ptr().

Referenced by StateMachineFTM< T, S >::StateMachineFTM().

1635  {
1636  if (!CheckEventSize(evt.GetSize(), "SetThreshold", 8))
1637  return T::kSM_FatalError;
1638 
1639  const int32_t *data = evt.Ptr<int32_t>();
1640 
1641  if (!fFTM.SetThreshold(data[0], data[1]))
1642  {
1643  ostringstream msg;
1644  msg << "SetThreshold - Maximum allowed patch number 159, valid value range 0-0xffff (got: " << data[0] << " " << data[1] << ")";
1645  T::Warn(msg);
1646  }
1647 
1648  return T::GetCurrentState();
1649  }
bool CheckEventSize(size_t has, const char *name, size_t size)
Definition: ftmctrl.cc:1467
float data[4 *1440]
const T * Ptr(size_t offset=0) const
Definition: EventImp.h:74
virtual size_t GetSize() const
Definition: EventImp.h:55

+ Here is the call graph for this function:

+ Here is the caller graph for this function: