LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ProductStatus.h
Go to the documentation of this file.
1 #ifndef canvas_Persistency_Provenance_ProductStatus_h
2 #define canvas_Persistency_Provenance_ProductStatus_h
3 
4 namespace art {
5 
6  using ProductStatus = unsigned char;
7 
8  namespace productstatus {
9  constexpr ProductStatus
10  present() noexcept
11  {
12  return 0x0;
13  } // Product was made successfully
14  constexpr ProductStatus
15  neverCreated() noexcept
16  {
17  return 0x1;
18  } // Product was not made successfully
19  constexpr ProductStatus
20  dropped() noexcept
21  {
22  return 0x2;
23  } // Product was not made successfully
24  constexpr ProductStatus
26  {
27  return 0x3;
28  } // Product is a dummy placeholder object with an invalid range set to
29  // prevent double-counting when combining run/subrun products
30  constexpr ProductStatus
31  unknown() noexcept
32  {
33  return 0xfe;
34  } // Status unknown (used for backward compatibility)
35  constexpr ProductStatus
36  uninitialized() noexcept
37  {
38  return 0xff;
39  } // Status not set
40 
41  constexpr bool
42  present(ProductStatus const status) noexcept
43  {
44  return status == present();
45  }
46  constexpr bool
47  neverCreated(ProductStatus const status) noexcept
48  {
49  return status == neverCreated();
50  }
51  constexpr bool
52  dropped(ProductStatus const status) noexcept
53  {
54  return status == dropped();
55  }
56  constexpr bool
58  {
59  return status == dummyToPreventDoubleCount();
60  }
61  constexpr bool
62  unknown(ProductStatus const status) noexcept
63  {
64  return status == unknown();
65  }
66  constexpr bool
67  uninitialized(ProductStatus const status) noexcept
68  {
69  return status == uninitialized();
70  }
71  } // productstatus
72 } // art
73 
74 #endif /* canvas_Persistency_Provenance_ProductStatus_h */
75 
76 // Local Variables:
77 // mode: c++
78 // End:
constexpr ProductStatus dummyToPreventDoubleCount() noexcept
Definition: ProductStatus.h:25
constexpr ProductStatus dropped() noexcept
Definition: ProductStatus.h:20
constexpr ProductStatus uninitialized() noexcept
Definition: ProductStatus.h:36
constexpr ProductStatus unknown() noexcept
Definition: ProductStatus.h:31
unsigned char ProductStatus
Definition: ProductStatus.h:6
constexpr ProductStatus neverCreated() noexcept
Definition: ProductStatus.h:15
Definition: MVAAlg.h:12
constexpr ProductStatus present() noexcept
Definition: ProductStatus.h:10