CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BranchMapperWithReader.cc
Go to the documentation of this file.
1 /*----------------------------------------------------------------------
2 
3 BranchMapperWithReader:
4 
5 ----------------------------------------------------------------------*/
8 #include "RootTree.h"
9 
10 namespace edm {
13  rootTree_(0),
14  useCache_(false),
15  infoVector_(),
16  pInfoVector_(&infoVector_),
17  oldProductIDToBranchIDMap_()
18  { }
19 
22  rootTree_(rootTree),
23  useCache_(useCache),
24  infoVector_(),
25  pInfoVector_(&infoVector_),
26  oldProductIDToBranchIDMap_()
27  { }
28 
29  void
31  setRefCoreStreamer(0, false, false);
32  if (useCache_) {
34  } else {
36  }
37  setRefCoreStreamer(true);
38  BranchMapperWithReader* me = const_cast<BranchMapperWithReader*>(this);
39  for (ProductProvenanceVector::const_iterator it = infoVector_.begin(), itEnd = infoVector_.end();
40  it != itEnd; ++it) {
41  me->insert(*it);
42  }
43  }
44 
45  void
46  BranchMapperWithReader::insertIntoMap(ProductID const& oldProductID, BranchID const& branchID) {
47  oldProductIDToBranchIDMap_.insert(std::make_pair(oldProductID.oldID(), branchID));
48  }
49 
50  BranchID
52  std::map<unsigned int, BranchID>::const_iterator it = oldProductIDToBranchIDMap_.find(oldProductID.oldID());
53  if (it == oldProductIDToBranchIDMap_.end()) {
54  return BranchID();
55  }
56  return it->second;
57  }
58 }
TBranch *const branchEntryInfoBranch() const
Definition: RootTree.h:80
ProductProvenanceVector * pInfoVector_
void setRefCoreStreamer(bool resetAll=false)
void insert(ProductProvenance const &provenanceProduct)
Definition: BranchMapper.cc:35
void fillBranchEntry(TBranch *branch, T *&pbuf)
Definition: RootTree.h:59
void fillBranchEntryNoCache(TBranch *branch, T *&pbuf)
Definition: RootTree.h:64
virtual BranchID oldProductIDToBranchID_(ProductID const &oldProductID) const
std::map< unsigned int, BranchID > oldProductIDToBranchIDMap_
virtual void readProvenance_() const
void insertIntoMap(ProductID const &oldProductID, BranchID const &branchID)
ProductProvenanceVector infoVector_
unsigned int oldID() const
Definition: ProductID.h:42