FACT++  1.0
int StateMachineFeedback::HandleCameraTemp ( const EventImp evt)
inlineprivate

Definition at line 148 of file feedback.cc.

References EventImp::Get(), EventImp::GetSize(), EventImp::GetTime(), i, Time::none, and EventImp::Ptr().

Referenced by StateMachineFeedback().

149  {
150  if (!CheckEventSize(evt.GetSize(), "HandleCameraTemp", 323*sizeof(float)))
151  {
153  return GetCurrentState();
154  }
155 
156  //fTempOffset = (avgt-25)*0.0561765; // [V] From Hamamatsu datasheet
157  //fTempOffset = (avgt-25)*0.05678; // [V] From Hamamatsu datasheet plus our own measurement (gein vs. temperature)
158 
159  const float *ptr = evt.Ptr<float>(4);
160 
161  fTimeTemp = evt.GetTime();
162  fTemp = evt.Get<float>(321*4);
163 
165  fTempOffsetRms = evt.Get<float>(322*4)*fTempCoefficient;
166 
167  fTempOffset.resize(320);
168  for (int i=0; i<320; i++)
169  fTempOffset[i] = (ptr[i]-25)*fTempCoefficient;
170 
171  return GetCurrentState();
172  }
int GetCurrentState() const
return the current state of the machine
bool CheckEventSize(size_t has, const char *name, size_t size)
Definition: feedback.cc:103
int i
Definition: db_dim_client.c:21
Adds some functionality to boost::posix_time::ptime for our needs.
Definition: Time.h:30
vector< double > fTempOffset
Definition: feedback.cc:69
virtual Time GetTime() const
Definition: EventImp.h:57
double fTempCoefficient
Definition: feedback.cc:72
T Get(size_t offset=0) const
Definition: EventImp.h:66
Do not initialize the time.
Definition: Time.h:51
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: