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 
57 
58 #include <set>
59 #include <memory>
60 
61 namespace edm {
62  namespace eventsetup {
63  class EventSetupRecordKey;
64  class EventSetupProvider;
65  }
66  class ActionTable;
67  class ScheduleInfo;
68  class ModuleChanger;
70  class ActivityRegistry;
71 
72  class EDLooperBase {
73  public:
75 
76  EDLooperBase();
77  virtual ~EDLooperBase();
78 
79  EDLooperBase(EDLooperBase const&) = delete; // Disallow copying and moving
80  EDLooperBase& operator=(EDLooperBase const&) = delete; // Disallow copying and moving
81 
82  void doStartingNewLoop();
84  Status doEndOfLoop(EventSetup const& es);
86  void doBeginRun(RunPrincipal&, EventSetup const&);
87  void doEndRun(RunPrincipal&, EventSetup const&);
90 
91  //This interface is deprecated
92  virtual void beginOfJob(EventSetup const&);
93  virtual void beginOfJob();
94 
95  virtual void endOfJob();
96 
98  virtual void attachTo(ActivityRegistry&);
99 
100  void setActionTable(ActionTable const* actionTable) { act_table_ = actionTable; }
101 
102  virtual std::set<eventsetup::EventSetupRecordKey> modifyingRecords() const;
103 
104  void copyInfo(ScheduleInfo const&);
105  void setModuleChanger(ModuleChanger const*);
106 
107  protected:
109  ModuleChanger const* moduleChanger() const;
111  ScheduleInfo const* scheduleInfo() const;
112  private:
113 
118  virtual void startingNewLoop(unsigned int ) = 0;
119 
122  virtual Status duringLoop(Event const&, EventSetup const&, ProcessingController&) = 0;
123 
128  virtual Status endOfLoop(EventSetup const&, unsigned int iCounter) = 0;
129 
131  virtual void beginRun(Run const&, EventSetup const&);
132 
134  virtual void endRun(Run const&, EventSetup const&);
135 
137  virtual void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&);
138 
140  virtual void endLuminosityBlock(LuminosityBlock const&, EventSetup const&);
141 
142 
143  unsigned int iCounter_;
145 
146  std::auto_ptr<ScheduleInfo> scheduleInfo_;
148  };
149 }
150 
151 #endif
virtual Status endOfLoop(EventSetup const &, unsigned int iCounter)=0
std::auto_ptr< ScheduleInfo > scheduleInfo_
Definition: EDLooperBase.h:146
unsigned int iCounter_
Definition: EDLooperBase.h:143
void doBeginLuminosityBlock(LuminosityBlockPrincipal &, EventSetup const &)
Definition: EDLooperBase.cc:87
ActionTable const * act_table_
Definition: EDLooperBase.h:144
virtual Status duringLoop(Event const &, EventSetup const &, ProcessingController &)=0
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:57
ModuleChanger const * moduleChanger() const
This only returns a non-zero value during the call to endOfLoop.
void doEndLuminosityBlock(LuminosityBlockPrincipal &, EventSetup const &)
Definition: EDLooperBase.cc:92
virtual void endOfJob()
Definition: EDLooperBase.cc:74
EDLooperBase & operator=(EDLooperBase const &)=delete
ModuleChanger const * moduleChanger_
Definition: EDLooperBase.h:147
ScheduleInfo const * scheduleInfo() const
This returns a non-zero value after the constructor has been called.
void copyInfo(ScheduleInfo const &)
virtual void beginOfJob()
Definition: EDLooperBase.cc:72
void setModuleChanger(ModuleChanger const *)
virtual void endRun(Run const &, EventSetup const &)
Called after all event modules have processed the end of a Run.
Definition: EDLooperBase.cc:99
void prepareForNextLoop(eventsetup::EventSetupProvider *esp)
Definition: EDLooperBase.cc:62
virtual void beginRun(Run const &, EventSetup const &)
Called after all event modules have processed the begin of a Run.
Definition: EDLooperBase.cc:98
virtual void startingNewLoop(unsigned int)=0
void doBeginRun(RunPrincipal &, EventSetup const &)
Definition: EDLooperBase.cc:76
Status doDuringLoop(EventPrincipal &eventPrincipal, EventSetup const &es, ProcessingController &)
Definition: EDLooperBase.cc:35
virtual ~EDLooperBase()
Definition: EDLooperBase.cc:27
virtual void attachTo(ActivityRegistry &)
Override this method if you need to monitor the state of the processing.
void doStartingNewLoop()
Definition: EDLooperBase.cc:30
Definition: Run.h:36
void setActionTable(ActionTable const *actionTable)
Definition: EDLooperBase.h:100
void doEndRun(RunPrincipal &, EventSetup const &)
Definition: EDLooperBase.cc:82
virtual void endLuminosityBlock(LuminosityBlock const &, EventSetup const &)
Called after all event modules have processed the end of a LuminosityBlock.