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

Definition at line 770 of file fadctrl.cc.

References Error(), EventImp::GetSize(), EventImp::GetUXtra(), i, and kMaxRunNumber.

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

771  {
772  if (!CheckEventSize(evt.GetSize(), "SetRunNumber", 8))
773  return T::kSM_FatalError;
774 
775  const uint64_t num = evt.GetUXtra();
776 
777  if (num<=0 || num>FAD::kMaxRunNumber)
778  {
779  ostringstream msg;
780  msg << "Run number " << num << " out of range [1;" << FAD::kMaxRunNumber << "]";
781  T::Error(msg);
782  return T::GetCurrentState();
783  }
784 
785  if (!IncreaseRunNumber(num))
786  return T::GetCurrentState();
787 
788  for (BoardList::iterator i=fBoards.begin(); i!=fBoards.end(); i++)
789  i->second->CmdSetRunNumber(GetRunNumber());
790 
791  return T::GetCurrentState();
792  }
bool IncreaseRunNumber(uint32_t run)
uint32_t GetRunNumber() const
BoardList fBoards
Definition: fadctrl.cc:555
int i
Definition: db_dim_client.c:21
uint64_t GetUXtra() const
Definition: EventImp.h:96
Error()
Definition: HeadersFTM.h:197
bool CheckEventSize(size_t has, const char *name, size_t size)
Definition: fadctrl.cc:562
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: