LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::FileProperties Class Reference

#include "ClosingCriteria.h"

Public Member Functions

 ~FileProperties ()
 
 FileProperties ()
 
 FileProperties (unsigned events, unsigned subRuns, unsigned runs, unsigned inputFiles, unsigned size, std::chrono::seconds age)
 
 FileProperties (FileProperties const &)
 
 FileProperties (FileProperties &&)
 
FilePropertiesoperator= (FileProperties const &)
 
FilePropertiesoperator= (FileProperties &&)
 
unsigned nEvents () const
 
unsigned nSubRuns () const
 
unsigned nRuns () const
 
unsigned nInputFiles () const
 
unsigned size () const
 
std::chrono::seconds age () const
 
FileIndex::EntryNumber_t eventEntryNumber () const
 
FileIndex::EntryNumber_t subRunEntryNumber () const
 
FileIndex::EntryNumber_t runEntryNumber () const
 
void update_event ()
 
void update_subRun (OutputFileStatus const status)
 
void update_run (OutputFileStatus const status)
 
void update_inputFile ()
 
void updateSize (unsigned const size)
 
void updateAge (std::chrono::seconds const age)
 

Private Attributes

std::atomic< unsigned > counts_event_
 
std::atomic< unsigned > counts_subRun_
 
std::atomic< unsigned > counts_run_
 
std::atomic< unsigned > counts_inputFile_
 
std::atomic< unsigned > counts_job_
 
std::atomic< FileIndex::EntryNumber_ttreeEntryNumbers_event_
 
std::atomic< FileIndex::EntryNumber_ttreeEntryNumbers_subRun_
 
std::atomic< FileIndex::EntryNumber_ttreeEntryNumbers_run_
 
std::atomic< FileIndex::EntryNumber_ttreeEntryNumbers_inputFile_
 
std::atomic< std::chrono::seconds > age_
 
std::atomic< unsigned > size_
 

Detailed Description

Definition at line 17 of file ClosingCriteria.h.

Constructor & Destructor Documentation

art::FileProperties::~FileProperties ( )
default
art::FileProperties::FileProperties ( )

Definition at line 23 of file ClosingCriteria.cc.

References age_, counts_event_, counts_inputFile_, counts_job_, counts_run_, counts_subRun_, size_, treeEntryNumbers_event_, treeEntryNumbers_inputFile_, treeEntryNumbers_run_, and treeEntryNumbers_subRun_.

24  : counts_event_{0}
25  , counts_subRun_{0}
26  , counts_run_{0}
28  , counts_job_{0}
33  , age_{chrono::seconds::zero()}
34  , size_{0}
35  {}
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_subRun_
std::atomic< unsigned > counts_inputFile_
std::atomic< std::chrono::seconds > age_
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_run_
std::atomic< unsigned > size_
std::atomic< unsigned > counts_run_
std::atomic< unsigned > counts_event_
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_inputFile_
std::atomic< unsigned > counts_job_
std::atomic< unsigned > counts_subRun_
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_event_
art::FileProperties::FileProperties ( unsigned  events,
unsigned  subRuns,
unsigned  runs,
unsigned  inputFiles,
unsigned  size,
std::chrono::seconds  age 
)
art::FileProperties::FileProperties ( FileProperties const &  rhs)

Definition at line 58 of file ClosingCriteria.cc.

References age_, counts_event_, counts_inputFile_, counts_job_, counts_run_, counts_subRun_, size_, treeEntryNumbers_event_, treeEntryNumbers_inputFile_, treeEntryNumbers_run_, and treeEntryNumbers_subRun_.

