CMS 3D CMS Logo

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  } // namespace eventsetup
69  class ExceptionToActionTable;
70  class ProcessContext;
71  class ScheduleInfo;
72  class StreamContext;
73  class ModuleChanger;
75  class ActivityRegistry;
76 
77  class EDLooperBase {
78  public:
79  enum Status { kContinue, kStop };
80 
81  EDLooperBase();
82  virtual ~EDLooperBase() noexcept(false);
83 
84  EDLooperBase(EDLooperBase const&) = delete; // Disallow copying and moving
85  EDLooperBase& operator=(EDLooperBase const&) = delete; // Disallow copying and moving
86 
87  void doStartingNewLoop();
90  void prepareForNextLoop(eventsetup::EventSetupProvider* esp);
95 
97  //This interface is deprecated
98  virtual void beginOfJob(EventSetup const&);
99  virtual void beginOfJob();
100 
101  virtual void endOfJob();
102 
104  virtual void attachTo(ActivityRegistry&);
105 
106  void setActionTable(ExceptionToActionTable const* actionTable) { act_table_ = actionTable; }
107 
108  virtual std::set<eventsetup::EventSetupRecordKey> modifyingRecords() const;
109 
110  void copyInfo(ScheduleInfo const&);
112 
113  protected:
117  ScheduleInfo const* scheduleInfo() const;
118 
119  private:
124  virtual void startingNewLoop(unsigned int) = 0;
125 
128  virtual Status duringLoop(Event const&, EventSetup const&, ProcessingController&) = 0;
129 
134  virtual Status endOfLoop(EventSetup const&, unsigned int iCounter) = 0;
135 
137  virtual void beginRun(Run const&, EventSetup const&);
138 
140  virtual void endRun(Run const&, EventSetup const&);
141 
143  virtual void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&);
144 
146  virtual void endLuminosityBlock(LuminosityBlock const&, EventSetup const&);
147 
148  unsigned int iCounter_;
150 
153 
156  };
157 } // namespace edm
158 
159 #endif
edm::EDLooperBase::Status
Status
Definition: EDLooperBase.h:79
ModuleCallingContext.h
funct::false
false
Definition: Factorize.h:29
ActivityRegistry
edm::EDLooperBase::EDLooperBase
EDLooperBase()
Definition: EDLooperBase.cc:32
propagate_const.h
edm::EventSetupImpl
Definition: EventSetupImpl.h:48
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
edm::EDLooperBase::copyInfo
void copyInfo(ScheduleInfo const &)
Definition: EDLooperBase.cc:161
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ProcessContext
Definition: ProcessContext.h:27
edm::LuminosityBlockPrincipal
Definition: LuminosityBlockPrincipal.h:31
EventSetupRecordKey
edm::EDLooperBase::doBeginRun
void doBeginRun(RunPrincipal &, EventSetupImpl const &, ProcessContext *)
Definition: EDLooperBase.cc:92
edm::EDLooperBase::prepareForNextLoop
void prepareForNextLoop(eventsetup::EventSetupProvider *esp)
Definition: EDLooperBase.cc:76
edm::EDLooperBase::doStartingNewLoop
void doStartingNewLoop()
Definition: EDLooperBase.cc:40
watchdog.const
const
Definition: watchdog.py:83
edm::EDLooperBase::setModuleChanger
void setModuleChanger(ModuleChanger *)
Definition: EDLooperBase.cc:162
edm::ProcessingController
Definition: ProcessingController.h:29
edm::ModuleDescription
Definition: ModuleDescription.h:21
Utilities.operator
operator
Definition: Utilities.py:24
edm::EDLooperBase::act_table_
ExceptionToActionTable const * act_table_
Definition: EDLooperBase.h:149
ModuleDescription.h
edm::EDLooperBase::iCounter_
unsigned int iCounter_
Definition: EDLooperBase.h:148
edm::propagate_const
Definition: propagate_const.h:32
edm::EventPrincipal
Definition: EventPrincipal.h:46
edm::StreamContext
Definition: StreamContext.h:31
edm::EDLooperBase::moduleChanger_
edm::propagate_const< ModuleChanger * > moduleChanger_
Definition: EDLooperBase.h:152
edm::EDLooperBase::kStop
Definition: EDLooperBase.h:79
ScheduleInfo
edm::EDLooperBase::endRun
virtual void endRun(Run const &, EventSetup const &)
Called after all event modules have processed the end of a Run.
Definition: EDLooperBase.cc:151
edm::EDLooperBase::scheduleInfo
ScheduleInfo const * scheduleInfo() const
This returns a non-zero value after the constructor has been called.
Definition: EDLooperBase.cc:165
edm::ActivityRegistry
Definition: ActivityRegistry.h:133
edm::EDLooperBase::beginRun
virtual void beginRun(Run const &, EventSetup const &)
Called after all event modules have processed the begin of a Run.
Definition: EDLooperBase.cc:150
edm::EDLooperBase::startingNewLoop
virtual void startingNewLoop(unsigned int)=0
edm::EDLooperBase::endLuminosityBlock
virtual void endLuminosityBlock(LuminosityBlock const &, EventSetup const &)
Called after all event modules have processed the end of a LuminosityBlock.
Definition: EDLooperBase.cc:153
edm::EDLooperBase::~EDLooperBase
virtual ~EDLooperBase() noexcept(false)
Definition: EDLooperBase.cc:38
edm::EDLooperBase::moduleDescription_
ModuleDescription moduleDescription_
Definition: EDLooperBase.h:154
edm::EDLooperBase::moduleChanger
ModuleChanger * moduleChanger()
This only returns a non-zero value during the call to endOfLoop.
Definition: EDLooperBase.cc:164
edm::EDLooperBase::doEndLuminosityBlock
void doEndLuminosityBlock(LuminosityBlockPrincipal &, EventSetupImpl const &, ProcessContext *)
Definition: EDLooperBase.cc:134
edm::EDLooperBase::endOfLoop
virtual Status endOfLoop(EventSetup const &, unsigned int iCounter)=0
edm::EDLooperBase::moduleCallingContext_
ModuleCallingContext moduleCallingContext_
Definition: EDLooperBase.h:155
edm::EDLooperBase::doDuringLoop
Status doDuringLoop(EventPrincipal &eventPrincipal, EventSetupImpl const &es, ProcessingController &, StreamContext *)
Definition: EDLooperBase.cc:42
edm::EventSetup
Definition: EventSetup.h:57
edm::EDLooperBase::kContinue
Definition: EDLooperBase.h:79
edm::ScheduleInfo
Definition: ScheduleInfo.h:32
edm::ExceptionToActionTable
Definition: ExceptionActions.h:16
edm::EDLooperBase::endOfJob
virtual void endOfJob()
Definition: EDLooperBase.cc:90
edm::EDLooperBase::doEndOfLoop
Status doEndOfLoop(EventSetupImpl const &es)
Definition: EDLooperBase.cc:71
ModuleChanger
edm::EDLooperBase::doEndRun
void doEndRun(RunPrincipal &, EventSetupImpl const &, ProcessContext *)
Definition: EDLooperBase.cc:106
edm::EDLooperBase::setActionTable
void setActionTable(ExceptionToActionTable const *actionTable)
Definition: EDLooperBase.h:106
ProcessingController
Frameworkfwd.h
edm::EDLooperBase::duringLoop
virtual Status duringLoop(Event const &, EventSetup const &, ProcessingController &)=0
edm::EDLooperBase::attachTo
virtual void attachTo(ActivityRegistry &)
Override this method if you need to monitor the state of the processing.
Definition: EDLooperBase.cc:155
edm::EDLooperBase::modifyingRecords
virtual std::set< eventsetup::EventSetupRecordKey > modifyingRecords() const
Definition: EDLooperBase.cc:157
edm::EDLooperBase
Definition: EDLooperBase.h:77
edm::RunPrincipal
Definition: RunPrincipal.h:34
edm::Event
Definition: Event.h:73
edm::EDLooperBase::scheduleInfo_
edm::propagate_const< std::unique_ptr< ScheduleInfo > > scheduleInfo_
Definition: EDLooperBase.h:151
edm::EDLooperBase::doBeginLuminosityBlock
void doBeginLuminosityBlock(LuminosityBlockPrincipal &, EventSetupImpl const &, ProcessContext *)
Definition: EDLooperBase.cc:119
edm::ModuleChanger
Definition: ModuleChanger.h:36
edm::EDLooperBase::beginOfJob
virtual void beginOfJob()
Definition: EDLooperBase.cc:88
edm::ModuleCallingContext
Definition: ModuleCallingContext.h:29
edm::EDLooperBase::beginLuminosityBlock
virtual void beginLuminosityBlock(LuminosityBlock const &, EventSetup const &)
Called after all event modules have processed the begin of a LuminosityBlock.
Definition: EDLooperBase.cc:152