LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
art::BranchMapper Class Reference

#include "BranchMapper.h"

Inheritance diagram for art::BranchMapper:
art::BranchMapperWithReader

Public Types

using result_t = cet::exempt_ptr< ProductProvenance const >
 

Public Member Functions

 BranchMapper (BranchMapper const &)=delete
 
BranchMapperoperator= (BranchMapper const &)=delete
 
 BranchMapper (bool delayedRead=false)
 
virtual ~BranchMapper ()=default
 
void write (std::ostream &) const
 
result_t branchToProductProvenance (ProductID const) const
 
result_t insert (std::unique_ptr< ProductProvenance const > &&)
 
void setDelayedRead (bool const value)
 

Private Types

using eiSet = std::map< ProductID, cet::value_ptr< ProductProvenance const >>
 

Private Member Functions

void readProvenance () const
 
virtual void readProvenance_ () const
 

Private Attributes

eiSet entryInfoSet_ {}
 
bool delayedRead_
 

Detailed Description

Definition at line 32 of file BranchMapper.h.

Member Typedef Documentation

using art::BranchMapper::eiSet = std::map<ProductID, cet::value_ptr<ProductProvenance const>>
private

Definition at line 54 of file BranchMapper.h.

using art::BranchMapper::result_t = cet::exempt_ptr<ProductProvenance const>

Definition at line 37 of file BranchMapper.h.

Constructor & Destructor Documentation

art::BranchMapper::BranchMapper ( BranchMapper const &  )
delete
BranchMapper::BranchMapper ( bool  delayedRead = false)
explicit

Definition at line 11 of file BranchMapper.cc.

11  : delayedRead_{delayedRead}
12 {}
virtual art::BranchMapper::~BranchMapper ( )
virtualdefault

Member Function Documentation

BranchMapper::result_t BranchMapper::branchToProductProvenance ( ProductID const  pid) const

Definition at line 33 of file BranchMapper.cc.

References entryInfoSet_, and readProvenance().

Referenced by art::detail::KeptProvenance::insertAncestors(), art::markAncestors(), and art::ProvenanceCheckerOutput::write().

34 {
36  auto it = entryInfoSet_.find(pid);
37  return it == entryInfoSet_.end() ? result_t() : result_t(it->second.get());
38 }
cet::exempt_ptr< ProductProvenance const > result_t
Definition: BranchMapper.h:37
constexpr std::tuple_element_t< I, art::AssnsNode< L, R, D > > & get(art::AssnsNode< L, R, D > &t) noexcept
void readProvenance() const
Definition: BranchMapper.cc:15
BranchMapper::result_t BranchMapper::insert ( std::unique_ptr< ProductProvenance const > &&  pp_ptr)

Definition at line 24 of file BranchMapper.cc.

References entryInfoSet_, and readProvenance().

Referenced by art::ResultsPrincipal::put(), art::RunPrincipal::put(), art::SubRunPrincipal::put(), art::EventPrincipal::put(), and art::BranchMapperWithReader::readProvenance_().

25 {
27  result_t result{pp_ptr.get()};
28  entryInfoSet_[result->productID()].reset(pp_ptr.release());
29  return result;
30 }
cet::exempt_ptr< ProductProvenance const > result_t
Definition: BranchMapper.h:37
void readProvenance() const
Definition: BranchMapper.cc:15
BranchMapper& art::BranchMapper::operator= ( BranchMapper const &  )
delete
void BranchMapper::readProvenance ( ) const
private

Definition at line 15 of file BranchMapper.cc.

References delayedRead_, and readProvenance_().

Referenced by branchToProductProvenance(), and insert().

16 {
17  if (delayedRead_) {
18  delayedRead_ = false;
20  }
21 }
virtual void readProvenance_() const
Definition: BranchMapper.h:61
virtual void art::BranchMapper::readProvenance_ ( ) const
inlineprivatevirtual

Reimplemented in art::BranchMapperWithReader.

Definition at line 61 of file BranchMapper.h.

Referenced by readProvenance().

62  {}
void art::BranchMapper::setDelayedRead ( bool const  value)
inline

Definition at line 48 of file BranchMapper.h.

References delayedRead_, and fhicl::detail::atom::value().

49  {
51  }
std::string value(boost::any const &)
void art::BranchMapper::write ( std::ostream &  ) const

Referenced by art::operator<<().

Member Data Documentation

bool art::BranchMapper::delayedRead_
mutableprivate

Definition at line 57 of file BranchMapper.h.

Referenced by readProvenance(), and setDelayedRead().

eiSet art::BranchMapper::entryInfoSet_ {}
private

Definition at line 56 of file BranchMapper.h.

Referenced by branchToProductProvenance(), and insert().


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