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 
25 
26 namespace edm {
27 
28  class HistoryAppender;
29  class MergeableRunProductProcesses;
30  class MergeableRunProductMetadata;
31  class ModuleCallingContext;
32  class ProcessHistoryRegistry;
33 
34  class RunPrincipal : public Principal {
35  public:
37  typedef Principal Base;
38 
39  RunPrincipal(std::shared_ptr<RunAuxiliary> aux,
40  std::shared_ptr<ProductRegistry const> reg,
41  ProcessConfiguration const& pc,
42  HistoryAppender* historyAppender,
43  unsigned int iRunIndex,
44  bool isForPrimaryProcess = true,
45  MergeableRunProductProcesses const* mergeableRunProductProcesses = nullptr);
46  ~RunPrincipal() override;
47 
48  void fillRunPrincipal(ProcessHistoryRegistry const& processHistoryRegistry, DelayedReader* reader = nullptr);
49 
57  RunIndex index() const { return index_; }
58 
59  RunAuxiliary const& aux() const { return *aux_; }
60 
61  RunNumber_t run() const { return aux().run(); }
62 
64 
65  RunID const& id() const { return aux().id(); }
66 
67  Timestamp const& beginTime() const { return aux().beginTime(); }
68 
69  Timestamp const& endTime() const { return aux().endTime(); }
70 
71  void setEndTime(Timestamp const& time) { aux_->setEndTime(time); }
72 
73  void mergeAuxiliary(RunAuxiliary const& aux) { return aux_->mergeAuxiliary(aux); }
74 
75  void put(BranchDescription const& bd, std::unique_ptr<WrapperBase> edp) const;
76 
77  void put(ProductResolverIndex index, std::unique_ptr<WrapperBase> edp) const;
78 
80 
81  void preReadFile();
82 
83  private:
84  unsigned int transitionIndex_() const override;
85 
89 
90  // For the primary input RunPrincipals created by the EventProcessor,
91  // there should be one MergeableRunProductMetadata object created
92  // per concurrent run. In all other cases, this should just be null.
94  };
95 } // namespace edm
96 #endif
edm::RunPrincipal::id
RunID const & id() const
Definition: RunPrincipal.h:65
edm::RunPrincipal::mergeableRunProductMetadataPtr_
edm::propagate_const< std::unique_ptr< MergeableRunProductMetadata > > mergeableRunProductMetadataPtr_
Definition: RunPrincipal.h:93
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
ProcessHistoryID.h
edm::RunPrincipal::endTime
Timestamp const & endTime() const
Definition: RunPrincipal.h:69
edm::RunPrincipal::Base
Principal Base
Definition: RunPrincipal.h:37
edm::ProductResolverIndex
unsigned int ProductResolverIndex
Definition: ProductResolverIndex.h:8
edm::RunID
Definition: RunID.h:28
propagate_const.h
edm::RunPrincipal::mergeAuxiliary
void mergeAuxiliary(RunAuxiliary const &aux)
Definition: RunPrincipal.h:73
edm
HLT enums.
Definition: AlignableModifier.h:19
deep_tau::DeepTauBase::BasicDiscriminator
BasicDiscriminator
Definition: DeepTauBase.h:115
edm::Principal
Definition: Principal.h:57
edm::RunPrincipal::aux
RunAuxiliary const & aux() const
Definition: RunPrincipal.h:59
edm::RunPrincipal::put
void put(BranchDescription const &bd, std::unique_ptr< WrapperBase > edp) const
Definition: RunPrincipal.cc:36
edm::RunPrincipal::beginTime
Timestamp const & beginTime() const
Definition: RunPrincipal.h:67
edm::propagate_const
Definition: propagate_const.h:32
edm::RunPrincipal::aux_
edm::propagate_const< std::shared_ptr< RunAuxiliary > > aux_
Definition: RunPrincipal.h:86
edm::Principal::reader
DelayedReader * reader() const
Definition: Principal.h:187
edm::RunPrincipal::setEndTime
void setEndTime(Timestamp const &time)
Definition: RunPrincipal.h:71
edm::MergeableRunProductMetadata
Definition: MergeableRunProductMetadata.h:52
edm::Hash< ProcessHistoryType >
edm::RunPrincipal::m_reducedHistoryID
ProcessHistoryID m_reducedHistoryID
Definition: RunPrincipal.h:87
RunIndex.h
edm::RunPrincipal::index
RunIndex index() const
Definition: RunPrincipal.h:57
edm::RunPrincipal::transitionIndex_
unsigned int transitionIndex_() const override
Definition: RunPrincipal.cc:45
Principal.h
edm::RunPrincipal::Auxiliary
RunAuxiliary Auxiliary
Definition: RunPrincipal.h:36
edm::RunPrincipal::run
RunNumber_t run() const
Definition: RunPrincipal.h:61
edm::RunAuxiliary::beginTime
Timestamp const & beginTime() const
Definition: RunAuxiliary.h:29
edm::RunAuxiliary::endTime
Timestamp const & endTime() const
Definition: RunAuxiliary.h:30
edm::RunPrincipal::reducedProcessHistoryID
ProcessHistoryID const & reducedProcessHistoryID() const
Definition: RunPrincipal.h:63
edm::HistoryAppender
Definition: HistoryAppender.h:13
edm::RunPrincipal::fillRunPrincipal
void fillRunPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=nullptr)
Definition: RunPrincipal.cc:26
edm::RunPrincipal::mergeableRunProductMetadata
MergeableRunProductMetadata * mergeableRunProductMetadata()
Definition: RunPrincipal.h:79
edm::RunPrincipal::RunPrincipal
RunPrincipal(std::shared_ptr< RunAuxiliary > aux, std::shared_ptr< ProductRegistry const > reg, ProcessConfiguration const &pc, HistoryAppender *historyAppender, unsigned int iRunIndex, bool isForPrimaryProcess=true, MergeableRunProductProcesses const *mergeableRunProductProcesses=nullptr)
Definition: RunPrincipal.cc:9
edm::RunAuxiliary::run
RunNumber_t run() const
Definition: RunAuxiliary.h:31
RunAuxiliary.h
edm::RunPrincipal::~RunPrincipal
~RunPrincipal() override
Definition: RunPrincipal.cc:24
edm::DelayedReader
Definition: DelayedReader.h:29
edm::RunIndex
Definition: RunIndex.h:32
edm::RunPrincipal::index_
RunIndex index_
Definition: RunPrincipal.h:88
edm::ProcessHistoryRegistry
Definition: ProcessHistoryRegistry.h:18
edm::RunAuxiliary::id
RunID const & id() const
Definition: RunAuxiliary.h:27
edm::BranchDescription
Definition: BranchDescription.h:32
edm::RunPrincipal
Definition: RunPrincipal.h:34
ntuplemaker.time
time
Definition: ntuplemaker.py:310
edm::ProcessConfiguration
Definition: ProcessConfiguration.h:14
edm::RunPrincipal::preReadFile
void preReadFile()
Definition: RunPrincipal.cc:47
edm::RunAuxiliary
Definition: RunAuxiliary.h:15
edm::MergeableRunProductProcesses
Definition: MergeableRunProductProcesses.h:11
edm::Timestamp
Definition: Timestamp.h:30