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  void doStartingNewLoop();
81  Status doEndOfLoop(EventSetup const& es);
83  void doBeginRun(RunPrincipal&, EventSetup const&);
84  void doEndRun(RunPrincipal&, EventSetup const&);
87 
88  //This interface is deprecated
89  virtual void beginOfJob(EventSetup const&);
90  virtual void beginOfJob();
91 
92  virtual void endOfJob();
93 
95  virtual void attachTo(ActivityRegistry&);
96 
97  void setActionTable(ActionTable const* actionTable) { act_table_ = actionTable; }
98 
99  virtual std::set<eventsetup::EventSetupRecordKey> modifyingRecords() const;
100 
101  void copyInfo(ScheduleInfo const&);
102  void setModuleChanger(ModuleChanger const*);
103 
104  protected:
106  ModuleChanger const* moduleChanger() const;
108  ScheduleInfo const* scheduleInfo() const;
109  private:
110 
111  EDLooperBase(EDLooperBase const&); // stop default
112  EDLooperBase const& operator=(EDLooperBase const&); // stop default
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
EDLooperBase const & operator=(EDLooperBase const &)
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
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:33
void setActionTable(ActionTable const *actionTable)
Definition: EDLooperBase.h:97
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.