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);
43 
44  void fillRunPrincipal(ProcessHistoryRegistry const& processHistoryRegistry, DelayedReader* reader = 0);
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 
93  void setComplete() {
94  complete_ = true;
95  }
96 
97  private:
98 
99  virtual bool isComplete_() const override {return complete_;}
100 
101  virtual unsigned int transitionIndex_() const override;
102 
106 
107  bool complete_;
108  };
109 }
110 #endif
111 
edm::propagate_const< std::shared_ptr< RunAuxiliary > > aux_
Definition: RunPrincipal.h:103
virtual unsigned int transitionIndex_() const override
Definition: RunPrincipal.cc:39
ProcessHistoryID const & reducedProcessHistoryID() const
Definition: RunPrincipal.h:65
void put(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp) const
Definition: RunPrincipal.cc:32
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:104
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:184
RunIndex index() const
Definition: RunPrincipal.h:53
RunAuxiliary Auxiliary
Definition: RunPrincipal.h:32
HLT enums.
virtual bool isComplete_() const override
Definition: RunPrincipal.h:99
unsigned int RunNumber_t
RunNumber_t run() const
Definition: RunAuxiliary.h:41