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 
59 
60 #include <set>
61 #include <memory>
62 
63 namespace edm {
64  namespace eventsetup {
65  class EventSetupRecordKey;
66  class EventSetupProvider;
67  }
68  class ExceptionToActionTable;
69  class ProcessContext;
70  class ScheduleInfo;
71  class StreamContext;
72  class ModuleChanger;
74  class ActivityRegistry;
75 
76  class EDLooperBase {
77  public:
79 
80  EDLooperBase();
81  virtual ~EDLooperBase();
82 
83  EDLooperBase(EDLooperBase const&) = delete; // Disallow copying and moving
84  EDLooperBase& operator=(EDLooperBase const&) = delete; // Disallow copying and moving
85 
86  void doStartingNewLoop();
88  Status doEndOfLoop(EventSetup const& es);
94 
95  //This interface is deprecated
96  virtual void beginOfJob(EventSetup const&);
97  virtual void beginOfJob();
98 
99  virtual void endOfJob();
100 
102  virtual void attachTo(ActivityRegistry&);
103 
104  void setActionTable(ExceptionToActionTable const* actionTable) { act_table_ = actionTable; }
105 
106  virtual std::set<eventsetup::EventSetupRecordKey> modifyingRecords() const;
107 
108  void copyInfo(ScheduleInfo const&);
109  void setModuleChanger(ModuleChanger const*);
110 
111  protected:
113  ModuleChanger const* moduleChanger() const;
115  ScheduleInfo const* scheduleInfo() const;
116  private:
117 
122  virtual void startingNewLoop(unsigned int ) = 0;
123 
126  virtual Status duringLoop(Event const&, EventSetup const&, ProcessingController&) = 0;
127 
132  virtual Status endOfLoop(EventSetup const&, unsigned int iCounter) = 0;
133 
135  virtual void beginRun(Run const&, EventSetup const&);
136 
138  virtual void endRun(Run const&, EventSetup const&);
139 
141  virtual void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&);
142 
144  virtual void endLuminosityBlock(LuminosityBlock const&, EventSetup const&);
145 
146 
147  unsigned int iCounter_;
149 
150  std::auto_ptr<ScheduleInfo> scheduleInfo_;
152 
155  };
156 }
157 
158 #endif
virtual Status endOfLoop(EventSetup const &, unsigned int iCounter)=0
ModuleCallingContext moduleCallingContext_
Definition: EDLooperBase.h:154
std::auto_ptr< ScheduleInfo > scheduleInfo_
Definition: EDLooperBase.h:150
unsigned int iCounter_
Definition: EDLooperBase.h:147
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:76
ModuleDescription moduleDescription_
Definition: EDLooperBase.h:153
Status doDuringLoop(EventPrincipal &eventPrincipal, EventSetup const &es, ProcessingController &, StreamContext *)
Definition: EDLooperBase.cc:46
ModuleChanger const * moduleChanger() const
This only returns a non-zero value during the call to endOfLoop.
virtual void endOfJob()
Definition: EDLooperBase.cc:93
EDLooperBase & operator=(EDLooperBase const &)=delete
ModuleChanger const * moduleChanger_
Definition: EDLooperBase.h:151
ScheduleInfo const * scheduleInfo() const
This returns a non-zero value after the constructor has been called.
void setActionTable(ExceptionToActionTable const *actionTable)
Definition: EDLooperBase.h:104
ExceptionToActionTable const * act_table_
Definition: EDLooperBase.h:148
void copyInfo(ScheduleInfo const &)
virtual void beginOfJob()
Definition: EDLooperBase.cc:91
void setModuleChanger(ModuleChanger const *)
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:81
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:38
void doEndLuminosityBlock(LuminosityBlockPrincipal &, EventSetup const &, ProcessContext *)
void doBeginRun(RunPrincipal &, EventSetup const &, ProcessContext *)
Definition: EDLooperBase.cc:95
virtual void attachTo(ActivityRegistry &)
Override this method if you need to monitor the state of the processing.
void doStartingNewLoop()
Definition: EDLooperBase.cc:41
Definition: Run.h:41
virtual void endLuminosityBlock(LuminosityBlock const &, EventSetup const &)
Called after all event modules have processed the end of a LuminosityBlock.