#include <SourceHelper.h>
|
| SourceHelper (ModuleDescription const &md) |
|
| SourceHelper (SourceHelper const &)=delete |
|
| SourceHelper (SourceHelper &&)=delete |
|
SourceHelper & | operator= (SourceHelper const &)=delete |
|
SourceHelper & | operator= (SourceHelper &&)=delete |
|
template<typename T > |
Ptr< T > | makePtr (TypeLabel const &t, Principal const &p, typename Ptr< T >::key_type key) const |
|
RunPrincipal * | makeRunPrincipal (RunAuxiliary const &runAux) const |
|
RunPrincipal * | makeRunPrincipal (RunID r, Timestamp const &startTime) const |
|
RunPrincipal * | makeRunPrincipal (RunNumber_t r, Timestamp const &startTime) const |
|
SubRunPrincipal * | makeSubRunPrincipal (SubRunAuxiliary const &subRunAux) const |
|
SubRunPrincipal * | makeSubRunPrincipal (SubRunID const &sr, Timestamp const &startTime) const |
|
SubRunPrincipal * | makeSubRunPrincipal (RunNumber_t r, SubRunNumber_t sr, Timestamp const &startTime) const |
|
EventPrincipal * | makeEventPrincipal (EventAuxiliary const &eventAux, std::unique_ptr< History > &&history) const |
|
EventPrincipal * | makeEventPrincipal (EventID const &e, Timestamp const &startTime, bool isRealData=true, EventAuxiliary::ExperimentType eType=EventAuxiliary::Data) const |
|
EventPrincipal * | makeEventPrincipal (RunNumber_t r, SubRunNumber_t sr, EventNumber_t e, Timestamp const &startTime, bool isRealData=true, EventAuxiliary::ExperimentType eType=EventAuxiliary::Data) const |
|
template<typename T > |
art::Ptr< T > | makePtr (TypeLabel const &tl, Principal const &p, typename Ptr< T >::key_type key) const |
|
|
template<typename T > |
class | Source |
|
Definition at line 31 of file SourceHelper.h.
Definition at line 51 of file SourceHelper.cc.
64 auto const phid = history->processHistoryID();
70 "Error while attempting to create event principal from SourceHelper.\n"}
71 <<
"There is no processing history corresponding to the valid id: " 73 <<
"Please contact artists@fnal.gov for guidance.";
78 auto const new_phid = processHistory.
id();
80 history->setProcessHistoryID(new_phid);
cet::exempt_ptr< ProductTables const > presentProducts_
ProcessHistoryID id() const
static collection_type const & get()
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
void push_back(const_reference t)
static auto emplace(value_type const &value)
Definition at line 151 of file SourceHelper.cc.
154 if (history.get() ==
nullptr) {
157 "Error while attempting to create principal from SourceHelper.\n"}
158 <<
"The provided 'unique_ptr<History>' object is null, which is not " 160 "for this makeEventPrincipal function overload. Please choose a " 162 "function to use, or provided a non-null History unique pointer. " 164 "artists@fnal.gov for further guidance.";
168 auto const processHistoryID = new_history->processHistoryID();
169 auto principal =
new EventPrincipal{eventAux,
173 if (processHistoryID.isValid()) {
174 principal->markProcessHistoryAsModified();
std::unique_ptr< History > history_(ProcessConfiguration const &, std::unique_ptr< History > &&) const
cet::exempt_ptr< ProductTables const > presentProducts_
ProcessConfiguration const & processConfiguration() const
void throwIfProductsNotRegistered_() const
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition at line 180 of file SourceHelper.cc.
186 EventAuxiliary
const eventAux{
e, startTime, isRealData, eType};
EventPrincipal * makeEventPrincipal(EventAuxiliary const &eventAux, std::unique_ptr< History > &&history) const
Definition at line 191 of file SourceHelper.cc.
EventPrincipal * makeEventPrincipal(EventAuxiliary const &eventAux, std::unique_ptr< History > &&history) const
static constexpr double sr
Definition at line 100 of file SourceHelper.h.
104 BranchDescription
const pd{
p.branchType(),
109 ProductID
const pid{pd.productID()};
110 return Ptr<T>{
pid,
key,
p.productGetter(
pid)};
std::string const & moduleLabel() const
ProcessConfiguration const & processConfiguration() const
fhicl::ParameterSetID const & parameterSetID() const
Definition at line 92 of file SourceHelper.cc.
95 runAux.processHistoryID() =
97 auto principal =
new RunPrincipal{
99 if (runAux.processHistoryID().isValid()) {
100 principal->markProcessHistoryAsModified();
cet::exempt_ptr< ProductTables const > presentProducts_
ProcessConfiguration const & processConfiguration() const
void throwIfProductsNotRegistered_() const
ProcessHistoryID processHistoryID_(BranchType, ProcessConfiguration const &) const
Definition at line 106 of file SourceHelper.cc.
RunPrincipal * makeRunPrincipal(RunAuxiliary const &runAux) const
static constexpr Timestamp invalidTimestamp()
Definition at line 114 of file SourceHelper.cc.
RunPrincipal * makeRunPrincipal(RunAuxiliary const &runAux) const
Definition at line 121 of file SourceHelper.cc.
125 subRunAux.setProcessHistoryID(phid);
126 auto principal =
new SubRunPrincipal{
128 if (subRunAux.processHistoryID().isValid()) {
129 principal->markProcessHistoryAsModified();
cet::exempt_ptr< ProductTables const > presentProducts_
ProcessConfiguration const & processConfiguration() const
void throwIfProductsNotRegistered_() const
ProcessHistoryID processHistoryID_(BranchType, ProcessConfiguration const &) const
Definition at line 135 of file SourceHelper.cc.
SubRunPrincipal * makeSubRunPrincipal(SubRunAuxiliary const &subRunAux) const
static constexpr Timestamp invalidTimestamp()
static constexpr double sr
Definition at line 143 of file SourceHelper.cc.
SubRunPrincipal * makeSubRunPrincipal(SubRunAuxiliary const &subRunAux) const
static constexpr double sr
Definition at line 34 of file SourceHelper.cc.
41 return processHistory.
id();
44 processHistory.push_back(
pc);
45 auto const phid = processHistory.id();
cet::exempt_ptr< ProductTables const > presentProducts_
ProcessHistoryID id() const
static auto emplace(value_type const &value)
Definition at line 85 of file SourceHelper.cc.
cet::exempt_ptr< ProductTables const > presentProducts_
void art::SourceHelper::throwIfProductsNotRegistered_ |
( |
| ) |
const |
|
private |
Definition at line 18 of file SourceHelper.cc.
23 "Error while attempting to create principal from SourceHelper.\n")
24 <<
"Principals cannot be created until product registration is " 26 "This can happen if you are attempting to create a Principal\n" 27 "outside of your 'readNext' function, or if you are using a\n" 28 "different SourceHelper object than the one provided by art.\n" 29 "Please contact artists@fnal.gov for guidance.";
cet::exempt_ptr< ProductTables const > presentProducts_
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
The documentation for this class was generated from the following files: