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 (ProductProvenanceRetriever const &provRetriever, unsigned int) const override
 

Private Attributes

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

Detailed Description

Definition at line 1752 of file RootFile.cc.

Constructor & Destructor Documentation

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

Definition at line 1765 of file RootFile.cc.

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

1768  :
1770  rootTree_(iRootTree),
1772  parentageIDLookup_(iParentageIDLookup),
1773  daqProvenanceHelper_(daqProvenanceHelper) {
1775  }
StoredProductProvenanceVector provVector_
Definition: RootFile.cc:1759
StoredProductProvenanceVector * pProvVector_
Definition: RootFile.cc:1760
TTree const * tree() const
Definition: RootTree.h:137
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:1762
BranchType branchType() const
Definition: RootTree.h:151
std::vector< ParentageID > const & parentageIDLookup_
Definition: RootFile.cc:1761
std::string const & BranchTypeToProductProvenanceBranchName(BranchType const &BranchType)
Definition: BranchType.cc:130

Member Function Documentation

void edm::ReducedProvenanceReader::readProvenance ( ProductProvenanceRetriever const &  provRetriever,
unsigned int  transitionIndex 
) const
overrideprivatevirtual

Implements edm::ProvenanceReaderBase.

Definition at line 1778 of file RootFile.cc.

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

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

Member Data Documentation

DaqProvenanceHelper const* edm::ReducedProvenanceReader::daqProvenanceHelper_
private

Definition at line 1762 of file RootFile.cc.

Referenced by readProvenance().

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

Definition at line 1761 of file RootFile.cc.

Referenced by readProvenance().

StoredProductProvenanceVector* edm::ReducedProvenanceReader::pProvVector_
private

Definition at line 1760 of file RootFile.cc.

Referenced by readProvenance().

TBranch* edm::ReducedProvenanceReader::provBranch_
private

Definition at line 1758 of file RootFile.cc.

Referenced by readProvenance(), and ReducedProvenanceReader().

StoredProductProvenanceVector edm::ReducedProvenanceReader::provVector_
private

Definition at line 1759 of file RootFile.cc.

Referenced by readProvenance().

RootTree* edm::ReducedProvenanceReader::rootTree_
private

Definition at line 1757 of file RootFile.cc.

Referenced by readProvenance(), and ReducedProvenanceReader().