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

Definition at line 1149 of file smartfact.cc.

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

Referenced by StateMachineSmartFACT().

1150  {
1151  if (!CheckDataSize(d, "DriveControl:Source", 5*8+31))
1152  return GetCurrentState();
1153 
1154  const double *ptr = d.Ptr<double>();
1155 
1156  const double ra = ptr[0]; // Ra[h]
1157  const double dec = ptr[1]; // Dec[deg]
1158  const double woff = ptr[2]; // Wobble offset [deg]
1159  const double wang = ptr[3]; // Wobble angle [deg]
1160  const double period = ptr[4]; // Wobble angle [deg]
1161 
1162  fDriveControlSourceName = d.Ptr<char>(5*8);
1163 
1164  ostringstream out;
1165  out << d.GetJavaDate() << '\n';
1166 
1167  out << HTML::kWhite << '\t' << fDriveControlSourceName << '\n';
1168  out << setprecision(5);
1169  out << HTML::kWhite << '\t' << ra << '\n';
1170  out << HTML::kWhite << '\t' << dec << '\n';
1171  out << setprecision(3);
1172  out << HTML::kWhite << '\t' << woff << '\n';
1173  out << HTML::kWhite << '\t' << wang << '\n';
1174  out << HTML::kWhite << '\t' << period << '\n';
1175 
1176  ofstream(fPath+"/source.data") << out.str();
1177 
1178  return GetCurrentState();
1179  }
float period
Definition: HeadersSQM.h:92
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
string fDriveControlSourceName
Definition: smartfact.cc:564
static const string kWhite
Definition: smartfact.cc:74
uint64_t GetJavaDate() const
Definition: EventImp.cc:303
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: