LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
art::ClosingCriteria Class Reference

#include "ClosingCriteria.h"

Classes

struct  Config
 

Public Member Functions

 ClosingCriteria (Config const &fp)
 
 ClosingCriteria (FileProperties const &fp, std::string const &granularity)
 
 ClosingCriteria ()=default
 
auto const & fileProperties () const
 
auto granularity () const
 
bool should_close (FileProperties const &) const
 

Private Attributes

FileProperties closingCriteria_
 
Granularity granularity_
 

Detailed Description

Definition at line 155 of file ClosingCriteria.h.

Constructor & Destructor Documentation

art::ClosingCriteria::ClosingCriteria ( Config const &  fp)

Definition at line 34 of file ClosingCriteria.cc.

References closingCriteria_, art::ClosingCriteria::Config::granularity, art::ClosingCriteria::Config::maxAge, art::ClosingCriteria::Config::maxEvents, art::ClosingCriteria::Config::maxInputFiles, art::ClosingCriteria::Config::maxRuns, art::ClosingCriteria::Config::maxSize, and art::ClosingCriteria::Config::maxSubRuns.

35  : ClosingCriteria{FileProperties{c.maxEvents(),
36  c.maxSubRuns(),
37  c.maxRuns(),
38  c.maxInputFiles(),
39  c.maxSize(),
40  seconds_t{c.maxAge()}},
41  c.granularity()}
42 {
43  auto const& cc = closingCriteria_;
44  config_assert(cc.nEvents() > 0, "maxEvents must be greater than 0.");
45  config_assert(cc.nSubRuns() > 0, "maxSubRuns must be greater than 0.");
46  config_assert(cc.nRuns() > 0, "maxRuns must be greater than 0.");
47  config_assert(cc.nInputFiles() > 0, "maxInputFiles must be greater than 0.");
48  config_assert(cc.size() > 0, "maxSize must be greater than 0 KiB.");
49  config_assert(cc.age() > decltype(cc.age())::zero(),
50  "maxAge must be greater than 0 seconds.");
51 }
ClosingCriteria()=default
FileProperties closingCriteria_
std::chrono::seconds seconds_t
art::ClosingCriteria::ClosingCriteria ( FileProperties const &  fp,
std::string const &  granularity 
)

Definition at line 53 of file ClosingCriteria.cc.

References granularity(), granularity_, and art::Granularity::value().

56 {}
static BT value(std::string const &spec)
auto granularity() const
FILE * fp
Definition: plot.C:36
FileProperties closingCriteria_
art::ClosingCriteria::ClosingCriteria ( )
default

Member Function Documentation

auto const& art::ClosingCriteria::fileProperties ( ) const
inline

Definition at line 185 of file ClosingCriteria.h.

186  {
187  return closingCriteria_;
188  }
FileProperties closingCriteria_
auto art::ClosingCriteria::granularity ( ) const
inline
bool art::ClosingCriteria::should_close ( FileProperties const &  fp) const

Member Data Documentation

FileProperties art::ClosingCriteria::closingCriteria_
private

Definition at line 198 of file ClosingCriteria.h.

Referenced by ClosingCriteria(), and should_close().

Granularity art::ClosingCriteria::granularity_
private
Initial value:

Definition at line 199 of file ClosingCriteria.h.

Referenced by ClosingCriteria().


The documentation for this class was generated from the following files: