1 #ifndef art_Framework_Principal_Run_h 2 #define art_Framework_Principal_Run_h 20 #define PUT_DEPRECATION_MSG \ 22 "art warning: The Run::put(...) function without a product semantic is " \ 24 " Please adjust your usage to include the correct semantic " \ 26 " run.put(std::move(product), art::fullRun());\n" \ 27 " run.put(std::move(product), instanceName, " \ 28 "art::runFragment());\n\n" \ 29 " Generally, Run::put calls made in beginRun should include " \ 31 " Run::put calls made in endRun should use " \ 32 "art::runFragment().\n" \ 33 " Contact artists@fnal.gov for assistance or details.\n\n" 43 std::optional<ProductInserter> inserter = std::nullopt,
77 template <
typename PROD>
79 std::unique_ptr<PROD>&& edp,
81 template <
typename PROD>
84 template <
typename PROD>
87 template <
typename PROD>
90 template <
typename PROD>
94 template <
typename PROD>
96 std::string
const& instance,
98 template <
typename PROD>
100 std::string
const& instance,
119 template <
typename PROD>
128 template <
typename PROD>
132 return put(std::move(edp),
"", semantic);
135 template <
typename PROD>
140 return put(std::move(edp),
"", semantic);
143 template <
typename PROD>
148 return put(std::move(edp),
"", std::move(semantic));
151 template <
typename PROD>
161 template <
typename PROD>
170 "art error: A Run product put with the semantic 'RunFragment'\n" 171 " must be able to be aggregated. Please add the appropriate\n" 172 " void aggregate(T const&)\n" 173 " function to your class, or contact artists@fnal.gov.\n");
177 <<
"\nCannot put a product corresponding to a full Run using\n" 178 <<
"art::runFragment(). This can happen if you attempted to\n" 179 <<
"put a product at beginRun using art::runFragment().\n" 180 <<
"Please use either:\n" 181 <<
" art::fullRun(), or\n" 182 <<
" art::runFragment(art::RangeSet const&)\n" 183 <<
"or contact artists@fnal.gov for assistance.\n";
188 template <
typename PROD>
197 "art error: A Run product put with the semantic 'RunFragment'\n" 198 " must be able to be aggregated. Please add the appropriate\n" 199 " void aggregate(T const&)\n" 200 " function to your class, or contact artists@fnal.gov.\n");
202 if (semantic.
rs.collapse().is_full_run()) {
204 <<
"\nCannot put a product corresponding to a full Run using\n" 205 <<
"art::runFragment(art::RangeSet&). Please use:\n" 206 <<
" art::fullRun()\n" 207 <<
"or contact artists@fnal.gov for assistance.\n";
209 if (!semantic.
rs.is_valid()) {
211 <<
"\nCannot put a product with an invalid RangeSet.\n" 212 <<
"Please contact artists@fnal.gov.\n";
214 return inserter_->put(std::move(edp), instance, semantic.
rs);
219 #undef PUT_DEPRECATION_MSG
bool get(SelectorBase const &, Handle< PROD > &result) const
#define PUT_DEPRECATION_MSG
Timestamp const & endTime() const
ProductID getProductID(std::string const &instance_name="") const
std::optional< fhicl::ParameterSet const > getProcessParameterSet(std::string const &process) const
Run & operator=(Run const &)=delete
const std::string instance
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
std::vector< ProductToken< PROD > > getProductTokens(SelectorBase const &selector=MatchAllSelector{}) const
EDProductGetter const * productGetter(ProductID const pid) const
std::vector< InputTag > getInputTags(SelectorBase const &selector=MatchAllSelector{}) const
std::size_t getView(std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName, std::vector< ELEMENT const * > &result) const
ProcessHistory const & processHistory() const
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
Handle< PROD > getHandle(SelectorBase const &) const
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
std::optional< ProductInserter > inserter_
static RangeSet invalid()
cet::exempt_ptr< BranchDescription const > getProductDescription(ProductID) const
Timestamp const & beginTime() const
RunPrincipal const & runPrincipal_
PROD const & getProduct(InputTag const &tag) const
static RangeSet forRun(RunID)
std::vector< Handle< PROD > > getMany(SelectorBase const &selector=MatchAllSelector{}) const
std::optional< Provenance const > getProductProvenance(ProductID) const
Run(RunPrincipal const &srp, ModuleContext const &mc, std::optional< ProductInserter > inserter=std::nullopt, RangeSet const &rs=RangeSet::invalid())
IDNumber_t< Level::Run > RunNumber_t