CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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:
80 
81  EDLooperBase();
82  virtual ~EDLooperBase();
83 
84  EDLooperBase(EDLooperBase const&) = delete; // Disallow copying and moving
85  EDLooperBase& operator=(EDLooperBase const&) = delete; // Disallow copying and moving
86 
87  void doStartingNewLoop();
89  Status doEndOfLoop(EventSetup const& es);
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&);
111 
112  protected:
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
virtual Status endOfLoop(EventSetup const &, unsigned int iCounter)=0
ModuleCallingContext moduleCallingContext_
Definition: EDLooperBase.h:155
unsigned int iCounter_
Definition: EDLooperBase.h:148
void doBeginLuminosityBlock(LuminosityBlockPrincipal &, EventSetup const &, ProcessContext *)
virtual Status duringLoop(Event const &, EventSetup const &, ProcessingController &)=0
void doEndRun(RunPrincipal &, EventSetup const &, ProcessContext *)
virtual std::set< eventsetup::EventSetupRecordKey > modifyingRecords() const
virtual void beginLuminosityBlock(LuminosityBlock const &, EventSetup const &)
Called after all event modules have processed the begin of a LuminosityBlock.
Status doEndOfLoop(EventSetup const &es)
Definition: EDLooperBase.cc:73
ModuleDescription moduleDescription_
Definition: EDLooperBase.h:154
Status doDuringLoop(EventPrincipal &eventPrincipal, EventSetup const &es, ProcessingController &, StreamContext *)
Definition: EDLooperBase.cc:43
virtual void endOfJob()
Definition: EDLooperBase.cc:90
EDLooperBase & operator=(EDLooperBase const &)=delete
ScheduleInfo const * scheduleInfo() const
This returns a non-zero value after the constructor has been called.
void setModuleChanger(ModuleChanger *)
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
void copyInfo(ScheduleInfo const &)
virtual void beginOfJob()
Definition: EDLooperBase.cc:88
virtual void endRun(Run const &, EventSetup const &)
Called after all event modules have processed the end of a Run.
void prepareForNextLoop(eventsetup::EventSetupProvider *esp)
Definition: EDLooperBase.cc:78
virtual void beginRun(Run const &, EventSetup const &)
Called after all event modules have processed the begin of a Run.
virtual void startingNewLoop(unsigned int)=0
virtual ~EDLooperBase()
Definition: EDLooperBase.cc:35
void doEndLuminosityBlock(LuminosityBlockPrincipal &, EventSetup const &, ProcessContext *)
ModuleChanger * moduleChanger()
This only returns a non-zero value during the call to endOfLoop.
edm::propagate_const< ModuleChanger * > moduleChanger_
Definition: EDLooperBase.h:152
void doBeginRun(RunPrincipal &, EventSetup const &, ProcessContext *)
Definition: EDLooperBase.cc:92
virtual void attachTo(ActivityRegistry &)
Override this method if you need to monitor the state of the processing.
void doStartingNewLoop()
Definition: EDLooperBase.cc:38
Definition: Run.h:43
virtual void endLuminosityBlock(LuminosityBlock const &, EventSetup const &)
Called after all event modules have processed the end of a LuminosityBlock.