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

Definition at line 794 of file fadctrl.cc.

References Error(), EventImp::GetShort(), and EventImp::GetSize().

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

795  {
796  if (!CheckEventSize(evt.GetSize(), "SetMaxMemoryBuffer", 2))
797  return T::kSM_FatalError;
798 
799  const int16_t mem = evt.GetShort();
800 
801  if (mem<=0)
802  {
803  ostringstream msg;
804  msg << hex << "Value " << mem << " out of range.";
805  T::Error(msg);
806  return T::GetCurrentState();
807  }
808 
809  SetMaxMemory(mem);
810 
811  return T::GetCurrentState();
812  }
void SetMaxMemory(unsigned int mb) const
Error()
Definition: HeadersFTM.h:197
int16_t GetShort() const
Definition: EventImp.h:91
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: