CMS 3D CMS Logo

RunPrincipal.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_RunPrincipal_h
2 #define FWCore_Framework_RunPrincipal_h
3 
4 /*----------------------------------------------------------------------
5 
6 RunPrincipal: This is the class responsible for management of
7 per run EDProducts. It is not seen by reconstruction code;
8 such code sees the Run class, which is a proxy for RunPrincipal.
9 
10 The major internal component of the RunPrincipal
11 is the DataBlock.
12 
13 ----------------------------------------------------------------------*/
14 
15 #include <string>
16 #include <vector>
17 
18 #include <memory>
19 
24 
25 namespace edm {
26 
27  class HistoryAppender;
28  class ModuleCallingContext;
29 
30  class RunPrincipal : public Principal {
31  public:
33  typedef Principal Base;
34 
36  std::shared_ptr<RunAuxiliary> aux,
37  std::shared_ptr<ProductRegistry const> reg,
38  ProcessConfiguration const& pc,
39  HistoryAppender* historyAppender,
40  unsigned int iRunIndex,
41  bool isForPrimaryProcess=true);
42  ~RunPrincipal() override {}
43 
44  void fillRunPrincipal(ProcessHistoryRegistry const& processHistoryRegistry, DelayedReader* reader = nullptr);
45 
53  RunIndex index() const {
54  return index_;
55  }
56 
57  RunAuxiliary const& aux() const {
58  return *aux_;
59  }
60 
61  RunNumber_t run() const {
62  return aux().run();
63  }
64 
66  return m_reducedHistoryID;
67  }
68 
69  RunID const& id() const {
70  return aux().id();
71  }
72 
73  Timestamp const& beginTime() const {
74  return aux().beginTime();
75  }
76 
77  Timestamp const& endTime() const {
78  return aux().endTime();
79  }
80 
81  void setEndTime(Timestamp const& time) {
82  aux_->setEndTime(time);
83  }
84 
86  return aux_->mergeAuxiliary(aux);
87  }
88 
89  void put(
90  BranchDescription const& bd,
91  std::unique_ptr<WrapperBase> edp) const;
92 
94  std::unique_ptr<WrapperBase> edp) const;
95 
96  private:
97 
98  unsigned int transitionIndex_() const override;
99 
103  };
104 }
105 #endif
106 
edm::propagate_const< std::shared_ptr< RunAuxiliary > > aux_
Definition: RunPrincipal.h:100
unsigned int transitionIndex_() const override
Definition: RunPrincipal.cc:44
ProcessHistoryID const & reducedProcessHistoryID() const
Definition: RunPrincipal.h:65
unsigned int ProductResolverIndex
void put(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp) const
Definition: RunPrincipal.cc:30
Timestamp const & endTime() const
Definition: RunAuxiliary.h:40
RunNumber_t run() const
Definition: RunPrincipal.h:61
void fillRunPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=0)
Definition: RunPrincipal.cc:20
void mergeAuxiliary(RunAuxiliary const &aux)
Definition: RunPrincipal.h:85
ProcessHistoryID m_reducedHistoryID
Definition: RunPrincipal.h:101
void setEndTime(Timestamp const &time)
Definition: RunPrincipal.h:81
RunPrincipal(std::shared_ptr< RunAuxiliary > aux, std::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, HistoryAppender *historyAppender, unsigned int iRunIndex, bool isForPrimaryProcess=true)
Definition: RunPrincipal.cc:8
RunID const & id() const
Definition: RunAuxiliary.h:37
Timestamp const & beginTime() const
Definition: RunAuxiliary.h:39
Timestamp const & beginTime() const
Definition: RunPrincipal.h:73
Timestamp const & endTime() const
Definition: RunPrincipal.h:77
RunAuxiliary const & aux() const
Definition: RunPrincipal.h:57
RunID const & id() const
Definition: RunPrincipal.h:69
DelayedReader * reader() const
Definition: Principal.h:182
~RunPrincipal() override
Definition: RunPrincipal.h:42
RunIndex index() const
Definition: RunPrincipal.h:53
RunAuxiliary Auxiliary
Definition: RunPrincipal.h:32
HLT enums.
unsigned int RunNumber_t
RunNumber_t run() const
Definition: RunAuxiliary.h:41