Public Member Functions | Private Attributes | List of all members
art::detail::PrincipalProcessor< DETAIL > Class Template Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/art/v3_05_01/source/art/Framework/Modules/detail/ProvenanceDumperImpl.h"

Public Member Functions

 PrincipalProcessor (DETAIL &detail, bool const wantPresentOnly, bool const resolveProducts, bool const wantResolvedOnly)
 
void operator() (art::Principal const &p, void(DETAIL::*func)(art::Provenance const &)) const
 

Private Attributes

DETAIL & detail_
 
bool const wantPresentOnly_
 
bool const resolveProducts_
 
bool const wantResolvedOnly_
 

Detailed Description

template<typename DETAIL>
class art::detail::PrincipalProcessor< DETAIL >

Definition at line 27 of file ProvenanceDumperImpl.h.

Constructor & Destructor Documentation

template<typename DETAIL>
art::detail::PrincipalProcessor< DETAIL >::PrincipalProcessor ( DETAIL &  detail,
bool const  wantPresentOnly,
bool const  resolveProducts,
bool const  wantResolvedOnly 
)
inline

Definition at line 29 of file ProvenanceDumperImpl.h.

References func(), and art::detail::PrincipalProcessor< DETAIL >::operator()().

33  : detail_(detail)
34  , wantPresentOnly_(wantPresentOnly)
35  , resolveProducts_(resolveProducts)
36  , wantResolvedOnly_(wantResolvedOnly)
37  {}

Member Function Documentation

template<typename DETAIL >
void art::detail::PrincipalProcessor< DETAIL >::operator() ( art::Principal const &  p,
void(DETAIL::*)(art::Provenance const &)  func 
) const

Definition at line 51 of file ProvenanceDumperImpl.h.

References art::Group::anyProduct(), art::detail::PrincipalProcessor< DETAIL >::detail_, func(), MECModelEnuComparisons::g, cet::make_exempt_ptr(), gammaraytel::pr, art::Group::productProvenance(), art::Group::resolveProductIfAvailable(), art::detail::PrincipalProcessor< DETAIL >::resolveProducts_, art::detail::PrincipalProcessor< DETAIL >::wantPresentOnly_, and art::detail::PrincipalProcessor< DETAIL >::wantResolvedOnly_.

Referenced by art::detail::PrincipalProcessor< DETAIL >::PrincipalProcessor().

54  {
55  for (auto const& pr : p) {
56  Group const& g = *pr.second;
57  if (resolveProducts_) {
58  bool const resolved_product = g.resolveProductIfAvailable();
59  if (!resolved_product) {
60  continue;
61  }
62  }
63  bool wantCallFunc = true;
64  Provenance const prov{cet::make_exempt_ptr(&g)};
65  if (wantResolvedOnly_) {
66  wantCallFunc = (g.anyProduct() != nullptr);
67  } else if (wantPresentOnly_) {
68  // Unfortunately, there are files in which the product
69  // provenance has not been appropriately stored for dropped
70  // products. The first check below on the product
71  // provenance pointer is a precondition to calling
72  // prov.isPresent(), getting around this incorrect
73  // persistency behavior.
74  wantCallFunc = (g.productProvenance() != nullptr) && prov.isPresent();
75  }
76 
77  if (wantCallFunc) {
78  (detail_.*func)(prov);
79  }
80  }
81  }
const char * p
Definition: xmltok.h:285
exempt_ptr< E > make_exempt_ptr(E *) noexcept
double func(double x, double y)
std::map< TString, std::map< TString, SystShifts > > Group
Definition: syst_header.h:40

Member Data Documentation

template<typename DETAIL>
DETAIL& art::detail::PrincipalProcessor< DETAIL >::detail_
private
template<typename DETAIL>
bool const art::detail::PrincipalProcessor< DETAIL >::resolveProducts_
private
template<typename DETAIL>
bool const art::detail::PrincipalProcessor< DETAIL >::wantPresentOnly_
private
template<typename DETAIL>
bool const art::detail::PrincipalProcessor< DETAIL >::wantResolvedOnly_
private

The documentation for this class was generated from the following file: