Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
art::Granularity Class Reference

#include <OutputFileGranularity.h>

Public Types

enum  BT {
  Event, SubRun, Run, InputFile,
  Job, Unset
}
 

Public Member Functions

 ~Granularity () noexcept
 
 Granularity (BT const b) noexcept
 
 Granularity (Granularity const &rhs) noexcept
 
 Granularity (Granularity &&rhs) noexcept
 
Granularityoperator= (Granularity const &rhs) noexcept
 
Granularityoperator= (Granularity &&rhs) noexcept
 
BT operator() () const
 
 operator std::size_t () const
 

Static Public Member Functions

static constexpr std::size_t NBoundaries ()
 
static BT value (std::string const &spec)
 

Private Attributes

std::atomic< BTb_
 

Detailed Description

Definition at line 13 of file OutputFileGranularity.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

art::Granularity::~Granularity ( )
inlinenoexcept

Definition at line 53 of file OutputFileGranularity.h.

53 {}
art::Granularity::Granularity ( BT const  b)
inlinenoexcept

Definition at line 54 of file OutputFileGranularity.h.

54 : b_{b} {}
std::atomic< BT > b_
static bool * b
Definition: config.cpp:1043
art::Granularity::Granularity ( Granularity const &  rhs)
inlinenoexcept

Definition at line 55 of file OutputFileGranularity.h.

55 : b_{rhs.b_.load()} {}
std::atomic< BT > b_
art::Granularity::Granularity ( Granularity &&  rhs)
inlinenoexcept

Definition at line 56 of file OutputFileGranularity.h.

56 : b_{rhs.b_.load()} {}
std::atomic< BT > b_

Member Function Documentation

static constexpr std::size_t art::Granularity::NBoundaries ( )
inlinestatic

Definition at line 19 of file OutputFileGranularity.h.

20  {
21  return Unset;
22  }
art::Granularity::operator std::size_t ( ) const
inline

Definition at line 78 of file OutputFileGranularity.h.

78 { return static_cast<std::size_t>(b_.load()); }
std::atomic< BT > b_
BT art::Granularity::operator() ( ) const
inline

Definition at line 74 of file OutputFileGranularity.h.

75  {
76  return b_.load();
77  }
std::atomic< BT > b_
Granularity& art::Granularity::operator= ( Granularity const &  rhs)
inlinenoexcept

Definition at line 58 of file OutputFileGranularity.h.

59  {
60  if (this != &rhs) {
61  b_ = rhs.b_.load();
62  }
63  return *this;
64  }
std::atomic< BT > b_
Granularity& art::Granularity::operator= ( Granularity &&  rhs)
inlinenoexcept

Definition at line 66 of file OutputFileGranularity.h.

67  {
68  b_ = rhs.b_.load();
69  return *this;
70  }
std::atomic< BT > b_
static BT art::Granularity::value ( std::string const &  spec)
inlinestatic

Definition at line 24 of file OutputFileGranularity.h.

25  {
26  if (spec == "Event") {
27  return Event;
28  } else if (spec == "SubRun") {
29  return SubRun;
30  } else if (spec == "Run") {
31  return Run;
32  } else if (spec == "InputFile") {
33  return InputFile;
34  } else if (spec == "Job") {
35  return Job;
36  } else if (spec == "Unset") {
37  return Unset;
38  } else {
40  << "Specified output-file switching boundary (\"" << spec
41  << "\") not supported.\n"
42  "Please choose from:\n"
43  " \"Event\"\n"
44  " \"SubRun\"\n"
45  " \"Run\"\n"
46  " \"InputFile\"\n"
47  " \"Job\"\n"
48  " \"Unset\"";
49  }
50  }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66

Member Data Documentation

std::atomic<BT> art::Granularity::b_
private

Definition at line 81 of file OutputFileGranularity.h.


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