1 #ifndef art_Framework_Modules_detail_ProvenanceDumperImpl_h 2 #define art_Framework_Modules_detail_ProvenanceDumperImpl_h 20 #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;
58 if (!resolved_product) {
62 bool wantCallFunc =
true;
63 Provenance const prov{cet::make_exempt_ptr(&g)};
89 template <
typename R,
typename... ARGS>
99 using cet::enable_if_function_exists_t;
102 template <
typename DETAIL,
typename Enable =
void>
105 template <
typename DETAIL>
117 template <
typename DETAIL,
typename Enable =
void>
120 template <
typename DETAIL>
123 enable_if_function_exists_t<void (DETAIL::*)(), &DETAIL::preProcessEvent>> {
127 detail.preProcessEvent();
132 template <
typename DETAIL,
typename Enable =
void>
135 template <
typename DETAIL>
138 enable_if_function_exists_t<void (DETAIL::*)(),
139 &DETAIL::postProcessEvent>> {
143 detail.postProcessEvent();
148 template <
typename DETAIL,
typename Enable =
void>
151 template <
typename DETAIL>
154 enable_if_function_exists_t<void (DETAIL::*)(),
155 &DETAIL::preProcessSubRun>> {
159 detail.preProcessSubRun();
164 template <
typename DETAIL,
typename Enable =
void>
167 template <
typename DETAIL>
170 enable_if_function_exists_t<void (DETAIL::*)(),
171 &DETAIL::postProcessSubRun>> {
175 detail.postProcessSubRun();
180 template <
typename DETAIL,
typename Enable =
void>
183 template <
typename DETAIL>
186 enable_if_function_exists_t<void (DETAIL::*)(), &DETAIL::preProcessRun>> {
190 detail.preProcessRun();
195 template <
typename DETAIL,
typename Enable =
void>
198 template <
typename DETAIL>
201 enable_if_function_exists_t<void (DETAIL::*)(), &DETAIL::postProcessRun>> {
205 detail.postProcessRun();
210 template <
typename DETAIL,
typename Enable =
void>
213 template <
typename DETAIL>
216 enable_if_function_exists_t<void (DETAIL::*)(), &DETAIL::endJob>> {
229 template <
typename DETAIL,
typename Enable =
void>
232 EventPrincipal const&)> {};
234 template <
typename DETAIL>
237 enable_if_function_exists_t<void (DETAIL::*)(Provenance const&),
238 &DETAIL::processEventProvenance>> {
242 pp(p, &DETAIL::processEventProvenance);
247 template <
typename DETAIL,
typename Enable =
void>
250 SubRunPrincipal const&)> {};
252 template <
typename DETAIL>
255 enable_if_function_exists_t<void (DETAIL::*)(Provenance const&),
256 &DETAIL::processSubRunProvenance>> {
260 pp(p, &DETAIL::processSubRunProvenance);
265 template <
typename DETAIL,
typename Enable =
void>
268 RunPrincipal const&)> {};
270 template <
typename DETAIL>
273 enable_if_function_exists_t<void (DETAIL::*)(Provenance const&),
274 &DETAIL::processRunProvenance>> {
278 pp(p, &DETAIL::processRunProvenance);
284 template <
typename DETAIL>
292 : detail_{detail}, pp_{pp}
static void invoke(DETAIL &detail)
void operator()(art::Principal const &p, void(DETAIL::*func)(art::Provenance const &)) const
static void invoke(PrincipalProcessor< DETAIL > const &pp, EventPrincipal const &p)
static void invoke(DETAIL &detail)
static void invoke(DETAIL &detail)
static void invoke(DETAIL &detail)
static void invoke(DETAIL &detail)
void writeRun(RunPrincipal &r)
static void invoke(DETAIL &detail)
bool const wantPresentOnly_
bool const wantResolvedOnly_
cet::exempt_ptr< ProductProvenance const > productProvenance() const
void writeSubRun(SubRunPrincipal &sr)
EDProduct const * anyProduct() const
static void invoke(DETAIL &detail)
void write(EventPrincipal &e)
bool resolveProductIfAvailable(TypeID wanted_wrapper=TypeID{}) const
PrincipalProcessor(DETAIL &detail, bool const wantPresentOnly, bool const resolveProducts, bool const wantResolvedOnly)
bool const resolveProducts_
static void invoke(PrincipalProcessor< DETAIL > const &pp, RunPrincipal const &p)
static void invoke(PrincipalProcessor< DETAIL > const &pp, SubRunPrincipal const &p)
ProvenanceDumperImpl(DETAIL &detail, PrincipalProcessor< DETAIL > &pp)
PrincipalProcessor< DETAIL > & pp_
static void invoke(DETAIL &detail)