LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
art::FileProperties Class Reference

#include "ClosingCriteria.h"

Public Member Functions

 FileProperties ()=default
 
 FileProperties (unsigned events, unsigned subRuns, unsigned runs, unsigned inputFiles, unsigned size, std::chrono::seconds age)
 
auto nEvents () const
 
auto nSubRuns () const
 
auto nRuns () const
 
auto nInputFiles () const
 
auto size () const
 
auto age () const
 
auto eventEntryNumber () const
 
auto subRunEntryNumber () const
 
auto runEntryNumber () const
 
template<Granularity::BT B>
std::enable_if_t< B!=Granularity::InputFileupdate (OutputFileStatus const status)
 
template<Granularity::BT B>
std::enable_if_t< B==Granularity::InputFileupdate ()
 
void updateSize (unsigned const size)
 
void updateAge (std::chrono::seconds const age)
 

Private Attributes

std::array< unsigned, Granularity::NBoundaries()> counts_
 
std::array< FileIndex::EntryNumber_t, Granularity::NBoundaries()-1 > treeEntryNumbers_ {{}}
 
std::chrono::seconds age_ {std::chrono::seconds::zero()}
 
unsigned size_ {}
 

Detailed Description

Definition at line 59 of file ClosingCriteria.h.

Constructor & Destructor Documentation

art::FileProperties::FileProperties ( )
default
art::FileProperties::FileProperties ( unsigned  events,
unsigned  subRuns,
unsigned  runs,
unsigned  inputFiles,
unsigned  size,
std::chrono::seconds  age 
)

Definition at line 16 of file ClosingCriteria.cc.

References age_, and size_.

22  : counts_{{events, subRuns, runs, inputFiles}}, age_{the_age}, size_{the_size}
23 {}
std::chrono::seconds age_
std::array< unsigned, Granularity::NBoundaries()> counts_

Member Function Documentation

auto art::FileProperties::age ( ) const
inline

Definition at line 95 of file ClosingCriteria.h.

Referenced by art::operator<<(), and art::ClosingCriteria::should_close().

96  {
97  return age_;
98  }
std::chrono::seconds age_
auto art::FileProperties::eventEntryNumber ( ) const
inline

Definition at line 101 of file ClosingCriteria.h.

References art::Granularity::Event.

Referenced by art::RootOutputFile::writeOne().

102  {
104  }
std::array< FileIndex::EntryNumber_t, Granularity::NBoundaries()-1 > treeEntryNumbers_
auto art::FileProperties::nEvents ( ) const
inline

Definition at line 70 of file ClosingCriteria.h.

References art::Granularity::Event.

Referenced by art::operator<<(), and art::ClosingCriteria::should_close().

71  {
73  }
std::array< unsigned, Granularity::NBoundaries()> counts_
auto art::FileProperties::nInputFiles ( ) const
inline

Definition at line 85 of file ClosingCriteria.h.

References art::Granularity::InputFile.

Referenced by art::operator<<(), and art::ClosingCriteria::should_close().

86  {
88  }
std::array< unsigned, Granularity::NBoundaries()> counts_
auto art::FileProperties::nRuns ( ) const
inline

Definition at line 80 of file ClosingCriteria.h.

References art::Granularity::Run.

Referenced by art::operator<<(), and art::ClosingCriteria::should_close().

81  {
82  return counts_[Granularity::Run];
83  }
std::array< unsigned, Granularity::NBoundaries()> counts_
auto art::FileProperties::nSubRuns ( ) const
inline

Definition at line 75 of file ClosingCriteria.h.

References art::Granularity::SubRun.

Referenced by art::operator<<(), and art::ClosingCriteria::should_close().

76  {
78  }
std::array< unsigned, Granularity::NBoundaries()> counts_
auto art::FileProperties::runEntryNumber ( ) const
inline

Definition at line 111 of file ClosingCriteria.h.

References art::Granularity::Run.

Referenced by art::RootOutputFile::writeRun().

112  {
114  }
std::array< FileIndex::EntryNumber_t, Granularity::NBoundaries()-1 > treeEntryNumbers_
auto art::FileProperties::size ( void  ) const
inline

Definition at line 90 of file ClosingCriteria.h.

Referenced by art::operator<<(), and art::ClosingCriteria::should_close().

91  {
92  return size_;
93  }
auto art::FileProperties::subRunEntryNumber ( ) const
inline

Definition at line 106 of file ClosingCriteria.h.

References art::Granularity::SubRun.

Referenced by art::RootOutputFile::writeSubRun().

107  {
109  }
std::array< FileIndex::EntryNumber_t, Granularity::NBoundaries()-1 > treeEntryNumbers_
template<Granularity::BT B>
std::enable_if_t<B != Granularity::InputFile> art::FileProperties::update ( OutputFileStatus const  status)
inline

Definition at line 118 of file ClosingCriteria.h.

References B, and art::Switching.

Referenced by art::RootOutputFile::incrementInputFileNumber(), art::TFileService::TFileService(), art::RootOutputFile::writeOne(), art::RootOutputFile::writeRun(), and art::RootOutputFile::writeSubRun().

119  {
120  ++treeEntryNumbers_[B];
121  if (status != OutputFileStatus::Switching) {
122  ++counts_[B];
123  }
124  }
Int_t B
Definition: plot.C:25
std::array< FileIndex::EntryNumber_t, Granularity::NBoundaries()-1 > treeEntryNumbers_
std::array< unsigned, Granularity::NBoundaries()> counts_
template<Granularity::BT B>
std::enable_if_t<B == Granularity::InputFile> art::FileProperties::update ( )
inline

Definition at line 128 of file ClosingCriteria.h.

References B.

129  {
130  ++counts_[B];
131  }
Int_t B
Definition: plot.C:25
std::array< unsigned, Granularity::NBoundaries()> counts_
void art::FileProperties::updateAge ( std::chrono::seconds const  age)
inline

Definition at line 139 of file ClosingCriteria.h.

Referenced by art::RootOutputFile::requestsToCloseFile(), and art::TFileService::requestsToCloseFile_().

140  {
141  age_ = age;
142  }
std::chrono::seconds age_
void art::FileProperties::updateSize ( unsigned const  size)
inline

Definition at line 134 of file ClosingCriteria.h.

Referenced by art::RootOutputFile::requestsToCloseFile(), and art::TFileService::requestsToCloseFile_().

135  {
136  size_ = size;
137  }
auto size() const

Member Data Documentation

std::chrono::seconds art::FileProperties::age_ {std::chrono::seconds::zero()}
private

Definition at line 149 of file ClosingCriteria.h.

Referenced by FileProperties().

std::array<unsigned, Granularity::NBoundaries()> art::FileProperties::counts_
private
Initial value:
{
{}}

Definition at line 145 of file ClosingCriteria.h.

unsigned art::FileProperties::size_ {}
private

Definition at line 150 of file ClosingCriteria.h.

Referenced by FileProperties().

std::array<FileIndex::EntryNumber_t, Granularity::NBoundaries() - 1> art::FileProperties::treeEntryNumbers_ {{}}
private

Definition at line 148 of file ClosingCriteria.h.


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