CMS 3D CMS Logo

OutputModuleBase.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_limited_OutputModuleBase_h
2 #define FWCore_Framework_limited_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
24 
25 // forward declarations
26 namespace edm {
27 
28  namespace limited {
29 
31  public:
32  template <typename U>
34  template <typename T>
35  friend class ::edm::WorkerT;
36  template <typename T>
37  friend class ::edm::OutputModuleCommunicatorT;
39 
40  explicit OutputModuleBase(ParameterSet const& pset);
41 
42  OutputModuleBase(OutputModuleBase const&) = delete; // Disallow copying and moving
43  OutputModuleBase& operator=(OutputModuleBase const&) = delete; // Disallow copying and moving
44 
45  static void fillDescription(
47  std::vector<std::string> const& iDefaultOutputCommands = ProductSelectorRules::defaultSelectionStrings());
48 
49  //Output modules always need writeRun and writeLumi to be called
50  bool wantsGlobalRuns() const { return true; }
51  bool wantsGlobalLuminosityBlocks() const { return true; }
52  virtual bool wantsProcessBlocks() const = 0;
53  virtual bool wantsInputProcessBlocks() const = 0;
54  virtual bool wantsStreamRuns() const = 0;
55  virtual bool wantsStreamLuminosityBlocks() const = 0;
56 
57  unsigned int concurrencyLimit() const { return queue_.concurrencyLimit(); }
58 
59  LimitedTaskQueue& queue() { return queue_; }
60 
61  protected:
63 
64  void doBeginJob();
65 
66  void doBeginStream(StreamID id);
67  void doEndStream(StreamID id);
68 
70  //For now this is a placeholder
72  ModuleCallingContext const&,
73  Principal const&) const {}
74 
75  private:
77 
78  std::string workerType() const { return "WorkerT<edm::limited::OutputModuleBase>"; }
79 
81 
82  virtual void preallocStreams(unsigned int) {}
83  virtual void preallocate(PreallocationConfiguration const&) {}
84  virtual void doBeginStream_(StreamID) {}
85  virtual void doEndStream_(StreamID) {}
86  virtual void doStreamBeginRun_(StreamID, RunForOutput const&, EventSetup const&) {}
87  virtual void doStreamEndRun_(StreamID, RunForOutput const&, EventSetup const&) {}
88  virtual void doStreamEndRunSummary_(StreamID, RunForOutput const&, EventSetup const&) {}
92 
93  virtual void doBeginRunSummary_(RunForOutput const&, EventSetup const&) {}
94  virtual void doEndRunSummary_(RunForOutput const&, EventSetup const&) {}
97  bool hasAcquire() const { return false; }
98  };
99  } // namespace limited
100 } // namespace edm
101 #endif
virtual void doStreamBeginRun_(StreamID, RunForOutput const &, EventSetup const &)
virtual void doBeginRunSummary_(RunForOutput const &, EventSetup const &)
virtual void doEndRunSummary_(RunForOutput const &, EventSetup const &)
OutputModuleBase & operator=(OutputModuleBase const &)=delete
static const std::vector< std::string > & defaultSelectionStrings()
void doPreallocate(PreallocationConfiguration const &)
virtual bool wantsProcessBlocks() const =0
virtual void doEndStream_(StreamID)
OutputModuleBase(ParameterSet const &pset)
virtual void doBeginStream_(StreamID)
unsigned int concurrencyLimit() const
void doEndStream(StreamID id)
void doBeginStream(StreamID id)
virtual void preallocate(PreallocationConfiguration const &)
virtual bool wantsStreamRuns() const =0
void preActionBeforeRunEventAsync(WaitingTaskHolder, ModuleCallingContext const &, Principal const &) const
virtual void doBeginLuminosityBlockSummary_(LuminosityBlockForOutput const &, EventSetup const &)
virtual void doStreamEndRunSummary_(StreamID, RunForOutput const &, EventSetup const &)
virtual void doStreamEndLuminosityBlock_(StreamID, LuminosityBlockForOutput const &, EventSetup const &)
std::string workerType() const
virtual void preallocStreams(unsigned int)
virtual void doStreamEndLuminosityBlockSummary_(StreamID, LuminosityBlockForOutput const &, EventSetup const &)
unsigned int concurrencyLimit() const
virtual bool wantsStreamLuminosityBlocks() const =0
virtual void doStreamEndRun_(StreamID, RunForOutput const &, EventSetup const &)
virtual void doStreamBeginLuminosityBlock_(StreamID, LuminosityBlockForOutput const &, EventSetup const &)
HLT enums.
virtual void doEndLuminosityBlockSummary_(LuminosityBlockForOutput const &, EventSetup const &)
static void fillDescription(ParameterSetDescription &desc, std::vector< std::string > const &iDefaultOutputCommands=ProductSelectorRules::defaultSelectionStrings())
bool doEvent(EventTransitionInfo const &, ActivityRegistry *, ModuleCallingContext const *)
virtual bool wantsInputProcessBlocks() const =0
void registerProductsAndCallbacks(OutputModuleBase const *, ProductRegistry const *)