test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  class UnscheduledHandler;
30 
31  class RunPrincipal : public Principal {
32  public:
34  typedef Principal Base;
35 
37  std::shared_ptr<RunAuxiliary> aux,
38  std::shared_ptr<ProductRegistry const> reg,
39  ProcessConfiguration const& pc,
40  HistoryAppender* historyAppender,
41  unsigned int iRunIndex);
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 setUnscheduledHandler(std::shared_ptr<UnscheduledHandler>) {}
90 
91  void put(
92  BranchDescription const& bd,
93  std::unique_ptr<WrapperBase> edp) const;
94 
95  void setComplete() {
96  complete_ = true;
97  }
98 
99  private:
100 
101  virtual bool isComplete_() const override {return complete_;}
102 
103  virtual bool unscheduledFill(std::string const&,
105  ModuleCallingContext const*) const override {return false;}
106 
107  virtual unsigned int transitionIndex_() const override;
108 
112 
113  bool complete_;
114  };
115 }
116 #endif
117 
edm::propagate_const< std::shared_ptr< RunAuxiliary > > aux_
Definition: RunPrincipal.h:109
RunPrincipal(std::shared_ptr< RunAuxiliary > aux, std::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, HistoryAppender *historyAppender, unsigned int iRunIndex)
Definition: RunPrincipal.cc:10
ProcessHistoryID const & reducedProcessHistoryID() const
Definition: RunPrincipal.h:65
virtual unsigned int transitionIndex_() const override
Definition: RunPrincipal.cc:40
virtual bool unscheduledFill(std::string const &, SharedResourcesAcquirer *sra, ModuleCallingContext const *) const override
Definition: RunPrincipal.h:103
void put(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp) const
Definition: RunPrincipal.cc:33
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:21
void setUnscheduledHandler(std::shared_ptr< UnscheduledHandler >)
Definition: RunPrincipal.h:89
void mergeAuxiliary(RunAuxiliary const &aux)
Definition: RunPrincipal.h:85
ProcessHistoryID m_reducedHistoryID
Definition: RunPrincipal.h:110
void setEndTime(Timestamp const &time)
Definition: RunPrincipal.h:81
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:185
RunIndex index() const
Definition: RunPrincipal.h:53
RunAuxiliary Auxiliary
Definition: RunPrincipal.h:33
virtual bool isComplete_() const override
Definition: RunPrincipal.h:101
unsigned int RunNumber_t
RunNumber_t run() const
Definition: RunAuxiliary.h:41