FACT++  1.0
bool ConnectionBias::SetReferences ( const vector< float > &  volt,
const vector< float > &  offset,
const vector< float > &  slope 
)
inline

Definition at line 1153 of file biasctrl.cc.

References Error(), and kNumChannels.

1154  {
1155  if (volt.size()!=kNumChannels)
1156  {
1157  ostringstream out;
1158  out << "SetReferences - Given vector has " << volt.size() << " elements - expected " << kNumChannels << endl;
1159  Error(out);
1160  return false;
1161  }
1162  if (offset.size()!=kNumChannels)
1163  {
1164  ostringstream out;
1165  out << "SetReferences - Given vector has " << offset.size() << " elements - expected " << kNumChannels << endl;
1166  Error(out);
1167  return false;
1168  }
1169  if (slope.size()!=kNumChannels)
1170  {
1171  ostringstream out;
1172  out << "SetReferences - Given vector has " << slope.size() << " elements - expected " << kNumChannels << endl;
1173  Error(out);
1174  return false;
1175  }
1176 
1177  fOperationVoltage = volt;
1178  fCalibrationOffset = offset;
1179  fCalibrationSlope = slope;
1180 
1181  UpdateVgapd();
1182 
1183  return true;
1184  }
vector< float > fCalibrationOffset
Definition: biasctrl.cc:93
virtual void UpdateVgapd()
Definition: biasctrl.cc:78
vector< float > fCalibrationSlope
Definition: biasctrl.cc:94
int Error(const std::string &str)
Definition: MessageImp.h:49
vector< float > fOperationVoltage
Definition: biasctrl.cc:90

+ Here is the call graph for this function: