CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BranchMapper.cc
Go to the documentation of this file.
3 
4 /*
5  BranchMapper
6 
7 */
8 
9 namespace edm {
11  entryInfoSet_(),
12  nextMapper_(),
13  delayedRead_(false),
14  processHistoryID_()
15  { }
16 
17  BranchMapper::BranchMapper(bool delayedRead) :
18  entryInfoSet_(),
19  nextMapper_(),
20  delayedRead_(delayedRead),
21  processHistoryID_()
22  { }
23 
25 
26  void
28  if (delayedRead_) {
29  delayedRead_ = false;
31  }
32  }
33 
34  void
36  //NOTE:do not read provenance here because we only need the full
37  // provenance when someone tries to access it not when doing the insert
38  // doing the delay saves 20% of time when doing an analysis job
39  //readProvenance();
40  entryInfoSet_.insert(entryInfo);
41  }
42 
43  boost::shared_ptr<ProductProvenance>
46  ProductProvenance ei(bid);
47  eiSet::const_iterator it = entryInfoSet_.find(ei);
48  if (it == entryInfoSet_.end()) {
49  if (nextMapper_) {
50  return nextMapper_->branchIDToProvenance(bid);
51  } else {
52  return boost::shared_ptr<ProductProvenance>();
53  }
54  }
55  return boost::shared_ptr<ProductProvenance>(new ProductProvenance(*it));
56  }
57 
58  BranchID
61  << "Internal error: Illegal call of oldProductIDToBranchID_.\n"
62  << "Please report this error to the Framework group\n";
63  }
64 }
virtual BranchID oldProductIDToBranchID_(ProductID const &oldProductID) const
Definition: BranchMapper.cc:59
virtual void readProvenance_() const
Definition: BranchMapper.h:56
void insert(ProductProvenance const &provenanceProduct)
Definition: BranchMapper.cc:35
boost::shared_ptr< BranchMapper > nextMapper_
Definition: BranchMapper.h:62
virtual ~BranchMapper()
Definition: BranchMapper.cc:24
boost::shared_ptr< ProductProvenance > branchIDToProvenance(BranchID const &bid) const
Definition: BranchMapper.cc:44
void readProvenance() const
Definition: BranchMapper.cc:27