59  : counts_event_{rhs.counts_event_.load()}
60  , counts_subRun_{rhs.counts_subRun_.load()}
61  , counts_run_{rhs.counts_run_.load()}
62  , counts_inputFile_{rhs.counts_inputFile_.load()}
63  , counts_job_{rhs.counts_job_.load()}
64  , treeEntryNumbers_event_{rhs.treeEntryNumbers_event_.load()}
65  , treeEntryNumbers_subRun_{rhs.treeEntryNumbers_subRun_.load()}
66  , treeEntryNumbers_run_{rhs.treeEntryNumbers_run_.load()}
67  , treeEntryNumbers_inputFile_{rhs.treeEntryNumbers_inputFile_.load()}
68  , age_{rhs.age_.load()}
69  , size_{rhs.size_.load()}
70  {}
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_subRun_
std::atomic< unsigned > counts_inputFile_
std::atomic< std::chrono::seconds > age_
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_run_
std::atomic< unsigned > size_
std::atomic< unsigned > counts_run_
std::atomic< unsigned > counts_event_
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_inputFile_
std::atomic< unsigned > counts_job_
std::atomic< unsigned > counts_subRun_
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_event_
art::FileProperties::FileProperties ( FileProperties &&  rhs)

Definition at line 73 of file ClosingCriteria.cc.

References age_, counts_inputFile_, counts_job_, counts_run_, counts_subRun_, size_, treeEntryNumbers_event_, treeEntryNumbers_inputFile_, treeEntryNumbers_run_, and treeEntryNumbers_subRun_.

74  : counts_event_{rhs.counts_event_.load()}
75  , counts_subRun_{rhs.counts_subRun_.load()}
76  , counts_run_{rhs.counts_run_.load()}
77  , counts_inputFile_{rhs.counts_inputFile_.load()}
78  , counts_job_{rhs.counts_job_.load()}
79  , treeEntryNumbers_event_{rhs.treeEntryNumbers_event_.load()}
80  , treeEntryNumbers_subRun_{rhs.treeEntryNumbers_subRun_.load()}
81  , treeEntryNumbers_run_{rhs.treeEntryNumbers_run_.load()}
82  , treeEntryNumbers_inputFile_{rhs.treeEntryNumbers_inputFile_.load()}
83  , age_{rhs.age_.load()}
84  , size_{rhs.size_.load()}
85  {}
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_subRun_
std::atomic< unsigned > counts_inputFile_
std::atomic< std::chrono::seconds > age_
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_run_
std::atomic< unsigned > size_
std::atomic< unsigned > counts_run_
std::atomic< unsigned > counts_event_
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_inputFile_
std::atomic< unsigned > counts_job_
std::atomic< unsigned > counts_subRun_
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_event_

Member Function Documentation

chrono::seconds art::FileProperties::age ( ) const

Definition at line 155 of file ClosingCriteria.cc.

References age_.

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

156  {
157  return age_.load();
158  }
std::atomic< std::chrono::seconds > age_
FileIndex::EntryNumber_t art::FileProperties::eventEntryNumber ( ) const

Definition at line 161 of file ClosingCriteria.cc.

References treeEntryNumbers_event_.

162  {
163  return treeEntryNumbers_event_.load();
164  }
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_event_
unsigned art::FileProperties::nEvents ( ) const

Definition at line 125 of file ClosingCriteria.cc.

References counts_event_.

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

126  {
127  return counts_event_.load();
128  }
std::atomic< unsigned > counts_event_
unsigned art::FileProperties::nInputFiles ( ) const

Definition at line 143 of file ClosingCriteria.cc.

References counts_inputFile_.

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

144  {
145  return counts_inputFile_.load();
146  }
std::atomic< unsigned > counts_inputFile_
unsigned art::FileProperties::nRuns ( ) const

Definition at line 137 of file ClosingCriteria.cc.

References counts_run_.

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

138  {
139  return counts_run_.load();
140  }
std::atomic< unsigned > counts_run_
unsigned art::FileProperties::nSubRuns ( ) const

Definition at line 131 of file ClosingCriteria.cc.

References counts_subRun_.

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

132  {
133  return counts_subRun_.load();
134  }
std::atomic< unsigned > counts_subRun_
FileProperties & art::FileProperties::operator= ( FileProperties const &  rhs)

Definition at line 89 of file ClosingCriteria.cc.

