#include <BranchMapper.h>
Public Member Functions | |
ProductProvenance const * | 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 & | processHistoryID () |
ProcessHistoryID const & | processHistoryID () const |
void | reset () |
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 |
virtual void | reset_ () |
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 54 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.
{}
ProductProvenance const * edm::BranchMapper::branchIDToProvenance | ( | BranchID const & | bid | ) | const |
Definition at line 51 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 0; } } return &*it; }
void edm::BranchMapper::insert | ( | ProductProvenance const & | provenanceProduct | ) |
Definition at line 42 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, and edm::ReducedProvenanceBranchMapperWithReader.
Definition at line 66 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, and edm::ReducedProvenanceBranchMapperWithReader.
Definition at line 57 of file BranchMapper.h.
Referenced by readProvenance().
{}
void edm::BranchMapper::reset | ( | void | ) |
Definition at line 35 of file BranchMapper.cc.
References entryInfoSet_, processHistoryID_, and reset_().
{ entryInfoSet_.clear(); processHistoryID_=ProcessHistoryID(); reset_(); }
virtual void edm::BranchMapper::reset_ | ( | ) | [inline, private, virtual] |
Reimplemented in edm::BranchMapperWithReader, and edm::ReducedProvenanceBranchMapperWithReader.
Definition at line 58 of file BranchMapper.h.
Referenced by reset().
{}
void edm::BranchMapper::setDelayedRead | ( | bool | value | ) | [inline] |
Definition at line 42 of file BranchMapper.h.
References delayedRead_, and relativeConstraints::value.
Referenced by edm::ReducedProvenanceBranchMapperWithReader::oldProductIDToBranchID_().
{delayedRead_ = value;}
void edm::BranchMapper::write | ( | std::ostream & | os | ) | const |
Referenced by edm::operator<<().
bool edm::BranchMapper::delayedRead_ [mutable, private] |
Definition at line 66 of file BranchMapper.h.
Referenced by readProvenance(), and setDelayedRead().
eiSet edm::BranchMapper::entryInfoSet_ [private] |
Definition at line 62 of file BranchMapper.h.
Referenced by branchIDToProvenance(), insert(), and reset().
boost::shared_ptr<BranchMapper> edm::BranchMapper::nextMapper_ [private] |
Definition at line 64 of file BranchMapper.h.
Referenced by branchIDToProvenance(), and mergeMappers().
Definition at line 68 of file BranchMapper.h.
Referenced by processHistoryID(), and reset().