CMS 3D CMS Logo

OutputModuleBase.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_global_OutputModuleBase_h
2 #define FWCore_Framework_global_OutputModuleBase_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Framework
6 // Class : OutputModuleBase
7 //
16 //
17 //
18 
19 // system include files
20 
21 // user include files
23 
24 // forward declarations
25 namespace edm {
26 
27  namespace global {
28 
30  public:
31  template <typename U>
33  template <typename T>
34  friend class ::edm::WorkerT;
35  template <typename T>
36  friend class ::edm::OutputModuleCommunicatorT;
38 
39  explicit OutputModuleBase(ParameterSet const& pset);
40 
41  OutputModuleBase(OutputModuleBase const&) = delete; // Disallow copying and moving
42  OutputModuleBase& operator=(OutputModuleBase const&) = delete; // Disallow copying and moving
43 
44  //Output modules always need writeRun and writeLumi to be called
45  bool wantsGlobalRuns() const noexcept { return true; }
46  bool wantsGlobalLuminosityBlocks() const noexcept { return true; }
47 
48  virtual bool wantsProcessBlocks() const noexcept = 0;
49  virtual bool wantsInputProcessBlocks() const noexcept = 0;
50  virtual bool wantsStreamRuns() const noexcept = 0;
51  virtual bool wantsStreamLuminosityBlocks() const noexcept = 0;
52 
53  protected:
55 
56  void doBeginJob();
57 
59  void doEndStream(StreamID id) { doEndStream_(id); }
60 
62  void doAcquire(EventTransitionInfo const&,
64  ModuleCallingContext const*,
66  //For now this is a placeholder
68  ModuleCallingContext const& iModuleCallingContext,
69  Principal const& iPrincipal) const noexcept {}
70 
71  private:
72  std::string workerType() const { return "WorkerT<edm::global::OutputModuleBase>"; }
73 
74  virtual void preallocStreams(unsigned int) {}
75  virtual void preallocate(PreallocationConfiguration const&) {}
76  virtual void doBeginStream_(StreamID) {}
77  virtual void doEndStream_(StreamID) {}
78  virtual void doStreamBeginRun_(StreamID, RunForOutput const&, EventSetup const&) {}
79  virtual void doStreamEndRun_(StreamID, RunForOutput const&, EventSetup const&) {}
80  virtual void doStreamEndRunSummary_(StreamID, RunForOutput const&, EventSetup const&) {}
84 
85  virtual void doBeginRunSummary_(RunForOutput const&, EventSetup const&) {}
86  virtual void doEndRunSummary_(RunForOutput const&, EventSetup const&) {}
90 
91  virtual bool hasAcquire() const noexcept { return false; }
92  };
93  } // namespace global
94 } // namespace edm
95 #endif
virtual void doEndRunSummary_(RunForOutput const &, EventSetup const &)
virtual void preallocate(PreallocationConfiguration const &)
bool wantsGlobalRuns() const noexcept
void preActionBeforeRunEventAsync(WaitingTaskHolder iTask, ModuleCallingContext const &iModuleCallingContext, Principal const &iPrincipal) const noexcept
virtual void doStreamEndRun_(StreamID, RunForOutput const &, EventSetup const &)
virtual void preallocStreams(unsigned int)
std::string workerType() const
OutputModuleBase(ParameterSet const &pset)
virtual bool wantsProcessBlocks() const noexcept=0
virtual void doEndLuminosityBlockSummary_(LuminosityBlockForOutput const &, EventSetup const &)
virtual void doBeginStream_(StreamID)
virtual void doStreamBeginRun_(StreamID, RunForOutput const &, EventSetup const &)
virtual bool wantsStreamRuns() const noexcept=0
OutputModuleBase & operator=(OutputModuleBase const &)=delete
virtual void doEndStream_(StreamID)
bool doEvent(EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
void doPreallocate(PreallocationConfiguration const &)
virtual bool wantsStreamLuminosityBlocks() const noexcept=0
virtual bool hasAcquire() const noexcept
bool wantsGlobalLuminosityBlocks() const noexcept
virtual void doStreamEndLuminosityBlock_(StreamID, LuminosityBlockForOutput const &, EventSetup const &)
virtual void doStreamEndLuminosityBlockSummary_(StreamID, LuminosityBlockForOutput const &, EventSetup const &)
virtual bool wantsInputProcessBlocks() const noexcept=0
HLT enums.
virtual void doStreamEndRunSummary_(StreamID, RunForOutput const &, EventSetup const &)
virtual void doAcquire_(StreamID, EventForOutput const &, WaitingTaskWithArenaHolder &)
virtual void doBeginRunSummary_(RunForOutput const &, EventSetup const &)
virtual void doBeginLuminosityBlockSummary_(LuminosityBlockForOutput const &, EventSetup const &)
virtual void doStreamBeginLuminosityBlock_(StreamID, LuminosityBlockForOutput const &, EventSetup const &)
void doAcquire(EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *, WaitingTaskWithArenaHolder &)