CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LuminosityBlockPrincipal.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_LuminosityBlockPrincipal_h
2 #define FWCore_Framework_LuminosityBlockPrincipal_h
3 
4 /*----------------------------------------------------------------------
5 
6 LuminosityBlockPrincipal: This is the class responsible for management of
7 per luminosity block EDProducts. It is not seen by reconstruction code;
8 such code sees the LuminosityBlock class, which is a proxy for LuminosityBlockPrincipal.
9 
10 The major internal component of the LuminosityBlockPrincipal
11 is the DataBlock.
12 
13 ----------------------------------------------------------------------*/
14 
15 
20 
21 #include "boost/shared_ptr.hpp"
22 
23 #include <vector>
24 
25 namespace edm {
26 
27  class HistoryAppender;
28  class ModuleCallingContext;
29  class ProcessHistoryRegistry;
30  class RunPrincipal;
31  class UnscheduledHandler;
32 
34  public:
36  typedef Principal Base;
38  boost::shared_ptr<LuminosityBlockAuxiliary> aux,
39  boost::shared_ptr<ProductRegistry const> reg,
40  ProcessConfiguration const& pc,
41  HistoryAppender* historyAppender,
42  unsigned int index);
43 
45 
46  void fillLuminosityBlockPrincipal(ProcessHistoryRegistry const& processHistoryRegistry, DelayedReader* reader = 0);
47 
48  RunPrincipal const& runPrincipal() const {
49  return *runPrincipal_;
50  }
51 
53  return *runPrincipal_;
54  }
55 
56  void setRunPrincipal(boost::shared_ptr<RunPrincipal> rp) {
57  runPrincipal_ = rp;
58  }
59 
61  return index_;
62  }
63 
65  return aux().id();
66  }
67 
68  Timestamp const& beginTime() const {
69  return aux().beginTime();
70  }
71 
72  Timestamp const& endTime() const {
73  return aux().endTime();
74  }
75 
76  void setEndTime(Timestamp const& time) {
77  aux_->setEndTime(time);
78  }
79 
81  return aux().luminosityBlock();
82  }
83 
84  LuminosityBlockAuxiliary const& aux() const {
85  return *aux_;
86  }
87 
88  RunNumber_t run() const {
89  return aux().run();
90  }
91 
93  return aux_->mergeAuxiliary(aux);
94  }
95 
96  void setUnscheduledHandler(boost::shared_ptr<UnscheduledHandler>) {}
97 
98  void put(
99  BranchDescription const& bd,
100  WrapperOwningHolder const& edp);
101 
102  void readImmediate() const;
103 
104  void setComplete() {
105  complete_ = true;
106  }
107 
108  private:
109 
110  virtual bool isComplete_() const override {return complete_;}
111 
112  virtual bool unscheduledFill(std::string const&,
113  ModuleCallingContext const* mcc) const override {return false;}
114 
115  virtual unsigned int transitionIndex_() const override;
116 
117  void resolveProductImmediate(ProductHolderBase const& phb) const;
118 
119  boost::shared_ptr<RunPrincipal> runPrincipal_;
120 
121  boost::shared_ptr<LuminosityBlockAuxiliary> aux_;
122 
124 
125  bool complete_;
126  };
127 }
128 #endif
129 
RunPrincipal const & runPrincipal() const
LuminosityBlockPrincipal(boost::shared_ptr< LuminosityBlockAuxiliary > aux, boost::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, HistoryAppender *historyAppender, unsigned int index)
boost::shared_ptr< RunPrincipal > runPrincipal_
Timestamp const & beginTime() const
Timestamp const & endTime() const
virtual bool isComplete_() const override
LuminosityBlockAuxiliary const & aux() const
LuminosityBlockIndex index() const
unsigned int LuminosityBlockNumber_t
Definition: EventID.h:31
void fillLuminosityBlockPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=0)
LuminosityBlockNumber_t luminosityBlock() const
void setEndTime(Timestamp const &time)
virtual unsigned int transitionIndex_() const override
virtual bool unscheduledFill(std::string const &, ModuleCallingContext const *mcc) const override
LuminosityBlockAuxiliary Auxiliary
Timestamp const & endTime() const
Timestamp const & beginTime() const
LuminosityBlockNumber_t luminosityBlock() const
boost::shared_ptr< LuminosityBlockAuxiliary > aux_
DelayedReader * reader() const
Definition: Principal.h:173
void setUnscheduledHandler(boost::shared_ptr< UnscheduledHandler >)
void mergeAuxiliary(LuminosityBlockAuxiliary const &aux)
void put(BranchDescription const &bd, WrapperOwningHolder const &edp)
unsigned int RunNumber_t
Definition: EventRange.h:32
void setRunPrincipal(boost::shared_ptr< RunPrincipal > rp)
void resolveProductImmediate(ProductHolderBase const &phb) const
LuminosityBlockID const & id() const