Commit 0fc39b63 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

FileREader: throw if file is nonexistent

parent c66a5244
Pipeline #257235 passed with stages
in 3 minutes and 21 seconds
......@@ -47,6 +47,9 @@ void FileReader::initialise() {
// Get input file
LOG(INFO) << "Opening file " << m_fileName;
m_inputFile = new TFile(m_fileName.c_str(), "READ");
if(!m_inputFile->IsOpen()) {
throw AlgorithmError("Cannot open input file \"" + m_fileName + "\".");
}
m_inputFile->cd();
// Loop over all objects to be read from file, and get the trees
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment