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

Definition at line 2133 of file drivectrl.cc.

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

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

2134  {
2135  if (evt.GetSize()<16)
2136  {
2137  ostringstream msg;
2138  msg << "TrackOn - Received event has " << evt.GetSize() << " bytes, but expected at least 17.";
2139  T::Fatal(msg);
2140  return T::kSM_FatalError;
2141  }
2142 
2143  if (evt.GetSize()==16)
2144  {
2145  ostringstream msg;
2146  msg << "TrackOn - Source name missing.";
2147  T::Error(msg);
2148  return T::GetCurrentState();
2149  }
2150 
2151  const double offset = evt.Get<double>(0);
2152  const double angle = evt.Get<double>(8);
2153 
2154  return StartTrackWobble(evt.Ptr<char>(16), evt.GetSize()-16, offset, angle);
2155  }
int StartTrackWobble(const char *ptr, size_t size, const double &offset=0, const double &angle=0)
Definition: cosyctrl.cc:1045
Error()
Definition: HeadersFTM.h:197
T Get(size_t offset=0) const
Definition: EventImp.h:66
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: