test
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 
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  class UnscheduledHandler;
33 
35  public:
37  typedef Principal Base;
39  std::shared_ptr<LuminosityBlockAuxiliary> aux,
40  std::shared_ptr<ProductRegistry const> reg,
41  ProcessConfiguration const& pc,
42  HistoryAppender* historyAppender,
43  unsigned int index);
44 
46 
47  void fillLuminosityBlockPrincipal(ProcessHistoryRegistry const& processHistoryRegistry, DelayedReader* reader = 0);
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 setUnscheduledHandler(std::shared_ptr<UnscheduledHandler>) {}
98 
99  void put(
100  BranchDescription const& bd,
101  std::unique_ptr<WrapperBase> edp) const;
102 
103 
104  void setComplete() {
105  complete_ = true;
106  }
107 
108  private:
109 
110  virtual bool isComplete_() const override {return complete_;}
111 
112  virtual bool unscheduledFill(std::string const&,
114  ModuleCallingContext const*) const override {return false;}
115 
116  virtual unsigned int transitionIndex_() const override;
117 
119 
121 
123 
124  bool complete_;
125  };
126 }
127 #endif
128 
RunPrincipal const & runPrincipal() const
Timestamp const & beginTime() const
void put(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp) const
Timestamp const & endTime() const
virtual bool isComplete_() const override
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)
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
edm::propagate_const< std::shared_ptr< LuminosityBlockAuxiliary > > aux_
DelayedReader * reader() const
Definition: Principal.h:185
void setRunPrincipal(std::shared_ptr< RunPrincipal > rp)
virtual bool unscheduledFill(std::string const &, SharedResourcesAcquirer *sra, ModuleCallingContext const *) const override
edm::propagate_const< std::shared_ptr< RunPrincipal > > runPrincipal_
void mergeAuxiliary(LuminosityBlockAuxiliary const &aux)
unsigned int RunNumber_t
LuminosityBlockID const & id() const
void setUnscheduledHandler(std::shared_ptr< UnscheduledHandler >)