LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
validateFileNamePattern.cc
Go to the documentation of this file.
3 
4 #include <regex>
5 
6 void
8  std::string const& pattern)
9 {
10  if (!do_check)
11  return;
12 
13  if (!std::regex_search(pattern, std::regex("%(\\d*)#")))
15  << "If you have specified the 'fileProperties' table in your "
16  "configuration,\n"
17  << "then the file pattern '%#' MUST be present in the file name. For "
18  "example:\n"
19  << " " << pattern.substr(0, pattern.find(".root")) << "_%#.root\n"
20  << "is a supported file name. Please change your file name to include "
21  "the '%#' pattern.";
22 }
void validateFileNamePattern(bool do_check, std::string const &pattern)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66