File tree Expand file tree Collapse file tree
Detectors/CTF/workflow/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,11 +167,14 @@ void CTFReaderSpec::openCTFFile(const std::string& flname)
167167 mFilesRead ++;
168168 mCTFFile .reset (TFile::Open (flname.c_str ()));
169169 if (!mCTFFile || !mCTFFile ->IsOpen () || mCTFFile ->IsZombie ()) {
170- throw std::runtime_error (" failed to open CTF file" );
170+ throw std::runtime_error (fmt::format ( " failed to open CTF file {}, skipping " , flname) );
171171 }
172172 mCTFTree .reset ((TTree*)mCTFFile ->Get (std::string (o2::base::NameConf::CTFTREENAME ).c_str ()));
173173 if (!mCTFTree ) {
174- throw std::runtime_error (" failed to load CTF tree from" );
174+ throw std::runtime_error (fmt::format (" failed to load CTF tree from {}, skipping" , flname));
175+ }
176+ if (mCTFTree ->GetEntries () < 1 ) {
177+ throw std::runtime_error (fmt::format (" CTF tree in {} has 0 entries, skipping" , flname));
175178 }
176179 } catch (const std::exception& e) {
177180 LOG (error) << " Cannot process " << flname << " , reason: " << e.what ();
You can’t perform that action at this time.
0 commit comments