CMS 3D CMS Logo

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 
21 
22 #include <memory>
23 
24 #include <vector>
25 
26 namespace edm {
27 
28  class HistoryAppender;
29  class ModuleCallingContext;
30  class ProcessHistoryRegistry;
31  class RunPrincipal;
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  bool isForPrimaryProcess=true);
44 
46 
47  void fillLuminosityBlockPrincipal(ProcessHistoryRegistry const& processHistoryRegistry, DelayedReader* reader = nullptr);
48 
49  RunPrincipal const& runPrincipal() const {
50  return *runPrincipal_;
51  }
52 
54  return *runPrincipal_;
55  }
56 
57  void setRunPrincipal(std::shared_ptr<RunPrincipal> rp) {
58  runPrincipal_ = rp;
59  }
60 
62  return index_;
63  }
64 
66  return aux().id();
67  }
68 
69  Timestamp const& beginTime() const {
70  return aux().beginTime();
71  }
72 
73  Timestamp const& endTime() const {
74  return aux().endTime();
75  }
76 
77  void setEndTime(Timestamp const& time) {
78  aux_->setEndTime(time);
79  }
80 
82  return aux().luminosityBlock();
83  }
84 
85  LuminosityBlockAuxiliary const& aux() const {
86  return *aux_;
87  }
88 
89  RunNumber_t run() const {
90  return aux().run();
91  }
92 
94  return aux_->mergeAuxiliary(aux);
95  }
96 
97  void put(
98  BranchDescription const& bd,
99  std::unique_ptr<WrapperBase> edp) const;
100 
102  std::unique_ptr<WrapperBase> edp) const;
103 
104  void setComplete() {
105  complete_ = true;
106  }
107 
108  private:
109 
110  bool isComplete_() const override {return complete_;}
111 
112  unsigned int transitionIndex_() const override;
113 
115 
117 
119 
120  bool complete_;
121  };
122 }
123 #endif
124 
RunPrincipal const & runPrincipal() const
unsigned int ProductResolverIndex
Timestamp const & beginTime() const
void put(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp) const
unsigned int transitionIndex_() const override
Timestamp const & endTime() const
LuminosityBlockAuxiliary const & aux() const
LuminosityBlockIndex index() const
unsigned int LuminosityBlockNumber_t
void fillLuminosityBlockPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=0)
LuminosityBlockNumber_t luminosityBlock() const
void setEndTime(Timestamp const &time)
LuminosityBlockAuxiliary Auxiliary
Timestamp const & endTime() const
Timestamp const & beginTime() const
LuminosityBlockNumber_t luminosityBlock() const
edm::propagate_const< std::shared_ptr< LuminosityBlockAuxiliary > > aux_
DelayedReader * reader() const
Definition: Principal.h:184
void setRunPrincipal(std::shared_ptr< RunPrincipal > rp)
edm::propagate_const< std::shared_ptr< RunPrincipal > > runPrincipal_
void mergeAuxiliary(LuminosityBlockAuxiliary const &aux)
HLT enums.
unsigned int RunNumber_t
LuminosityBlockID const & id() const
LuminosityBlockPrincipal(std::shared_ptr< LuminosityBlockAuxiliary > aux, std::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, HistoryAppender *historyAppender, unsigned int index, bool isForPrimaryProcess=true)