CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/FWCore/Framework/interface/EDLooperBase.h

Go to the documentation of this file.
00001 #ifndef FWCore_Framework_EDLooperBase_h
00002 #define FWCore_Framework_EDLooperBase_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Framework
00006 // Module:      EDLooperBase
00007 //
00051 //
00052 // Author:      Chris Jones
00053 // Created:     Mon Aug  9 12:42:17 EDT 2010
00054 //
00055 
00056 #include "FWCore/Framework/interface/Frameworkfwd.h"
00057 
00058 #include <set>
00059 #include <memory>
00060 
00061 namespace edm {
00062   namespace eventsetup {
00063     class EventSetupRecordKey;
00064     class EventSetupProvider;
00065   }
00066   class ActionTable;
00067   class ScheduleInfo;
00068   class ModuleChanger;
00069   class ProcessingController;
00070   class ActivityRegistry;
00071 
00072   class EDLooperBase {
00073     public:
00074       enum Status {kContinue, kStop};
00075 
00076       EDLooperBase();
00077       virtual ~EDLooperBase();
00078 
00079       void doStartingNewLoop();
00080       Status doDuringLoop(EventPrincipal& eventPrincipal, EventSetup const& es, ProcessingController&);
00081       Status doEndOfLoop(EventSetup const& es);
00082       void prepareForNextLoop(eventsetup::EventSetupProvider* esp);
00083       void doBeginRun(RunPrincipal&, EventSetup const&);
00084       void doEndRun(RunPrincipal&, EventSetup const&);
00085       void doBeginLuminosityBlock(LuminosityBlockPrincipal&, EventSetup const&);
00086       void doEndLuminosityBlock(LuminosityBlockPrincipal&, EventSetup const&);
00087 
00088       //This interface is deprecated
00089       virtual void beginOfJob(EventSetup const&);
00090       virtual void beginOfJob();
00091 
00092       virtual void endOfJob();
00093 
00095       virtual void attachTo(ActivityRegistry&);
00096 
00097       void setActionTable(ActionTable const* actionTable) { act_table_ = actionTable; }
00098 
00099       virtual std::set<eventsetup::EventSetupRecordKey> modifyingRecords() const;
00100 
00101       void copyInfo(ScheduleInfo const&);
00102       void setModuleChanger(ModuleChanger const*);
00103 
00104     protected:
00106       ModuleChanger const* moduleChanger() const;
00108       ScheduleInfo const* scheduleInfo() const;
00109     private:
00110 
00111       EDLooperBase(EDLooperBase const&); // stop default
00112       EDLooperBase const& operator=(EDLooperBase const&); // stop default
00113 
00118       virtual void startingNewLoop(unsigned int ) = 0;
00119 
00122       virtual Status duringLoop(Event const&, EventSetup const&, ProcessingController&) = 0;
00123 
00128       virtual Status endOfLoop(EventSetup const&, unsigned int iCounter) = 0;
00129 
00131       virtual void beginRun(Run const&, EventSetup const&);
00132 
00134       virtual void endRun(Run const&, EventSetup const&);
00135 
00137       virtual void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&);
00138 
00140       virtual void endLuminosityBlock(LuminosityBlock const&, EventSetup const&);
00141 
00142 
00143       unsigned int iCounter_;
00144       ActionTable const* act_table_;
00145 
00146       std::auto_ptr<ScheduleInfo> scheduleInfo_;
00147       ModuleChanger const* moduleChanger_;
00148   };
00149 }
00150 
00151 #endif