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*)#"))) {
14  return;
15  }
16 
18  << "If you have specified the 'fileProperties' table in your "
19  "configuration,\n"
20  << "then the file pattern '%#' MUST be present in the file name. For "
21  "example:\n"
22  << " " << pattern.substr(0, pattern.find(".root")) << "_%#.root\n"
23  << "is a supported file name. Please change your file name to include "
24  "the '%#' pattern.";
25 }
std::string string
Definition: nybbler.cc:12
void validateFileNamePattern(bool do_check, std::string const &pattern)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::string pattern
Definition: regex_t.cc:35