CMS 3D CMS Logo

BareRootProductGetter.cc
Go to the documentation of this file.
2 
4 
5 #include "TROOT.h"
6 #include "TFile.h"
7 
9  TFile* file = dynamic_cast<TFile*>(gROOT->GetListOfFiles()->Last());
10  if (nullptr == file) {
11  throw cms::Exception("FileNotFound") << "unable to find the TFile '" << gROOT->GetListOfFiles()->Last() << "'\n"
12  << "retrieved by calling 'gROOT->GetListOfFiles()->Last()'\n"
13  << "Please check the list of files.";
14  }
15  return file;
16 }
TFile * currentFile() const override