1 #ifndef canvas_Persistency_Common_Sampled_h 2 #define canvas_Persistency_Common_Sampled_h 59 #include "cetlib_except/demangle.h" 63 #include <type_traits> 72 using container_t = std::map<std::string, std::map<SubRunID, T>>;
85 RunID const& id)
const;
112 return process_name.insert(0,
"SampledFrom");
116 template <
typename T>
124 auto const type_name = cet::demangle_symbol(
typeid(*this).name());
125 if (type_name.find(
"art::Assns") != std::string::npos ||
126 type_name.find(
"art::Ptr") != std::string::npos) {
128 <<
"An attempt was made to create the type " 129 << cet::demangle_symbol(
typeid(
T).
name())
131 "This is not allowed. Please contact artists@fnal.gov for " 136 template <
typename T>
143 template <
typename T>
150 template <
typename T>
157 template <
typename T>
162 auto dataset_it =
products_.find(dataset);
167 auto const& ids = dataset_it->second;
168 auto id_it = ids.
find(
id);
169 if (id_it == ids.cend()) {
static short Class_Version()
InputTag const & originalInputTag() const
auto sampled_from(std::string process_name)
int find(char c, int index=0, bool cs=TRUE) const
std::map< std::string, std::map< SubRunID, T >> container_t
constexpr exempt_ptr< E > make_exempt_ptr(E *) noexcept
cet::exempt_ptr< T const > get(std::string const &dataset, RunID const &id) const
void insert(std::string const &dataset, SubRunID const &id, T &&value)
typename container_t::const_iterator const_iterator
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
static SubRunID invalidSubRun(RunID const &rID)