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 
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 
33  public:
35  typedef Principal Base;
36  LuminosityBlockPrincipal(std::shared_ptr<ProductRegistry const> reg,
37  ProcessConfiguration const& pc,
38  HistoryAppender* historyAppender,
39  unsigned int index,
40  bool isForPrimaryProcess = true);
41 
43 
44  void fillLuminosityBlockPrincipal(ProcessHistoryRegistry const& processHistoryRegistry,
45  DelayedReader* reader = nullptr);
46 
47  RunPrincipal const& runPrincipal() const { return *runPrincipal_; }
48 
50 
51  void setRunPrincipal(std::shared_ptr<RunPrincipal> rp) { runPrincipal_ = rp; }
52 
53  LuminosityBlockIndex index() const { return index_; }
54 
55  LuminosityBlockID id() const { return aux().id(); }
56 
57  Timestamp const& beginTime() const { return aux().beginTime(); }
58 
59  Timestamp const& endTime() const { return aux().endTime(); }
60 
61  void setEndTime(Timestamp const& time) { aux_.setEndTime(time); }
62 
64 
66  LuminosityBlockAuxiliary const& aux() const { return aux_; }
67 
68  RunNumber_t run() const { return aux().run(); }
69 
71 
72  void put(BranchDescription const& bd, std::unique_ptr<WrapperBase> edp) const;
73 
74  void put(ProductResolverIndex index, std::unique_ptr<WrapperBase> edp) const;
75 
76  private:
77  unsigned int transitionIndex_() const override;
78 
80 
82 
84  };
85 } // namespace edm
86 #endif
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:186
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