1 #ifndef art_Framework_Principal_SubRun_h 2 #define art_Framework_Principal_SubRun_h 22 #define PUT_DEPRECATION_MSG \ 24 "art warning: The SubRun::put(...) function without a product semantic is " \ 26 " Please adjust your usage to include the correct semantic " \ 28 " subrun.put(std::move(product), art::fullSubRun());\n" \ 29 " subrun.put(std::move(product), instanceName, " \ 30 "art::subRunFragment());\n\n" \ 31 " Generally, SubRun::put calls made in beginSubRun should " \ 32 "include art::fullSubRun();\n" \ 33 " SubRun::put calls made in endSubRun should use " \ 34 "art::subRunFragment().\n" \ 35 " Contact artists@fnal.gov for assistance or details.\n\n" 45 std::optional<ProductInserter> inserter = std::nullopt,
81 template <
typename PROD>
83 std::unique_ptr<PROD>&& edp,
85 template <
typename PROD>
88 template <
typename PROD>
91 template <
typename PROD>
94 template <
typename PROD>
98 template <
typename PROD>
100 std::string
const& instance,
102 template <
typename PROD>
104 std::string
const& instance,
124 template <
typename PROD>
133 template <
typename PROD>
138 return put(std::move(edp),
"", semantic);
141 template <
typename PROD>
146 return put(std::move(edp),
"", semantic);
149 template <
typename PROD>
154 return put(std::move(edp),
"", std::move(semantic));
157 template <
typename PROD>
167 template <
typename PROD>
176 "art error: A SubRun product put with the semantic 'SubRunFragment'\n" 177 " must be able to be aggregated. Please add the appropriate\n" 178 " void aggregate(T const&)\n" 179 " function to your class, or contact artists@fnal.gov.\n");
183 <<
"\nCannot put a product corresponding to a full SubRun using\n" 184 <<
"art::subRunFragment(). This can happen if you attempted to\n" 185 <<
"put a product at beginSubRun using art::subRunFragment().\n" 186 <<
"Please use either:\n" 187 <<
" art::fullSubRun(), or\n" 188 <<
" art::subRunFragment(art::RangeSet const&)\n" 189 <<
"or contact artists@fnal.gov for assistance.\n";
194 template <
typename PROD>
203 "art error: A SubRun product put with the semantic 'SubRunFragment'\n" 204 " must be able to be aggregated. Please add the appropriate\n" 205 " void aggregate(T const&)\n" 206 " function to your class, or contact artists@fnal.gov.\n");
208 if (semantic.
rs.collapse().is_full_subRun()) {
210 <<
"\nCannot put a product corresponding to a full SubRun using\n" 211 <<
"art::subRunFragment(art::RangeSet&). Please use:\n" 212 <<
" art::fullSubRun()\n" 213 <<
"or contact artists@fnal.gov for assistance.\n";
215 if (!semantic.
rs.is_valid()) {
217 <<
"\nCannot put a product with an invalid RangeSet.\n" 218 <<
"Please contact artists@fnal.gov.\n";
220 return inserter_->put(std::move(edp), instance, semantic.
rs);
225 #undef PUT_DEPRECATION_MSG
bool get(SelectorBase const &, Handle< PROD > &result) const
SubRun(SubRunPrincipal const &srp, ModuleContext const &mc, std::optional< ProductInserter > inserter=std::nullopt, RangeSet const &rs=RangeSet::invalid())
ProductID getProductID(std::string const &instance_name="") const
std::optional< fhicl::ParameterSet const > getProcessParameterSet(std::string const &process) const
SubRunPrincipal const & subRunPrincipal_
const std::string instance
ProcessHistory const & processHistory() const
std::vector< ProductToken< PROD > > getProductTokens(SelectorBase const &selector=MatchAllSelector{}) const
static RangeSet forSubRun(SubRunID)
EDProductGetter const * productGetter(ProductID const pid) const
Run const & getRun() const
IDNumber_t< Level::SubRun > SubRunNumber_t
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
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
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
Handle< PROD > getHandle(SelectorBase const &) const
SubRunNumber_t subRun() const
#define PUT_DEPRECATION_MSG
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Timestamp const & endTime() const
static RangeSet invalid()
cet::exempt_ptr< BranchDescription const > getProductDescription(ProductID) const
bool is_full_subRun() const
Timestamp const & beginTime() const
PROD const & getProduct(InputTag const &tag) const
std::optional< ProductInserter > inserter_
std::vector< Handle< PROD > > getMany(SelectorBase const &selector=MatchAllSelector{}) const
std::optional< Provenance const > getProductProvenance(ProductID) const
IDNumber_t< Level::Run > RunNumber_t
SubRun & operator=(SubRun const &)=delete