FACT++  1.0
int StateMachineFeedback::LoadCalibration ( )
inlineprivate

Definition at line 1116 of file feedback.cc.

References Feedback::State::kCalibrated, BIAS::kNumChannels, and Time::Mjd().

Referenced by StateMachineFeedback().

1117  {
1118  ifstream fin("feedback-calib.bin");
1119 
1120  double mjd;
1121 
1122  vector<float> di(BIAS::kNumChannels);
1123  vector<float> r8(BIAS::kNumChannels);
1124 
1125  fin.read((char*)&mjd, sizeof(double));
1126  fin.read((char*)di.data(), BIAS::kNumChannels*sizeof(float));
1127  fin.read((char*)r8.data(), BIAS::kNumChannels*sizeof(float));
1128 
1129  if (!fin)
1130  {
1131  Warn("Reading of calibration failed.");
1132  return GetCurrentState();
1133  }
1134 
1135  fTimeCalib.Mjd(mjd);
1136  fCalibDeltaI = di;
1137  fCalibR8 = r8;
1138 
1140  }
int GetCurrentState() const
return the current state of the machine
vector< float > fCalibR8
Definition: feedback.cc:59
vector< float > fCalibDeltaI
Definition: feedback.cc:58
void Mjd(double mjd)
Definition: Time.cc:145
int Warn(const std::string &str)
Definition: MessageImp.h:48

+ Here is the call graph for this function:

+ Here is the caller graph for this function: