CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RunPrincipal.cc
Go to the documentation of this file.
2 
9 
10 namespace edm {
12  boost::shared_ptr<RunAuxiliary> aux,
13  boost::shared_ptr<ProductRegistry const> reg,
14  ProcessConfiguration const& pc,
15  HistoryAppender* historyAppender) :
16  Base(reg, pc, InRun, historyAppender),
17  aux_(aux) {
18  }
19 
20  void
22 
23  fillPrincipal(aux_->processHistoryID(), reader);
24 
25  for (const_iterator i = this->begin(), iEnd = this->end(); i != iEnd; ++i) {
26  (*i)->setProcessHistoryID(processHistoryID());
27  }
28  }
29 
30  void
32  ConstBranchDescription const& bd,
33  WrapperOwningHolder const& edp) {
34 
35  assert(bd.produced());
36  if(!edp.isValid()) {
37  throw edm::Exception(edm::errors::InsertFailure,"Null Pointer")
38  << "put: Cannot put because auto_ptr to product is null."
39  << "\n";
40  }
42  assert(g);
43  // Group assumes ownership
44  putOrMerge(edp, g);
45  }
46 
47  void
49  for (Principal::const_iterator i = begin(), iEnd = end(); i != iEnd; ++i) {
50  Group const& g = **i;
51  if(!g.branchDescription().produced()) {
52  if(!g.productUnavailable()) {
54  }
55  }
56  }
57  }
58 
59  void
61  if(g.branchDescription().produced()) return; // nothing to do.
62  if(!reader()) return; // nothing to do.
63 
64  // must attempt to load from persistent store
65  BranchKey const bk = BranchKey(g.branchDescription());
67 
68  // Now fix up the Group
69  if(edp.isValid()) {
70  putOrMerge(edp, &g);
71  }
72  }
73 }
int i
Definition: DBlmapReader.cc:9
WrapperInterfaceBase const * getInterface() const
Definition: ProductData.h:25
virtual ProductData const & productData() const =0
void fillRunPrincipal(DelayedReader *reader=0)
Definition: RunPrincipal.cc:21
const_iterator end() const
Definition: Principal.h:141
Group * getExistingGroup(BranchID const &branchID)
Definition: Principal.cc:267
boost::shared_ptr< RunAuxiliary > aux_
Definition: RunPrincipal.h:85
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
void readImmediate() const
Definition: RunPrincipal.cc:48
void put(ConstBranchDescription const &bd, WrapperOwningHolder const &edp)
Definition: RunPrincipal.cc:31
ProcessHistoryID const & processHistoryID() const
Definition: Principal.h:126
BranchID const & branchID() const
T const * getProduct(RefCore const &ref)
Definition: RefCoreGet.h:33
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
bool productUnavailable() const
Definition: Group.h:43
RunPrincipal(boost::shared_ptr< RunAuxiliary > aux, boost::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, HistoryAppender *historyAppender=0)
Definition: RunPrincipal.cc:11
void resolveProductImmediate(Group const &g) const
Definition: RunPrincipal.cc:60
ConstBranchDescription const & branchDescription() const
Definition: Group.h:69
void putOrMerge(WrapperOwningHolder const &prod, Group const *group) const
Definition: Principal.cc:759