LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
EventPrincipal.cc
Go to the documentation of this file.
3 
4 // vim: set sw=2 expandtab :
5 
6 namespace art {
7 
9 
11  EventAuxiliary const& aux,
12  ProcessConfiguration const& pc,
13  cet::exempt_ptr<ProductTable const> presentProducts,
14  std::unique_ptr<DelayedReader>&&
15  reader /*= std::make_unique<NoDelayedReader>()*/,
16  bool const lastInSubRun /*= false*/)
18  pc,
19  presentProducts,
20  aux.processHistoryID(),
21  std::move(reader)}
22  , aux_{aux}
23  , lastInSubRun_{lastInSubRun}
24  {}
25 
26  Event
28  {
29  return Event{*this, mc, makeInserter(mc)};
30  }
31 
32  Event
34  {
35  return Event{*this, mc};
36  }
37 
38  EventAuxiliary const&
40  {
41  return aux_;
42  }
43 
44  EventID const&
46  {
47  return aux_.id();
48  }
49 
52  {
53  return aux_.id().event();
54  }
55 
58  {
59  return aux_.id().subRun();
60  }
61 
64  {
65  return aux_.id().run();
66  }
67 
68  Timestamp const&
70  {
71  return aux_.time();
72  }
73 
74  bool
76  {
77  return aux_.isRealData();
78  }
79 
82  {
83  return aux_.experimentType();
84  }
85 
86  bool
88  {
89  return lastInSubRun_;
90  }
91 
92  SubRunPrincipal const&
94  {
95  if (subRunPrincipal_.get() == nullptr) {
97  << "Tried to obtain a NULL subRunPrincipal.\n";
98  }
99  return *subRunPrincipal_;
100  }
101 
102  void
103  EventPrincipal::setSubRunPrincipal(cet::exempt_ptr<SubRunPrincipal const> srp)
104  {
105  subRunPrincipal_ = srp;
106  }
107 
108  void
110  {
112  }
113 
114  void
116  ProductTables const& producedProducts)
117  {
120  }
121 } // namespace art
ProcessHistoryID const & processHistoryID() const noexcept
std::optional< ProductInserter > makeInserter(ModuleContext const &mc)
Definition: Principal.cc:813
SubRunNumber_t subRun() const
SubRunPrincipal const & subRunPrincipal() const
void setProcessHistoryID(ProcessHistoryID const &)
EventAuxiliary aux_
RunNumber_t run() const
Event makeEvent(ModuleContext const &mc)
EventAuxiliary::ExperimentType ExperimentType() const
EventNumber_t event() const
void setSubRunPrincipal(cet::exempt_ptr< SubRunPrincipal const > srp)
bool isReal() const
RunNumber_t run() const
Definition: EventID.h:98
Timestamp const & time() const
EventPrincipal(EventAuxiliary const &aux, ProcessConfiguration const &pc, cet::exempt_ptr< ProductTable const > presentProducts, std::unique_ptr< DelayedReader > &&rtrv=std::make_unique< NoDelayedReader >(), bool lastInSubRun=false)
EventAuxiliary::ExperimentType experimentType() const noexcept
void createGroupsForProducedProducts(ProductTables const &producedProducts)
Definition: Principal.cc:201
cet::exempt_ptr< SubRunPrincipal const > subRunPrincipal_
ProcessHistoryID const & processHistoryID() const
Definition: Principal.h:148
EventID const & eventID() const
bool isLastInSubRun() const
IDNumber_t< Level::SubRun > SubRunNumber_t
Definition: IDNumber.h:119
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
IDNumber_t< Level::Event > EventNumber_t
Definition: IDNumber.h:118
void createGroupsForProducedProducts(ProductTables const &producedProducts)
Definition: MVAAlg.h:12
EventNumber_t event() const
Definition: EventID.h:116
bool isRealData() const noexcept
SubRunNumber_t subRun() const
Definition: EventID.h:110
EventID const & id() const noexcept
Timestamp const & time() const noexcept
EventAuxiliary const & eventAux() const
IDNumber_t< Level::Run > RunNumber_t
Definition: IDNumber.h:120