CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

edm::ReducedProvenanceReader Class Reference

Inheritance diagram for edm::ReducedProvenanceReader:
edm::ProvenanceReaderBase

List of all members.

Public Member Functions

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

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 1750 of file RootFile.cc.


Constructor & Destructor Documentation

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

Definition at line 1763 of file RootFile.cc.

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

                                                                                              :
      ProvenanceReaderBase(),
      rootTree_(iRootTree),
      pProvVector_(&provVector_),
      parentageIDLookup_(iParentageIDLookup),
      daqProvenanceHelper_(daqProvenanceHelper) {
    provBranch_ = rootTree_->tree()->GetBranch(BranchTypeToProductProvenanceBranchName(rootTree_->branchType()).c_str());
  }

  void
  ReducedProvenanceReader::readProvenance(BranchMapper const& mapper) const {

Member Function Documentation

void edm::ReducedProvenanceReader::readProvenance ( BranchMapper const &  mapper) const [private, virtual]

Implements edm::ProvenanceReaderBase.

Definition at line 1776 of file RootFile.cc.

                             {
      for(auto const& prov : provVector_) {
        BranchID bid(prov.branchID_);
        mapper.insertIntoSet(ProductProvenance(daqProvenanceHelper_->mapBranchID(BranchID(prov.branchID_)),
                                               daqProvenanceHelper_->mapParentageID(parentageIDLookup_[prov.parentageIDIndex_])));
      }
    } else {
      for(auto const& prov : provVector_) {
        if(prov.parentageIDIndex_ >= parentageIDLookup_.size()) {
          throw edm::Exception(errors::LogicError)
            << "ReducedProvenanceReader::ReadProvenance\n"
            << "The parentage ID index value " << prov.parentageIDIndex_ << " is out of bounds.  The maximum value is " << parentageIDLookup_.size()-1 << ".\n"
            << "This should never happen.\n"
            << "Please report this to the framework hypernews forum 'hn-cms-edmFramework@cern.ch'.\n";
        }
        mapper.insertIntoSet(ProductProvenance(BranchID(prov.branchID_), parentageIDLookup_[prov.parentageIDIndex_]));
      }
    }
  }

  class FullProvenanceReader : public ProvenanceReaderBase {
  public:

Member Data Documentation

Definition at line 1760 of file RootFile.cc.

Definition at line 1759 of file RootFile.cc.

Definition at line 1758 of file RootFile.cc.

Definition at line 1756 of file RootFile.cc.

Referenced by ReducedProvenanceReader().

Definition at line 1757 of file RootFile.cc.

Definition at line 1755 of file RootFile.cc.

Referenced by ReducedProvenanceReader().