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 "boost/shared_ptr.hpp"
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  boost::shared_ptr<RunAuxiliary> aux,
38  boost::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(boost::shared_ptr<UnscheduledHandler>) {}
90 
91  void put(
92  BranchDescription const& bd,
93  WrapperOwningHolder const& edp);
94 
95  void readImmediate() const;
96 
97  void setComplete() {
98  complete_ = true;
99  }
100 
101  private:
102 
103  virtual bool isComplete_() const override {return complete_;}
104 
105  virtual bool unscheduledFill(std::string const&,
106  ModuleCallingContext const* mcc) const override {return false;}
107 
108  virtual unsigned int transitionIndex_() const override;
109 
110  void resolveProductImmediate(ProductHolderBase const& phb) const;
111 
112  boost::shared_ptr<RunAuxiliary> aux_;
115 
116  bool complete_;
117  };
118 }
119 #endif
120 
ProcessHistoryID const & reducedProcessHistoryID() const
Definition: RunPrincipal.h:65
virtual unsigned int transitionIndex_() const override
Definition: RunPrincipal.cc:79
Timestamp const & endTime() const
Definition: RunAuxiliary.h:40
void put(BranchDescription const &bd, WrapperOwningHolder const &edp)
Definition: RunPrincipal.cc:34
boost::shared_ptr< RunAuxiliary > aux_
Definition: RunPrincipal.h:112
RunNumber_t run() const
Definition: RunPrincipal.h:61
void fillRunPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=0)
Definition: RunPrincipal.cc:22
void readImmediate() const
Definition: RunPrincipal.cc:52
void mergeAuxiliary(RunAuxiliary const &aux)
Definition: RunPrincipal.h:85
ProcessHistoryID m_reducedHistoryID
Definition: RunPrincipal.h:113
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
void resolveProductImmediate(ProductHolderBase const &phb) const
Definition: RunPrincipal.cc:64
Timestamp const & endTime() const
Definition: RunPrincipal.h:77
RunAuxiliary const & aux() const
Definition: RunPrincipal.h:57
void setUnscheduledHandler(boost::shared_ptr< UnscheduledHandler >)
Definition: RunPrincipal.h:89
RunPrincipal(boost::shared_ptr< RunAuxiliary > aux, boost::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, HistoryAppender *historyAppender, unsigned int iRunIndex)
Definition: RunPrincipal.cc:11
RunID const & id() const
Definition: RunPrincipal.h:69
DelayedReader * reader() const
Definition: Principal.h:173
virtual bool unscheduledFill(std::string const &, ModuleCallingContext const *mcc) const override
Definition: RunPrincipal.h:105
RunIndex index() const
Definition: RunPrincipal.h:53
RunAuxiliary Auxiliary
Definition: RunPrincipal.h:33
virtual bool isComplete_() const override
Definition: RunPrincipal.h:103
unsigned int RunNumber_t
Definition: EventRange.h:32
RunNumber_t run() const
Definition: RunAuxiliary.h:41