17 const size_t lastdot = name.find_last_of(
".");
18 string fmt = Utils::toLower(lastdot == string::npos ? name : name.substr(lastdot+1));
21 throw UserError(
"YODA was compiled without zlib support: can't read " + name);
23 const size_t lastbutonedot = (lastdot == string::npos) ? string::npos : name.find_last_of(
".", lastdot-1);
24 fmt = Utils::toLower(lastbutonedot == string::npos ? name : name.substr(lastbutonedot+1));
30 throw UserError(
"Format cannot be identified from string '" + name +
"'");
static Reader & create()
Singleton creation function.
static Reader & create()
Singleton creation function.
Pure virtual base class for various output writers.
Error for problems introduced outside YODA, to put it nicely.
Anonymous namespace to limit visibility.
Reader & mkReader(const std::string &format_name)
Factory function to make a reader object by format name or a filename.