FACT++  1.0
int StateMachineSmartFACT::HandleAgilentData ( const EventImp d,
const string &  ext 
)
inlineprivate

Definition at line 2053 of file smartfact.cc.

References data, EventImp::GetJavaDate(), HTML::kWhite, and EventImp::Ptr().

Referenced by StateMachineSmartFACT().

2054  {
2055  if (!CheckDataSize(d, ("Agilent"+ext+":Data").c_str(), 4*sizeof(float)))
2056  return GetCurrentState();
2057 
2058  const float *data = d.Ptr<float>();
2059 
2060  ostringstream out;
2061 
2062  out << fixed << setprecision(1);
2063  out << d.GetJavaDate() << '\n';
2064 
2065  out << HTML::kWhite << '\t' << data[0] << '\n';
2066  out << HTML::kWhite << '\t' << data[1] << '\n';
2067  out << HTML::kWhite << '\t' << data[2] << '\n';
2068  out << HTML::kWhite << '\t' << data[3] << '\n';
2069 
2070  ofstream(fPath+"/agilent"+ext+".data") << out.str();
2071 
2072  return GetCurrentState();
2073  }
char * ext
Definition: webServer.c:19
int GetCurrentState() const
return the current state of the machine
bool CheckDataSize(const EventImp &d, const char *name, size_t size, bool min=false)
Definition: smartfact.cc:669
static const string kWhite
Definition: smartfact.cc:74
uint64_t GetJavaDate() const
Definition: EventImp.cc:303
float data[4 *1440]
const T * Ptr(size_t offset=0) const
Definition: EventImp.h:74

+ Here is the call graph for this function:

+ Here is the caller graph for this function: