CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 { return true; }
46  bool wantsGlobalLuminosityBlocks() const { return true; }
47 
48  virtual bool wantsProcessBlocks() const = 0;
49  virtual bool wantsInputProcessBlocks() const = 0;
50  virtual bool wantsStreamRuns() const = 0;
51  virtual bool wantsStreamLuminosityBlocks() const = 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 {}
70 
71  private:
72  std::string workerType() const { return "WorkerT<edm::global::OutputModuleBase>"; }
73 
75 
76  virtual void preallocStreams(unsigned int) {}
77  virtual void preallocate(PreallocationConfiguration const&) {}
78  virtual void doBeginStream_(StreamID) {}
79  virtual void doEndStream_(StreamID) {}
80  virtual void doStreamBeginRun_(StreamID, RunForOutput const&, EventSetup const&) {}
81  virtual void doStreamEndRun_(StreamID, RunForOutput const&, EventSetup const&) {}
82  virtual void doStreamEndRunSummary_(StreamID, RunForOutput const&, EventSetup const&) {}
86 
87  virtual void doBeginRunSummary_(RunForOutput const&, EventSetup const&) {}
88  virtual void doEndRunSummary_(RunForOutput const&, EventSetup const&) {}
92 
93  virtual bool hasAcquire() const { return false; }
94  };
95  } // namespace global
96 } // namespace edm
97 #endif
virtual void doEndRunSummary_(RunForOutput const &, EventSetup const &)
virtual void preallocate(PreallocationConfiguration const &)
std::string workerType() const
virtual void doStreamEndRun_(StreamID, RunForOutput const &, EventSetup const &)
virtual void preallocStreams(unsigned int)
OutputModuleBase(ParameterSet const &pset)
virtual bool hasAcquire() const
virtual void doEndLuminosityBlockSummary_(LuminosityBlockForOutput const &, EventSetup const &)
virtual void doBeginStream_(StreamID)
virtual void doStreamBeginRun_(StreamID, RunForOutput const &, EventSetup const &)
void registerProductsAndCallbacks(OutputModuleBase const *, ProductRegistry const *)
OutputModuleBase & operator=(OutputModuleBase const &)=delete
virtual void doEndStream_(StreamID)
virtual bool wantsStreamLuminosityBlocks() const =0
bool doEvent(EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
void doPreallocate(PreallocationConfiguration const &)
bool wantsGlobalLuminosityBlocks() const
virtual bool wantsStreamRuns() const =0
virtual void doStreamEndLuminosityBlock_(StreamID, LuminosityBlockForOutput const &, EventSetup const &)
virtual void doStreamEndLuminosityBlockSummary_(StreamID, LuminosityBlockForOutput const &, EventSetup const &)
void preActionBeforeRunEventAsync(WaitingTaskHolder iTask, ModuleCallingContext const &iModuleCallingContext, Principal const &iPrincipal) const
virtual bool wantsProcessBlocks() const =0
virtual bool wantsInputProcessBlocks() const =0
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 &)