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<ProductRegistry const> reg,
39  ProcessConfiguration const& pc,
40  HistoryAppender* historyAppender,
41  unsigned int index,
42  bool isForPrimaryProcess=true);
43 
45 
46  void fillLuminosityBlockPrincipal(ProcessHistoryRegistry const& processHistoryRegistry, DelayedReader* reader = nullptr);
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 
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  private:
105 
106  unsigned int transitionIndex_() const override;
107 
109 
111 
113  };
114 }
115 #endif
116 
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
void setEndTime(Timestamp const &time)
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)
LuminosityBlockPrincipal(std::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, HistoryAppender *historyAppender, unsigned int index, bool isForPrimaryProcess=true)
void mergeAuxiliary(LuminosityBlockAuxiliary const &newAux)
LuminosityBlockAuxiliary Auxiliary
Timestamp const & endTime() const
Timestamp const & beginTime() const
LuminosityBlockNumber_t luminosityBlock() const
DelayedReader * reader() const
Definition: Principal.h:183
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
void setAux(LuminosityBlockAuxiliary iAux)
def move(src, dest)
Definition: eostools.py:511
LuminosityBlockID const & id() const