References age_, counts_event_, counts_inputFile_, counts_job_, counts_run_, counts_subRun_, size_, treeEntryNumbers_event_, treeEntryNumbers_inputFile_, treeEntryNumbers_run_, and treeEntryNumbers_subRun_.

90  {
91  if (this != &rhs) {
92  counts_event_ = rhs.counts_event_.load();
93  counts_subRun_ = rhs.counts_subRun_.load();
94  counts_run_ = rhs.counts_run_.load();
95  counts_inputFile_ = rhs.counts_inputFile_.load();
96  counts_job_ = rhs.counts_job_.load();
97  treeEntryNumbers_event_ = rhs.treeEntryNumbers_event_.load();
98  treeEntryNumbers_subRun_ = rhs.treeEntryNumbers_subRun_.load();
99  treeEntryNumbers_run_ = rhs.treeEntryNumbers_run_.load();
100  treeEntryNumbers_inputFile_ = rhs.treeEntryNumbers_inputFile_.load();
101  age_ = rhs.age_.load();
102  size_ = rhs.size_.load();
103  }
104  return *this;
105  }
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_subRun_
std::atomic< unsigned > counts_inputFile_
std::atomic< std::chrono::seconds > age_
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_run_
std::atomic< unsigned > size_
std::atomic< unsigned > counts_run_
std::atomic< unsigned > counts_event_
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_inputFile_
std::atomic< unsigned > counts_job_
std::atomic< unsigned > counts_subRun_
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_event_
FileProperties & art::FileProperties::operator= ( FileProperties &&  rhs)

Definition at line 108 of file ClosingCriteria.cc.

References age_, counts_event_, counts_inputFile_, counts_job_, counts_run_, counts_subRun_, size_, treeEntryNumbers_event_, treeEntryNumbers_inputFile_, treeEntryNumbers_run_, and treeEntryNumbers_subRun_.

109  {
110  counts_event_ = rhs.counts_event_.load();
111  counts_subRun_ = rhs.counts_subRun_.load();
112  counts_run_ = rhs.counts_run_.load();
113  counts_inputFile_ = rhs.counts_inputFile_.load();
114  counts_job_ = rhs.counts_job_.load();
115  treeEntryNumbers_event_ = rhs.treeEntryNumbers_event_.load();
116  treeEntryNumbers_subRun_ = rhs.treeEntryNumbers_subRun_.load();
117  treeEntryNumbers_run_ = rhs.treeEntryNumbers_run_.load();
118  treeEntryNumbers_inputFile_ = rhs.treeEntryNumbers_inputFile_.load();
119  age_ = rhs.age_.load();
120  size_ = rhs.size_.load();
121  return *this;
122  }
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_subRun_
std::atomic< unsigned > counts_inputFile_
std::atomic< std::chrono::seconds > age_
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_run_
std::atomic< unsigned > size_
std::atomic< unsigned > counts_run_
std::atomic< unsigned > counts_event_
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_inputFile_
std::atomic< unsigned > counts_job_
std::atomic< unsigned > counts_subRun_
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_event_
FileIndex::EntryNumber_t art::FileProperties::runEntryNumber ( ) const

Definition at line 173 of file ClosingCriteria.cc.

References treeEntryNumbers_run_.

174  {
175  return treeEntryNumbers_run_.load();
176  }
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_run_
unsigned art::FileProperties::size ( void  ) const

Definition at line 149 of file ClosingCriteria.cc.

References size_.

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

150  {
151  return size_.load();
152  }
std::atomic< unsigned > size_
FileIndex::EntryNumber_t art::FileProperties::subRunEntryNumber ( ) const

Definition at line 167 of file ClosingCriteria.cc.

References treeEntryNumbers_subRun_.

168  {
169  return treeEntryNumbers_subRun_.load();
170  }
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_subRun_
void art::FileProperties::update_event ( )

Definition at line 191 of file ClosingCriteria.cc.

References counts_event_, and treeEntryNumbers_event_.

