CMS 3D CMS Logo

EDLooperBase.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_EDLooperBase_h
2 #define FWCore_Framework_EDLooperBase_h
3 // -*- C++ -*-
4 //
5 // Package: Framework
6 // Module: EDLooperBase
7 //
51 //
52 // Author: Chris Jones
53 // Created: Mon Aug 9 12:42:17 EDT 2010
54 //
55 
60 
61 #include <set>
62 #include <memory>
63 
64 namespace edm {
65  namespace eventsetup {
66  class EventSetupRecordKey;
67  class EventSetupProvider;
68  } // namespace eventsetup
69  class ExceptionToActionTable;
70  class ProcessContext;
71  class ScheduleInfo;
72  class StreamContext;
73  class ModuleChanger;
75  class ActivityRegistry;
76 
77  class EDLooperBase {
78  public:
79  enum Status { kContinue, kStop };
80 
81  EDLooperBase();
82  virtual ~EDLooperBase() noexcept(false);
83 
84  EDLooperBase(EDLooperBase const&) = delete; // Disallow copying and moving
85  EDLooperBase& operator=(EDLooperBase const&) = delete; // Disallow copying and moving
86 
87  void doStartingNewLoop();
88  Status doDuringLoop(EventPrincipal& eventPrincipal, EventSetupImpl const& es, ProcessingController&, StreamContext*);
89  Status doEndOfLoop(EventSetupImpl const& es);
90  void prepareForNextLoop(eventsetup::EventSetupProvider* esp);
91  void doBeginRun(RunPrincipal&, EventSetupImpl const&, ProcessContext*);
92  void doEndRun(RunPrincipal&, EventSetupImpl const&, ProcessContext*);
93  void doBeginLuminosityBlock(LuminosityBlockPrincipal&, EventSetupImpl const&, ProcessContext*);
94  void doEndLuminosityBlock(LuminosityBlockPrincipal&, EventSetupImpl const&, ProcessContext*);
95 
96  void beginOfJob(EventSetupImpl const&);
97  //This interface is deprecated
98  virtual void beginOfJob(EventSetup const&);
99  virtual void beginOfJob();
100 
101  virtual void endOfJob();
102 
104  virtual void attachTo(ActivityRegistry&);
105 
106  void setActionTable(ExceptionToActionTable const* actionTable) { act_table_ = actionTable; }
107 
108  virtual std::set<eventsetup::EventSetupRecordKey> modifyingRecords() const;
109 
110  void copyInfo(ScheduleInfo const&);
111  void setModuleChanger(ModuleChanger*);
112 
113  protected:
115  ModuleChanger* moduleChanger();
117  ScheduleInfo const* scheduleInfo() const;
118 
119  private:
124  virtual void startingNewLoop(unsigned int) = 0;
125 
128  virtual Status duringLoop(Event const&, EventSetup const&, ProcessingController&) = 0;
129 
134  virtual Status endOfLoop(EventSetup const&, unsigned int iCounter) = 0;
135 
137  virtual void beginRun(Run const&, EventSetup const&);
138 
140  virtual void endRun(Run const&, EventSetup const&);
141 
143  virtual void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&);
144 
146  virtual void endLuminosityBlock(LuminosityBlock const&, EventSetup const&);
147 
148  unsigned int iCounter_;
150 
153 
156  };
157 } // namespace edm
158 
159 #endif
ModuleCallingContext moduleCallingContext_
Definition: EDLooperBase.h:155
constexpr char const *const kStop
Definition: channel_names.h:34
unsigned int iCounter_
Definition: EDLooperBase.h:148
ModuleDescription moduleDescription_
Definition: EDLooperBase.h:154
edm::propagate_const< std::unique_ptr< ScheduleInfo > > scheduleInfo_
Definition: EDLooperBase.h:151
void setActionTable(ExceptionToActionTable const *actionTable)
Definition: EDLooperBase.h:106
ExceptionToActionTable const * act_table_
Definition: EDLooperBase.h:149
#define noexcept
HLT enums.
edm::propagate_const< ModuleChanger * > moduleChanger_
Definition: EDLooperBase.h:152
Definition: Run.h:45