21 #include "cetlib/assert_only_one_thread.h" 28 std::string
const dev_null{
"/dev/null"};
41 ,
fstats_{config.get_PSet().get<std::string>(
"service_type"),
55 r.sPostOpenFile.watch(
62 r.sPreModuleRespondToOpenInputFile.watch(
this,
64 r.sPreModuleRespondToCloseInputFile.watch(
this,
66 r.sPreModuleRespondToOpenOutputFiles.watch(
this,
68 r.sPreModuleRespondToCloseOutputFiles.watch(
this,
80 r.sPostProcessEvent.watch([
this](
Event const&
e) {
88 r.sPostEndSubRun.watch([
this](
SubRun const& sr) {
96 r.sPostEndRun.watch([
this](
Run const& r) {
104 r.sPostCloseFile.watch([
this] {
127 CET_ASSERT_ONLY_ONE_THREAD();
157 assert(
file_ ==
nullptr &&
"TFile pointer should always be zero here!");
158 beginTime_ = std::chrono::steady_clock::now();
169 gROOT->GetListOfFiles()->Remove(
file_);
200 using namespace std::chrono;
201 unsigned int constexpr oneK{1024u};
std::function< void()> Callback_t
void registerFileSwitchCallback(Callback_t c)
#define DEFINE_ART_SERVICE(svc)
void recordRun(RunID const &id)
std::string lastClosedFile_
void validateFileNamePattern(bool do_check, std::string const &pattern)
void logFileAction(const char *msg, std::string const &file)
void recordEvent(EventID const &id)
PostCloseFileRenamer fRenamer_
bool const closeFileFast_
FileStatsCollector fstats_
std::string unique_filename(std::string stem, std::string extension=".root")
ClosingCriteria fileSwitchCriteria_
bool should_close(FileProperties const &) const
void updateAge(std::chrono::seconds const age)
void registerCallback(Callback_t)
std::string const & moduleName() const
std::string uniqueFilename_
static constexpr const char * default_tmpDir
void recordSubRun(SubRunID const &id)
Granularity currentGranularity_
std::chrono::steady_clock::time_point beginTime_
void recordInputFile(std::string const &inputFileName)
std::string const & moduleLabel() const
void setDirectoryName_(art::ModuleDescription const &desc)
std::enable_if_t< B!=Granularity::InputFile > update(OutputFileStatus const status)
std::string parent_path(std::string const &path)
std::string maybeRenameFile(std::string const &inPath, std::string const &toPattern)
std::string fileNameAtClose_(std::string const &)
bool requestsToCloseFile_()
void updateSize(unsigned const size)
std::string fileNameAtOpen_()