#include <PostCloseFileRenamer.h>
Definition at line 14 of file PostCloseFileRenamer.h.
Definition at line 269 of file PostCloseFileRenamer.cc.
281 return components.fileNameWithIndex(
index);
std::map< detail::FileNameComponents, std::size_t > indexForProcessedPattern_
std::string applySubstitutionsNoIndex_(std::string const &filePattern) const
FileStatsCollector const & stats_
FileNameComponents componentsFromPattern(std::string const &pattern)
bool fileCloseRecorded() const
Definition at line 43 of file PostCloseFileRenamer.cc.
48 auto sb =
cbegin(filePattern), sid = sb,
se =
cend(filePattern);
49 while (regex_search(sid, se, match, rename_re)) {
52 assert(match.size() == 8);
69 result += match.prefix();
72 switch (*(match[0].first + 1)) {
86 if (match[2].matched) {
90 <<
"Unrecognized substitution %" << *(match[0].first + 1)
91 <<
" in pattern " << filePattern
92 <<
" -- typo or misconstructed regex?\n";
96 sid = match[0].second;
98 result.append(sid, se);
std::string subFilledNumericNoIndex_(boost::smatch const &match) const
std::string const & processName() const
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
std::string const & moduleLabel() const
FileStatsCollector const & stats_
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
decltype(auto) constexpr cbegin(T &&obj)
ADL-aware version of std::cbegin.
std::string subTimestamp_(boost::smatch const &match) const
std::string subInputFileName_(boost::smatch const &match) const
Definition at line 285 of file PostCloseFileRenamer.cc.
289 boost::system::error_code ec;
294 bfs::copy_file(inPath, newFile, bfs::copy_option::overwrite_if_exists);
std::string applySubstitutions(std::string const &filePattern)
std::string art::PostCloseFileRenamer::subFilledNumericNoIndex_ |
( |
boost::smatch const & |
match | ) |
const |
|
private |
Definition at line 214 of file PostCloseFileRenamer.cc.
217 bool const did_match = match[1].matched;
219 auto zero_fill = [did_match, &format_string](std::ostringstream& os,
228 std::ostringstream num_str;
230 switch (*(match[2].first)) {
236 num_str <<
"%" << match[1].str() <<
"#";
261 result = num_str.str();
262 if (result.empty()) {
SubRunID const & lowestSubRunID() const
RunID highestRunID() const
FileStatsCollector const & stats_
SubRunID const & highestSubRunID() const
Q_EXPORT QTSManip setw(int w)
RunID lowestRunID() const
SubRunNumber_t subRun() const
Q_EXPORT QTSManip setfill(int f)
std::string art::PostCloseFileRenamer::subInputFileName_ |
( |
boost::smatch const & |
match | ) |
const |
|
private |
Definition at line 103 of file PostCloseFileRenamer.cc.
110 if (match[4].matched) {
111 switch (*(match[4].first)) {
114 result = ifp.stem().native();
118 result = canonical(ifp.parent_path()).native();
122 result = ifp.extension().native();
126 result = ifp.filename().native();
130 result = (canonical(ifp.parent_path()) / ifp.filename()).native();
134 <<
"Internal error: subInputFileName_() did not recognize " 135 "substitution code %if" 136 << *(match[4].first) <<
".\n";
139 }
else if (match[5].matched) {
141 syntax_option_type sflags{ECMAScript};
142 match_flag_type mflags{match_default};
144 if (match[7].matched) {
145 for (
auto c : match[7].
str()) {
155 <<
"Internal error: subInputFileName_() did not recognize " 163 mflags |= format_first_only;
165 boost::regex
const dsub{match[5].str(), sflags};
166 result = regex_replace(
170 <<
"Internal error: subInputFileName_() called for unknown reasons " 172 << match[0].str() <<
".\n";
FileStatsCollector const & stats_
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
std::string const & lastOpenedInputFile() const
std::string art::PostCloseFileRenamer::subTimestamp_ |
( |
boost::smatch const & |
match | ) |
const |
|
private |
Definition at line 181 of file PostCloseFileRenamer.cc.
184 switch (*(match[3].first)) {
205 <<
"Internal error: subTimestamp_() did not recognize substitution " 207 << *(match[3].first) <<
".\n";
boost::posix_time::ptime lowestRunStartTime() const
boost::posix_time::ptime outputFileOpenTime() const
FileStatsCollector const & stats_
boost::posix_time::ptime highestRunStartTime() const
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
boost::posix_time::ptime highestSubRunStartTime() const
boost::posix_time::ptime lowestSubRunStartTime() const
std::string to_string(ModuleType const mt)
boost::posix_time::ptime outputFileCloseTime() const
The documentation for this class was generated from the following files: