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 RunPrincipal;
30 
32  public:
34  typedef Principal Base;
35 
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 
45 
46  RunPrincipal const& runPrincipal() const { return *runPrincipal_; }
47 
49 
50  void setRunPrincipal(std::shared_ptr<RunPrincipal> rp) { runPrincipal_ = rp; }
51 
52  LuminosityBlockIndex index() const { return index_; }
53 
54  LuminosityBlockID id() const { return aux().id(); }
55 
56  Timestamp const& beginTime() const { return aux().beginTime(); }
57 
58  Timestamp const& endTime() const { return aux().endTime(); }
59 
61 
63 
65  LuminosityBlockAuxiliary const& aux() const { return aux_; }
66 
67  RunNumber_t run() const { return aux().run(); }
68 
70 
71  void put(BranchDescription const& bd, std::unique_ptr<WrapperBase> edp) const;
72 
73  void put(ProductResolverIndex index, std::unique_ptr<WrapperBase> edp) const;
74 
78 
79  private:
80  unsigned int transitionIndex_() const override;
81 
83 
85 
87 
89  };
90 } // namespace edm
91 #endif
LuminosityBlockNumber_t luminosityBlock() const
LuminosityBlockPrincipal(std::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, HistoryAppender *historyAppender, unsigned int index, bool isForPrimaryProcess=true)
void setShouldWriteLumi(ShouldWriteLumi value)
LuminosityBlockID const & id() const
unsigned int ProductResolverIndex
void fillLuminosityBlockPrincipal(ProcessHistory const *processHistory, DelayedReader *reader=nullptr)
void put(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp) const
RunPrincipal const & runPrincipal() const
void setEndTime(Timestamp const &time)
unsigned int LuminosityBlockNumber_t
Timestamp const & endTime() const
void setEndTime(Timestamp const &time)
unsigned int transitionIndex_() const override
LuminosityBlockNumber_t luminosityBlock() const
void mergeAuxiliary(LuminosityBlockAuxiliary const &newAux)
LuminosityBlockAuxiliary Auxiliary
Definition: value.py:1
Timestamp const & beginTime() const
Timestamp const & endTime() const
ProcessHistory const & processHistory() const
Definition: Principal.h:140
void setRunPrincipal(std::shared_ptr< RunPrincipal > rp)
ShouldWriteLumi shouldWriteLumi() const
edm::propagate_const< std::shared_ptr< RunPrincipal > > runPrincipal_
void mergeAuxiliary(LuminosityBlockAuxiliary const &aux)
HLT enums.
LuminosityBlockIndex index() const
unsigned int RunNumber_t
LuminosityBlockAuxiliary const & aux() const
Timestamp const & beginTime() const
void setAux(LuminosityBlockAuxiliary iAux)
def move(src, dest)
Definition: eostools.py:511
DelayedReader * reader() const
Definition: Principal.h:187