1 #ifndef art_Framework_Modules_detail_ProvenanceDumperImpl_h 2 #define art_Framework_Modules_detail_ProvenanceDumperImpl_h 19 #include "cetlib/metaprogramming.h" 25 template <
typename DETAIL>
29 bool const wantPresentOnly,
30 bool const resolveProducts,
31 bool const wantResolvedOnly)
48 template <
typename DETAIL>
54 for (
auto const& pr : p) {
55 Group const& g = *pr.second;
63 if (e.category() !=
"ProductNotFound") {
68 <<
"Product reported as not present, but is pointed to " 72 bool wantCallFunc =
true;
73 Provenance const prov{cet::make_exempt_ptr(&g)};
100 template <
typename R,
typename... ARGS>
110 using cet::enable_if_function_exists_t;
113 template <
typename DETAIL,
typename Enable =
void>
117 template <
typename DETAIL>
129 template <
typename DETAIL,
typename Enable =
void>
133 template <
typename DETAIL>
136 enable_if_function_exists_t<void (DETAIL::*)(),
137 &DETAIL::preProcessEvent>> {
141 detail.preProcessEvent();
146 template <
typename DETAIL,
typename Enable =
void>
150 template <
typename DETAIL>
153 enable_if_function_exists_t<void (DETAIL::*)(),
154 &DETAIL::postProcessEvent>> {
158 detail.postProcessEvent();
163 template <
typename DETAIL,
typename Enable =
void>
167 template <
typename DETAIL>
170 enable_if_function_exists_t<void (DETAIL::*)(),
171 &DETAIL::preProcessSubRun>> {
175 detail.preProcessSubRun();
180 template <
typename DETAIL,
typename Enable =
void>
184 template <
typename DETAIL>
187 enable_if_function_exists_t<void (DETAIL::*)(),
188 &DETAIL::postProcessSubRun>> {
192 detail.postProcessSubRun();
197 template <
typename DETAIL,
typename Enable =
void>
201 template <
typename DETAIL>
204 enable_if_function_exists_t<void (DETAIL::*)(), &DETAIL::preProcessRun>> {
208 detail.preProcessRun();
213 template <
typename DETAIL,
typename Enable =
void>
217 template <
typename DETAIL>
220 enable_if_function_exists_t<void (DETAIL::*)(),
221 &DETAIL::postProcessRun>> {
225 detail.postProcessRun();
230 template <
typename DETAIL,
typename Enable =
void>
234 template <
typename DETAIL>
237 enable_if_function_exists_t<void (DETAIL::*)(), &DETAIL::endJob>> {
250 template <
typename DETAIL,
typename Enable =
void>
253 EventPrincipal const&)> {
256 template <
typename DETAIL>
259 enable_if_function_exists_t<void (DETAIL::*)(Provenance const&),
260 &DETAIL::processEventProvenance>> {
264 pp(p, &DETAIL::processEventProvenance);
269 template <
typename DETAIL,
typename Enable =
void>
272 SubRunPrincipal const&)> {
275 template <
typename DETAIL>
278 enable_if_function_exists_t<void (DETAIL::*)(Provenance const&),
279 &DETAIL::processSubRunProvenance>> {
283 pp(p, &DETAIL::processSubRunProvenance);
288 template <
typename DETAIL,
typename Enable =
void>
291 RunPrincipal const&)> {
294 template <
typename DETAIL>
297 enable_if_function_exists_t<void (DETAIL::*)(Provenance const&),
298 &DETAIL::processRunProvenance>> {
302 pp(p, &DETAIL::processRunProvenance);
308 template <
typename DETAIL>
316 : detail_{detail}, pp_{pp}
void operator()(art::Principal const &p, void(DETAIL::*func)(art::Provenance const &)) const
void writeRun(RunPrincipal &r)
static void invoke(PrincipalProcessor< DETAIL > const &pp, RunPrincipal const &p)
bool const wantPresentOnly_
bool const wantResolvedOnly_
static void invoke(PrincipalProcessor< DETAIL > const &pp, EventPrincipal const &p)
static void invoke(DETAIL &detail)
static void invoke(DETAIL &detail)
TypeID const & producedWrapperType() const
cet::exempt_ptr< ProductProvenance const > productProvenancePtr() const
void writeSubRun(SubRunPrincipal &sr)
static void invoke(DETAIL &detail)
static void invoke(DETAIL &detail)
static void invoke(DETAIL &detail)
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
static void invoke(PrincipalProcessor< DETAIL > const &pp, SubRunPrincipal const &p)
static void invoke(DETAIL &detail)
static void invoke(DETAIL &detail)
void write(EventPrincipal &e)
static void invoke(DETAIL &detail)
PrincipalProcessor(DETAIL &detail, bool const wantPresentOnly, bool const resolveProducts, bool const wantResolvedOnly)
bool const resolveProducts_
bool resolveProduct(TypeID const &) const override
EDProduct const * anyProduct() const override
ProvenanceDumperImpl(DETAIL &detail, PrincipalProcessor< DETAIL > &pp)
PrincipalProcessor< DETAIL > & pp_