FACT++  1.0
int StateMachineSmartFACT::HandleSqmData ( const EventImp d)
inlineprivate

Definition at line 1992 of file smartfact.cc.

References SQM::Data::counts, data, SQM::Data::freq, EventImp::GetJavaDate(), HTML::kWhite, SQM::Data::mag, SQM::Data::period, EventImp::Ref(), and SQM::Data::temp.

Referenced by StateMachineSmartFACT().

1993  {
1994  if (!CheckDataSize(d, "SqmControl:Data", sizeof(SQM::Data)))
1995  return GetCurrentState();
1996 
1997  const SQM::Data &data = d.Ref<SQM::Data>();
1998 
1999  ostringstream out;
2000 
2001  out << fixed;
2002  out << d.GetJavaDate() << '\n';
2003  out << HTML::kWhite << '\t' << setprecision(2) << data.mag << '\n';
2004  out << HTML::kWhite << '\t' << data.freq << '\n';
2005  out << HTML::kWhite << '\t' << data.counts << '\n';
2006  out << HTML::kWhite << '\t' << setprecision(3) << data.period << '\n';
2007  out << HTML::kWhite << '\t' << setprecision(1) << data.temp << "\n";
2008 
2009  ofstream(fPath+"/sqm.data") << out.str();
2010 
2011  return GetCurrentState();
2012  }
uint32_t counts
Definition: HeadersSQM.h:21
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
float period
Definition: HeadersSQM.h:22
static const string kWhite
Definition: smartfact.cc:74
float mag
Definition: HeadersSQM.h:19
uint64_t GetJavaDate() const
Definition: EventImp.cc:303
float data[4 *1440]
const T & Ref(size_t offset=0) const
Definition: EventImp.h:82
float temp
Definition: HeadersSQM.h:23
uint32_t freq
Definition: HeadersSQM.h:20

+ Here is the call graph for this function:

+ Here is the caller graph for this function: