1 #ifndef art_Framework_Principal_Run_h 2 #define art_Framework_Principal_Run_h 75 template <
typename PROD>
77 template <
typename PROD>
79 template <
typename PROD>
81 template <
typename PROD>
86 template <
typename PROD>
88 template <
typename PROD>
92 template <
typename PROD>
96 template <
typename PROD>
111 std::vector<fhicl::ParameterSet>&
ps)
const;
121 bool const checkProducts,
122 std::set<TypeLabel>
const& expectedProducts);
126 template <
typename T>
131 template <
typename PROD>
147 template <
typename PROD>
154 template <
typename PROD>
162 template <
typename PROD>
170 template <
typename PROD>
181 template <
typename PROD>
190 template <
typename PROD>
200 template <
typename PROD>
209 "art error: A Run product put with the semantic 'RunFragment'\n" 210 " must be able to be aggregated. Please add the appropriate\n" 211 " void aggregate(T const&)\n" 212 " function to your class, or contact artists@fnal.gov.\n");
216 <<
"\nCannot put a product corresponding to a full Run using\n" 217 <<
"art::runFragment(). This can happen if you attempted to\n" 218 <<
"put a product at beginRun using art::runFragment().\n" 219 <<
"Please use either:\n" 220 <<
" art::fullRun(), or\n" 221 <<
" art::runFragment(art::RangeSet const&)\n" 222 <<
"or contact artists@fnal.gov for assistance.\n";
227 template <
typename PROD>
236 "art error: A Run product put with the semantic 'RunFragment'\n" 237 " must be able to be aggregated. Please add the appropriate\n" 238 " void aggregate(T const&)\n" 239 " function to your class, or contact artists@fnal.gov.\n");
240 if (semantic.
rs.collapse().is_full_run()) {
242 <<
"\nCannot put a product corresponding to a full Run using\n" 243 <<
"art::runFragment(art::RangeSet&). Please use:\n" 244 <<
" art::fullRun()\n" 245 <<
"or contact artists@fnal.gov for assistance.\n";
247 return put_<PROD>(std::move(
product), productInstanceName, semantic.
rs);
250 template <
typename PROD>
256 TypeID const tid{
typeid(PROD)};
257 if (
product.get() ==
nullptr) {
259 <<
"\nA null unique_ptr was passed to 'put'.\n" 260 <<
"The pointer is of type " << tid <<
".\n" 261 <<
"The specified productInstanceName was '" << productInstanceName
267 <<
"\nCannot put a product with an invalid RangeSet.\n" 268 <<
"Please contact artists@fnal.gov.\n";
272 auto wp = std::make_unique<Wrapper<PROD>>(std::move(
product));
277 PMValue{std::move(wp), pd, rs});
278 if (!result.second) {
280 <<
"\nAttempt to put multiple products with the\n" 281 <<
"following description onto the Run.\n" 282 <<
"Products must be unique per Run.\n" 283 <<
"=================================\n" 284 << pd <<
"=================================\n";
287 return pd.productID();
PROD const * getPointerByLabel(InputTag const &tag) const
bool getProcessParameterSet(std::string const &processName, std::vector< fhicl::ParameterSet > &ps) const
ProcessHistory const & processHistory() const
bool get(SelectorBase const &, Handle< PROD > &result) const
art::ProductID put(std::unique_ptr< PROD > &&)
static RangeSet forRun(RunID)
void commit(RunPrincipal &rp, bool const checkProducts, std::set< TypeLabel > const &expectedProducts)
art::ProductID put_(std::unique_ptr< PROD > &&product, std::string const &productInstanceName, RangeSet const &rs)
Put a new product with a 'product instance name' and a 'range set'.
std::size_t getView(std::string const &moduleLabel, std::string const &productInstanceName, std::vector< ELEMENT const * > &result) const
void getMany(SelectorBase const &, std::vector< Handle< PROD >> &results) const
static RangeSet invalid()
Timestamp const & endTime() const
Timestamp const & endTime() const
Run(RunPrincipal const &rp, ModuleDescription const &md, cet::exempt_ptr< Consumer > consumer, RangeSet const &rsForPuttingProducts=RangeSet::invalid())
void getManyByType(std::vector< Handle< PROD >> &results) const
Principal const & principal_
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
virtual bool rangesEnabled() const =0
T product(std::vector< T > dims)
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
TypeLabelMap & putProducts()
RunAuxiliary const & aux_
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
BranchDescription const & getProductDescription(TypeID const &type, std::string const &productInstanceName) const
EDProductGetter const * productGetter(ProductID const pid) const
Timestamp const & beginTime() const
bool removeCachedProduct(Handle< PROD > &h) const
Timestamp const & beginTime() const
DataViewImpl(DataViewImpl const &)=delete
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
bool getByToken(ProductToken< PROD > const &token, Handle< PROD > &result) const
IDNumber_t< Level::Run > RunNumber_t
RangeSet productRangeSet_