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  }
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, EventSetup const& es, ProcessingController&, StreamContext*);
89  Status doEndOfLoop(EventSetup const& es);
90  void prepareForNextLoop(eventsetup::EventSetupProvider* esp);
91  void doBeginRun(RunPrincipal&, EventSetup const&, ProcessContext*);
92  void doEndRun(RunPrincipal&, EventSetup const&, ProcessContext*);
93  void doBeginLuminosityBlock(LuminosityBlockPrincipal&, EventSetup const&, ProcessContext*);
94  void doEndLuminosityBlock(LuminosityBlockPrincipal&, EventSetup const&, ProcessContext*);
95 
96  //This interface is deprecated
97  virtual void beginOfJob(EventSetup const&);
98  virtual void beginOfJob();
99 
100  virtual void endOfJob();
101 
103  virtual void attachTo(ActivityRegistry&);
104 
105  void setActionTable(ExceptionToActionTable const* actionTable) { act_table_ = actionTable; }
106 
107  virtual std::set<eventsetup::EventSetupRecordKey> modifyingRecords() const;
108 
109  void copyInfo(ScheduleInfo const&);
110  void setModuleChanger(ModuleChanger*);
111 
112  protected:
114  ModuleChanger* moduleChanger();
116  ScheduleInfo const* scheduleInfo() const;
117  private:
118 
123  virtual void startingNewLoop(unsigned int ) = 0;
124 
127  virtual Status duringLoop(Event const&, EventSetup const&, ProcessingController&) = 0;
128 
133  virtual Status endOfLoop(EventSetup const&, unsigned int iCounter) = 0;
134 
136  virtual void beginRun(Run const&, EventSetup const&);
137 
139  virtual void endRun(Run const&, EventSetup const&);
140 
142  virtual void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&);
143 
145  virtual void endLuminosityBlock(LuminosityBlock const&, EventSetup const&);
146 
147 
148  unsigned int iCounter_;
150 
153 
156  };
157 }
158 
159 #endif
ModuleCallingContext moduleCallingContext_
Definition: EDLooperBase.h:155
unsigned int iCounter_
Definition: EDLooperBase.h:148
#define noexcept
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:105
ExceptionToActionTable const * act_table_
Definition: EDLooperBase.h:149
HLT enums.
edm::propagate_const< ModuleChanger * > moduleChanger_
Definition: EDLooperBase.h:152
Definition: Run.h:42