CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::ReducedProvenanceReader Class Reference
Inheritance diagram for edm::ReducedProvenanceReader:
edm::ProvenanceReaderBase

Public Member Functions

 ReducedProvenanceReader (RootTree *iRootTree, std::vector< ParentageID > const &iParentageIDLookup, DaqProvenanceHelper const *daqProvenanceHelper)
 
- Public Member Functions inherited from edm::ProvenanceReaderBase
 ProvenanceReaderBase ()
 
virtual ~ProvenanceReaderBase ()
 

Private Member Functions

virtual void readProvenance (BranchMapper const &mapper) const
 

Private Attributes

DaqProvenanceHelper const * daqProvenanceHelper_
 
std::vector< ParentageID > const & parentageIDLookup_
 
StoredProductProvenanceVectorpProvVector_
 
TBranch * provBranch_
 
StoredProductProvenanceVector provVector_
 
RootTreerootTree_
 

Detailed Description

Definition at line 1747 of file RootFile.cc.

Constructor & Destructor Documentation

edm::ReducedProvenanceReader::ReducedProvenanceReader ( RootTree iRootTree,
std::vector< ParentageID > const &  iParentageIDLookup,
DaqProvenanceHelper const *  daqProvenanceHelper 
)

Definition at line 1760 of file RootFile.cc.

References edm::RootTree::branchType(), edm::BranchTypeToProductProvenanceBranchName(), provBranch_, rootTree_, and edm::RootTree::tree().

1763  :
1765  rootTree_(iRootTree),
1767  parentageIDLookup_(iParentageIDLookup),
1768  daqProvenanceHelper_(daqProvenanceHelper) {
1770  }
StoredProductProvenanceVector provVector_
Definition: RootFile.cc:1754
StoredProductProvenanceVector * pProvVector_
Definition: RootFile.cc:1755
TTree const * tree() const
Definition: RootTree.h:113
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:1757
BranchType branchType() const
Definition: RootTree.h:127
std::vector< ParentageID > const & parentageIDLookup_
Definition: RootFile.cc:1756
std::string const & BranchTypeToProductProvenanceBranchName(BranchType const &BranchType)
Definition: BranchType.cc:130

Member Function Documentation

void edm::ReducedProvenanceReader::readProvenance ( BranchMapper const &  mapper) const
privatevirtual

Implements edm::ProvenanceReaderBase.

Definition at line 1773 of file RootFile.cc.

References daqProvenanceHelper_, edm::hlt::Exception, edm::RootTree::fillBranchEntry(), edm::BranchMapper::insertIntoSet(), edm::errors::LogicError, edm::DaqProvenanceHelper::mapBranchID(), edm::DaqProvenanceHelper::mapParentageID(), parentageIDLookup_, pProvVector_, provBranch_, provVector_, rootTree_, and edm::setRefCoreStreamer().

1773  {
1774  ReducedProvenanceReader* me = const_cast<ReducedProvenanceReader*>(this);
1775  me->rootTree_->fillBranchEntry(me->provBranch_, me->pProvVector_);
1776  setRefCoreStreamer(true);
1777  if(daqProvenanceHelper_) {
1778  for(auto const& prov : provVector_) {
1779  BranchID bid(prov.branchID_);
1780  mapper.insertIntoSet(ProductProvenance(daqProvenanceHelper_->mapBranchID(BranchID(prov.branchID_)),
1781  daqProvenanceHelper_->mapParentageID(parentageIDLookup_[prov.parentageIDIndex_])));
1782  }
1783  } else {
1784  for(auto const& prov : provVector_) {
1785  if(prov.parentageIDIndex_ >= parentageIDLookup_.size()) {
1787  << "ReducedProvenanceReader::ReadProvenance\n"
1788  << "The parentage ID index value " << prov.parentageIDIndex_ << " is out of bounds. The maximum value is " << parentageIDLookup_.size()-1 << ".\n"
1789  << "This should never happen.\n"
1790  << "Please report this to the framework hypernews forum 'hn-cms-edmFramework@cern.ch'.\n";
1791  }
1792  mapper.insertIntoSet(ProductProvenance(BranchID(prov.branchID_), parentageIDLookup_[prov.parentageIDIndex_]));
1793  }
1794  }
1795  }
StoredProductProvenanceVector provVector_
Definition: RootFile.cc:1754
BranchID const & mapBranchID(BranchID const &branchID) const
void setRefCoreStreamer(bool resetAll=false)
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:1757
std::vector< ParentageID > const & parentageIDLookup_
Definition: RootFile.cc:1756
ReducedProvenanceReader(RootTree *iRootTree, std::vector< ParentageID > const &iParentageIDLookup, DaqProvenanceHelper const *daqProvenanceHelper)
Definition: RootFile.cc:1760
ParentageID const & mapParentageID(ParentageID const &phid) const

Member Data Documentation

DaqProvenanceHelper const* edm::ReducedProvenanceReader::daqProvenanceHelper_
private

Definition at line 1757 of file RootFile.cc.

Referenced by readProvenance().

std::vector<ParentageID> const& edm::ReducedProvenanceReader::parentageIDLookup_
private

Definition at line 1756 of file RootFile.cc.

Referenced by readProvenance().

StoredProductProvenanceVector* edm::ReducedProvenanceReader::pProvVector_
private

Definition at line 1755 of file RootFile.cc.

Referenced by readProvenance().

TBranch* edm::ReducedProvenanceReader::provBranch_
private

Definition at line 1753 of file RootFile.cc.

Referenced by readProvenance(), and ReducedProvenanceReader().

StoredProductProvenanceVector edm::ReducedProvenanceReader::provVector_
private

Definition at line 1754 of file RootFile.cc.

Referenced by readProvenance().

RootTree* edm::ReducedProvenanceReader::rootTree_
private

Definition at line 1752 of file RootFile.cc.

Referenced by readProvenance(), and ReducedProvenanceReader().