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::BranchMapperWithReader Class Reference

#include <BranchMapperWithReader.h>

Inheritance diagram for edm::BranchMapperWithReader:
edm::BranchMapper

Public Member Functions

 BranchMapperWithReader ()
 
 BranchMapperWithReader (RootTree *rootTree)
 
void insertIntoMap (ProductID const &oldProductID, BranchID const &branchID)
 
virtual ~BranchMapperWithReader ()
 
- Public Member Functions inherited from edm::BranchMapper
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
 
ProcessHistoryIDprocessHistoryID ()
 
void setDelayedRead (bool value)
 
void write (std::ostream &os) const
 
virtual ~BranchMapper ()
 

Private Member Functions

virtual BranchID oldProductIDToBranchID_ (ProductID const &oldProductID) const
 
virtual void readProvenance_ () const
 

Private Attributes

ProductProvenanceVector infoVector_
 
std::map< unsigned int, BranchIDoldProductIDToBranchIDMap_
 
ProductProvenanceVectorpInfoVector_
 
RootTreerootTree_
 

Detailed Description

Definition at line 15 of file BranchMapperWithReader.h.

Constructor & Destructor Documentation

edm::BranchMapperWithReader::BranchMapperWithReader ( )

Definition at line 11 of file BranchMapperWithReader.cc.

11  :
12  BranchMapper(true),
13  rootTree_(0),
14  infoVector_(),
17  { }
ProductProvenanceVector * pInfoVector_
std::map< unsigned int, BranchID > oldProductIDToBranchIDMap_
ProductProvenanceVector infoVector_
edm::BranchMapperWithReader::BranchMapperWithReader ( RootTree rootTree)
explicit

Definition at line 19 of file BranchMapperWithReader.cc.

19  :
20  BranchMapper(true),
21  rootTree_(rootTree),
22  infoVector_(),
25  { }
ProductProvenanceVector * pInfoVector_
std::map< unsigned int, BranchID > oldProductIDToBranchIDMap_
ProductProvenanceVector infoVector_
virtual edm::BranchMapperWithReader::~BranchMapperWithReader ( )
inlinevirtual

Definition at line 20 of file BranchMapperWithReader.h.

20 {}

Member Function Documentation

void edm::BranchMapperWithReader::insertIntoMap ( ProductID const &  oldProductID,
BranchID const &  branchID 
)

Definition at line 40 of file BranchMapperWithReader.cc.

References edm::ProductID::oldID(), and oldProductIDToBranchIDMap_.

40  {
41  oldProductIDToBranchIDMap_.insert(std::make_pair(oldProductID.oldID(), branchID));
42  }
std::map< unsigned int, BranchID > oldProductIDToBranchIDMap_
BranchID edm::BranchMapperWithReader::oldProductIDToBranchID_ ( ProductID const &  oldProductID) const
privatevirtual

Reimplemented from edm::BranchMapper.

Definition at line 45 of file BranchMapperWithReader.cc.

References edm::ProductID::oldID(), and oldProductIDToBranchIDMap_.

45  {
46  std::map<unsigned int, BranchID>::const_iterator it = oldProductIDToBranchIDMap_.find(oldProductID.oldID());
47  if(it == oldProductIDToBranchIDMap_.end()) {
48  return BranchID();
49  }
50  return it->second;
51  }
std::map< unsigned int, BranchID > oldProductIDToBranchIDMap_
void edm::BranchMapperWithReader::readProvenance_ ( ) const
privatevirtual

Reimplemented from edm::BranchMapper.

Definition at line 28 of file BranchMapperWithReader.cc.

References edm::RootTree::branchEntryInfoBranch(), edm::RootTree::fillBranchEntryMeta(), infoVector_, edm::BranchMapper::insert(), pInfoVector_, rootTree_, and edm::setRefCoreStreamer().

28  {
29  setRefCoreStreamer(0, false, false);
31  setRefCoreStreamer(true);
32  BranchMapperWithReader* me = const_cast<BranchMapperWithReader*>(this);
33  for (ProductProvenanceVector::const_iterator it = infoVector_.begin(), itEnd = infoVector_.end();
34  it != itEnd; ++it) {
35  me->insert(*it);
36  }
37  }
TBranch *const branchEntryInfoBranch() const
Definition: RootTree.h:125
ProductProvenanceVector * pInfoVector_
void setRefCoreStreamer(bool resetAll=false)
void fillBranchEntryMeta(TBranch *branch, T *&pbuf)
Definition: RootTree.h:97
ProductProvenanceVector infoVector_

Member Data Documentation

ProductProvenanceVector edm::BranchMapperWithReader::infoVector_
private

Definition at line 28 of file BranchMapperWithReader.h.

Referenced by readProvenance_().

std::map<unsigned int, BranchID> edm::BranchMapperWithReader::oldProductIDToBranchIDMap_
private

Definition at line 30 of file BranchMapperWithReader.h.

Referenced by insertIntoMap(), and oldProductIDToBranchID_().

ProductProvenanceVector* edm::BranchMapperWithReader::pInfoVector_
mutableprivate

Definition at line 29 of file BranchMapperWithReader.h.

Referenced by readProvenance_().

RootTree* edm::BranchMapperWithReader::rootTree_
private

Definition at line 27 of file BranchMapperWithReader.h.

Referenced by readProvenance_().