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

Definition at line 691 of file fadctrl.cc.

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

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

692  {
693  if (!CheckEventSize(evt.GetSize(), "SetDac", 8))
694  return T::kSM_FatalError;
695 
696  const int32_t *dat = evt.Ptr<int32_t>();
697 
698  for (BoardList::iterator i=fBoards.begin(); i!=fBoards.end(); i++)
699  if (!i->second->CmdSetDacValue(dat[0], dat[1]))
700  {
701  ostringstream msg;
702  msg << hex << "Channel " << dat[0] << " or Value " << dat[1] << " out of range.";
703  T::Error(msg);
704  return T::GetCurrentState();
705  }
706 
707  return T::GetCurrentState();
708  }
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: