#include <BranchMapper.h>
Public Member Functions | |
boost::shared_ptr < ProductProvenance > | branchIDToProvenance (BranchID const &bid) const |
BranchMapper () | |
BranchMapper (bool delayedRead) | |
void | insert (ProductProvenance const &provenanceProduct) |
void | mergeMappers (boost::shared_ptr< BranchMapper > other) |
BranchID | oldProductIDToBranchID (ProductID const &oldProductID) const |
ProcessHistoryID const & | processHistoryID () const |
ProcessHistoryID & | processHistoryID () |
void | setDelayedRead (bool value) |
void | write (std::ostream &os) const |
virtual | ~BranchMapper () |
Private Types | |
typedef std::set < ProductProvenance > | eiSet |
Private Member Functions | |
virtual BranchID | oldProductIDToBranchID_ (ProductID const &oldProductID) const |
void | readProvenance () const |
virtual void | readProvenance_ () const |
Private Attributes | |
bool | delayedRead_ |
eiSet | entryInfoSet_ |
boost::shared_ptr< BranchMapper > | nextMapper_ |
ProcessHistoryID | processHistoryID_ |
Definition at line 26 of file BranchMapper.h.
typedef std::set<ProductProvenance> edm::BranchMapper::eiSet [private] |
Definition at line 53 of file BranchMapper.h.
edm::BranchMapper::BranchMapper | ( | ) |
Definition at line 10 of file BranchMapper.cc.
: entryInfoSet_(), nextMapper_(), delayedRead_(false), processHistoryID_() { }
edm::BranchMapper::BranchMapper | ( | bool | delayedRead | ) | [explicit] |
Definition at line 17 of file BranchMapper.cc.
: entryInfoSet_(), nextMapper_(), delayedRead_(delayedRead), processHistoryID_() { }
edm::BranchMapper::~BranchMapper | ( | ) | [virtual] |
Definition at line 24 of file BranchMapper.cc.
{}
boost::shared_ptr< ProductProvenance > edm::BranchMapper::branchIDToProvenance | ( | BranchID const & | bid | ) | const |
Definition at line 44 of file BranchMapper.cc.
References entryInfoSet_, nextMapper_, and readProvenance().
Referenced by edm::RootOutputFile::insertAncestors().
{ readProvenance(); ProductProvenance ei(bid); eiSet::const_iterator it = entryInfoSet_.find(ei); if (it == entryInfoSet_.end()) { if (nextMapper_) { return nextMapper_->branchIDToProvenance(bid); } else { return boost::shared_ptr<ProductProvenance>(); } } return boost::shared_ptr<ProductProvenance>(new ProductProvenance(*it)); }
void edm::BranchMapper::insert | ( | ProductProvenance const & | provenanceProduct | ) |
Definition at line 35 of file BranchMapper.cc.
References entryInfoSet_.
{ //NOTE:do not read provenance here because we only need the full // provenance when someone tries to access it not when doing the insert // doing the delay saves 20% of time when doing an analysis job //readProvenance(); entryInfoSet_.insert(entryInfo); }
void edm::BranchMapper::mergeMappers | ( | boost::shared_ptr< BranchMapper > | other | ) | [inline] |
Definition at line 44 of file BranchMapper.h.
References oldProductIDToBranchID_().
{ return oldProductIDToBranchID_(oldProductID); }
BranchID edm::BranchMapper::oldProductIDToBranchID_ | ( | ProductID const & | oldProductID | ) | const [private, virtual] |
Reimplemented in edm::BranchMapperWithReader.
Definition at line 59 of file BranchMapper.cc.
References Exception, and edm::errors::LogicError.
Referenced by oldProductIDToBranchID().
{ throw edm::Exception(errors::LogicError) << "Internal error: Illegal call of oldProductIDToBranchID_.\n" << "Please report this error to the Framework group\n"; }
ProcessHistoryID& edm::BranchMapper::processHistoryID | ( | ) | [inline] |
Definition at line 50 of file BranchMapper.h.
References processHistoryID_.
{return processHistoryID_;}
ProcessHistoryID const& edm::BranchMapper::processHistoryID | ( | ) | const [inline] |
Definition at line 48 of file BranchMapper.h.
References processHistoryID_.
{return processHistoryID_;}
void edm::BranchMapper::readProvenance | ( | ) | const [private] |
Definition at line 27 of file BranchMapper.cc.
References delayedRead_, and readProvenance_().
Referenced by branchIDToProvenance().
{ if (delayedRead_) { delayedRead_ = false; readProvenance_(); } }
virtual void edm::BranchMapper::readProvenance_ | ( | ) | const [inline, private, virtual] |
Reimplemented in edm::BranchMapperWithReader.
Definition at line 56 of file BranchMapper.h.
Referenced by readProvenance().
{}
void edm::BranchMapper::setDelayedRead | ( | bool | value | ) | [inline] |
Definition at line 42 of file BranchMapper.h.
References delayedRead_, and relativeConstraints::value.
{delayedRead_ = value;}
void edm::BranchMapper::write | ( | std::ostream & | os | ) | const |
Referenced by edm::operator<<().
bool edm::BranchMapper::delayedRead_ [mutable, private] |
Definition at line 64 of file BranchMapper.h.
Referenced by readProvenance(), and setDelayedRead().
eiSet edm::BranchMapper::entryInfoSet_ [private] |
Definition at line 60 of file BranchMapper.h.
Referenced by branchIDToProvenance(), and insert().
boost::shared_ptr<BranchMapper> edm::BranchMapper::nextMapper_ [private] |
Definition at line 62 of file BranchMapper.h.
Referenced by branchIDToProvenance(), and mergeMappers().
Definition at line 66 of file BranchMapper.h.
Referenced by processHistoryID().