192  {
194  ++counts_event_;
195  }
std::atomic< unsigned > counts_event_
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_event_
void art::FileProperties::update_inputFile ( )

Definition at line 216 of file ClosingCriteria.cc.

References counts_inputFile_.

217  {
219  }
std::atomic< unsigned > counts_inputFile_
void art::FileProperties::update_run ( OutputFileStatus const  status)

Definition at line 207 of file ClosingCriteria.cc.

References counts_run_, art::Switching, and treeEntryNumbers_run_.

208  {
210  if (status != OutputFileStatus::Switching) {
211  ++counts_run_;
212  }
213  }
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_run_
std::atomic< unsigned > counts_run_
void art::FileProperties::update_subRun ( OutputFileStatus const  status)

Definition at line 198 of file ClosingCriteria.cc.

References counts_subRun_, art::Switching, and treeEntryNumbers_subRun_.

199  {
201  if (status != OutputFileStatus::Switching) {
202  ++counts_subRun_;
203  }
204  }
std::atomic< FileIndex::EntryNumber_t > treeEntryNumbers_subRun_
std::atomic< unsigned > counts_subRun_
void art::FileProperties::updateAge ( std::chrono::seconds const  age)

Definition at line 185 of file ClosingCriteria.cc.

References age(), and age_.

186  {
187  age_ = age;
188  }
std::atomic< std::chrono::seconds > age_
std::chrono::seconds age() const
void art::FileProperties::updateSize ( unsigned const  size)

Definition at line 179 of file ClosingCriteria.cc.

References size(), and size_.

180  {
181  size_ = size;
182  }
std::atomic< unsigned > size_
unsigned size() const

Member Data Documentation

std::atomic<std::chrono::seconds> art::FileProperties::age_
private

Definition at line 63 of file ClosingCriteria.h.

Referenced by age(), FileProperties(), operator=(), and updateAge().

std::atomic<unsigned> art::FileProperties::counts_event_
private

Definition at line 54 of file ClosingCriteria.h.

Referenced by FileProperties(), nEvents(), operator=(), and update_event().

std::atomic<unsigned> art::FileProperties::counts_inputFile_
private

Definition at line 57 of file ClosingCriteria.h.

Referenced by FileProperties(), nInputFiles(), operator=(), and update_inputFile().

std::atomic<unsigned> art::FileProperties::counts_job_
private

Definition at line 58 of file ClosingCriteria.h.

Referenced by FileProperties(), and operator=().

std::atomic<unsigned> art::FileProperties::counts_run_
private

Definition at line 56 of file ClosingCriteria.h.

Referenced by FileProperties(), nRuns(), operator=(), and update_run().

std::atomic<unsigned> art::FileProperties::counts_subRun_
private

Definition at line 55 of file ClosingCriteria.h.

Referenced by FileProperties(), nSubRuns(), operator=(), and update_subRun().

std::atomic<unsigned> art::FileProperties::size_
private

Definition at line 64 of file ClosingCriteria.h.

Referenced by FileProperties(), operator=(), size(), and updateSize().

std::atomic<FileIndex::EntryNumber_t> art::FileProperties::treeEntryNumbers_event_
private

Definition at line 59 of file ClosingCriteria.h.

Referenced by eventEntryNumber(), FileProperties(), operator=(), and update_event().

std::atomic<FileIndex::EntryNumber_t> art::FileProperties::treeEntryNumbers_inputFile_
private

Definition at line 62 of file ClosingCriteria.h.

Referenced by FileProperties(), and operator=().

std::atomic<FileIndex::EntryNumber_t> art::FileProperties::treeEntryNumbers_run_
private

Definition at line 61 of file ClosingCriteria.h.

Referenced by FileProperties(), operator=(), runEntryNumber(), and update_run().

std::atomic<FileIndex::EntryNumber_t> art::FileProperties::treeEntryNumbers_subRun_
private

Definition at line 60 of file ClosingCriteria.h.

Referenced by FileProperties(), operator=(), subRunEntryNumber(), and update_subRun().


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