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 <memory>
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  std::shared_ptr<LuminosityBlockAuxiliary> aux,
39  std::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(std::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(std::shared_ptr<UnscheduledHandler>) {}
97 
98  void put(
99  BranchDescription const& bd,
100  std::unique_ptr<WrapperBase> edp);
101 
102 
103  void readImmediate() const;
104 
105  void setComplete() {
106  complete_ = true;
107  }
108 
109  private:
110 
111  virtual bool isComplete_() const override {return complete_;}
112 
113  virtual bool unscheduledFill(std::string const&,
114  ModuleCallingContext const*) const override {return false;}
115 
116  virtual unsigned int transitionIndex_() const override;
117 
118  void resolveProductImmediate(ProductHolderBase const& phb) const;
119 
120  std::shared_ptr<RunPrincipal> runPrincipal_;
121 
122  std::shared_ptr<LuminosityBlockAuxiliary> aux_;
123 
125 
126  bool complete_;
127  };
128 }
129 #endif
130 
RunPrincipal const & runPrincipal() const
virtual bool unscheduledFill(std::string const &, ModuleCallingContext const *) const override
Timestamp const & beginTime() const
Timestamp const & endTime() const
virtual bool isComplete_() const override
LuminosityBlockAuxiliary const & aux() const
LuminosityBlockIndex index() const
unsigned int LuminosityBlockNumber_t
std::shared_ptr< LuminosityBlockAuxiliary > aux_
void fillLuminosityBlockPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=0)
LuminosityBlockNumber_t luminosityBlock() const
void put(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp)
std::shared_ptr< RunPrincipal > runPrincipal_
void setEndTime(Timestamp const &time)
virtual unsigned int transitionIndex_() const override
LuminosityBlockAuxiliary Auxiliary
Timestamp const & endTime() const
Timestamp const & beginTime() const
LuminosityBlockPrincipal(std::shared_ptr< LuminosityBlockAuxiliary > aux, std::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, HistoryAppender *historyAppender, unsigned int index)
LuminosityBlockNumber_t luminosityBlock() const
DelayedReader * reader() const
Definition: Principal.h:171
void setRunPrincipal(std::shared_ptr< RunPrincipal > rp)
void mergeAuxiliary(LuminosityBlockAuxiliary const &aux)
unsigned int RunNumber_t
void resolveProductImmediate(ProductHolderBase const &phb) const
LuminosityBlockID const & id() const
void setUnscheduledHandler(std::shared_ptr< UnscheduledHandler >)