CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LuminosityBlockPrincipal.cc
Go to the documentation of this file.
2 
8 
9 namespace edm {
10 
12  boost::shared_ptr<LuminosityBlockAuxiliary> aux,
13  boost::shared_ptr<ProductRegistry const> reg,
14  ProcessConfiguration const& pc,
15  boost::shared_ptr<RunPrincipal> rp,
16  HistoryAppender* historyAppender) :
17  Base(reg, pc, InLumi, historyAppender),
18  runPrincipal_(rp),
19  aux_(aux) {
20  }
21 
22  void
25 
26  fillPrincipal(aux_->processHistoryID(), reader);
27 
28  for(const_iterator i = this->begin(), iEnd = this->end(); i != iEnd; ++i) {
29  (*i)->setProcessHistoryID(processHistoryID());
30  }
31  }
32 
33  void
35  ConstBranchDescription const& bd,
36  WrapperOwningHolder const& edp) {
37 
38  assert(bd.produced());
39  if(!edp.isValid()) {
40  throw edm::Exception(edm::errors::InsertFailure,"Null Pointer")
41  << "put: Cannot put because auto_ptr to product is null."
42  << "\n";
43  }
45  assert(g);
46  // Group assumes ownership
47  putOrMerge(edp, g);
48  }
49 
50  void
52  for(Principal::const_iterator i = begin(), iEnd = end(); i != iEnd; ++i) {
53  Group const& g = **i;
54  if(!g.branchDescription().produced()) {
55  if(!g.productUnavailable()) {
57  }
58  }
59  }
60  }
61 
62  void
64  if(g.branchDescription().produced()) return; // nothing to do.
65  if(!reader()) return; // nothing to do.
66 
67  // must attempt to load from persistent store
68  BranchKey const bk = BranchKey(g.branchDescription());
70 
71  // Now fix up the Group
72  if(edp.isValid()) {
73  putOrMerge(edp, &g);
74  }
75  }
76 }
int i
Definition: DBlmapReader.cc:9
WrapperInterfaceBase const * getInterface() const
Definition: ProductData.h:25
virtual ProductData const & productData() const =0
const_iterator end() const
Definition: Principal.h:141
Group * getExistingGroup(BranchID const &branchID)
Definition: Principal.cc:267
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
ProcessHistoryID const & processHistoryID() const
Definition: Principal.h:126
BranchID const & branchID() const
T const * getProduct(RefCore const &ref)
Definition: RefCoreGet.h:33
boost::shared_ptr< LuminosityBlockAuxiliary > aux_
DelayedReader * reader() const
Definition: Principal.h:149
const_iterator begin() const
Definition: Principal.h:140
boost::filter_iterator< FilledGroupPtr, GroupCollection::const_iterator > const_iterator
Definition: Principal.h:55
bool isValid() const
Definition: WrapperHolder.h:27
void fillPrincipal(ProcessHistoryID const &hist, DelayedReader *reader)
Definition: Principal.cc:229
void put(ConstBranchDescription const &bd, WrapperOwningHolder const &edp)
bool productUnavailable() const
Definition: Group.h:43
void fillLuminosityBlockPrincipal(DelayedReader *reader=0)
void resolveProductImmediate(Group const &g) const
ConstBranchDescription const & branchDescription() const
Definition: Group.h:69
void putOrMerge(WrapperOwningHolder const &prod, Group const *group) const
Definition: Principal.cc:759
LuminosityBlockPrincipal(boost::shared_ptr< LuminosityBlockAuxiliary > aux, boost::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, boost::shared_ptr< RunPrincipal > rp, HistoryAppender *historyAppender=0)