FACT++  1.0
template<class T>
int StateMachineFAD< T >::SetRoi ( const EventImp evt)
inlineprivate

Definition at line 671 of file fadctrl.cc.

References Error(), EventImp::GetSize(), i, and EventImp::Ptr().

Referenced by StateMachineFAD< T >::StateMachineFAD().

672  {
673  if (!CheckEventSize(evt.GetSize(), "SetRoi", 8))
674  return T::kSM_FatalError;
675 
676  const int32_t *dat = evt.Ptr<int32_t>();
677 
678  for (BoardList::iterator i=fBoards.begin(); i!=fBoards.end(); i++)
679  if (!i->second->CmdSetRoi(dat[0], dat[1]))
680  {
681  ostringstream msg;
682  msg << hex << "Channel " << dat[0] << " or Value " << dat[1] << " out of range.";
683  T::Error(msg);
684  return T::GetCurrentState();
685  }
686 
687 
688  return T::GetCurrentState();
689  }
BoardList fBoards
Definition: fadctrl.cc:555
int i
Definition: db_dim_client.c:21
Error()
Definition: HeadersFTM.h:197
bool CheckEventSize(size_t has, const char *name, size_t size)
Definition: fadctrl.cc:562
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: