21 if (
inFileName.empty())
throw std::invalid_argument(
"fileName arguments must be non empty");
22 if (
histName.empty())
throw std::invalid_argument(
"histName arguments must be non empty");
26 std::unique_ptr<TFile> fmc{TFile::Open(
fileName.c_str(),
"READ")};
27 if (!fmc || !fmc->IsOpen())
29 throw std::invalid_argument(
"Cannot open file " +
fileName);
36 throw std::invalid_argument(
"Cannot find hist ("+
histName+
") in file " +
fileName);
38 hist->SetDirectory(
nullptr);