FACT++  1.0
bool DataCalib::ReadFits ( const string &  fname,
MessageImp msg 
)
static

Definition at line 204 of file DataCalib.cc.

References MessageImp::Error(), and fData.

Referenced by EventBuilderWrapper::LoadDrsCalibration().

205 {
206  if (fProcessing)
207  {
208  msg.Error("Reading "+str+" failed: DRS calibration in process.");
209  return false;
210  }
211 
212  try
213  {
214  const string txt = fData.ReadFitsImp(str, fStats);
215  if (txt.empty())
216  return true;
217 
218  msg.Error(txt);
219  return false;
220  }
221  catch (const runtime_error &e)
222  {
223  msg.Error("Exception reading "+str+": "+e.what());
224  return false;
225  }
226 }
static std::vector< float > fStats
Definition: DataCalib.h:15
char str[80]
Definition: test_client.c:7
std::string ReadFitsImp(const std::string &str, std::vector< float > &vec)
Definition: DrsCalib.h:1390
int Error(const std::string &str)
Definition: MessageImp.h:49
static DrsCalibration fData
Definition: DataCalib.h:13
static bool fProcessing
Storage for mean and rms values.
Definition: DataCalib.h:19

+ Here is the call graph for this function:

+ Here is the caller graph for this function: