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 
61 
62 #include <set>
63 #include <memory>
64 
65 namespace edm {
66  namespace eventsetup {
67  class EventSetupRecordKey;
68  class EventSetupProvider;
69  } // namespace eventsetup
70  class ExceptionToActionTable;
71  class ProcessContext;
72  class ScheduleInfo;
73  class StreamContext;
74  class ModuleChanger;
76  class ActivityRegistry;
77 
78  class EDLooperBase : public EDConsumerBase {
79  public:
80  enum Status { kContinue, kStop };
81 
82  EDLooperBase();
83  ~EDLooperBase() noexcept(false) override;
84 
85  EDLooperBase(EDLooperBase const&) = delete; // Disallow copying and moving
86  EDLooperBase& operator=(EDLooperBase const&) = delete; // Disallow copying and moving
87 
88  void doStartingNewLoop();
91  void prepareForNextLoop(eventsetup::EventSetupProvider* esp);
96 
98  //This interface is deprecated
99  virtual void beginOfJob(EventSetup const&);
100  virtual void beginOfJob();
101 
102  virtual void endOfJob();
103 
105  virtual void attachTo(ActivityRegistry&);
106 
107  void setActionTable(ExceptionToActionTable const* actionTable) { act_table_ = actionTable; }
108 
109  virtual std::set<eventsetup::EventSetupRecordKey> modifyingRecords() const;
110 
111  void copyInfo(ScheduleInfo const&);
113 
114  protected:
118  ScheduleInfo const* scheduleInfo() const;
119 
120  private:
125  virtual void startingNewLoop(unsigned int) = 0;
126 
129  virtual Status duringLoop(Event const&, EventSetup const&, ProcessingController&) = 0;
130 
135  virtual Status endOfLoop(EventSetup const&, unsigned int iCounter) = 0;
136 
138  virtual void beginRun(Run const&, EventSetup const&);
139 
141  virtual void endRun(Run const&, EventSetup const&);
142 
144  virtual void beginLuminosityBlock(LuminosityBlock const&, EventSetup const&);
145 
147  virtual void endLuminosityBlock(LuminosityBlock const&, EventSetup const&);
148 
149  unsigned int iCounter_;
151 
154 
157  };
158 } // namespace edm
159 
160 #endif
edm::EDLooperBase::Status
Status
Definition: EDLooperBase.h:80
ModuleCallingContext.h
funct::false
false
Definition: Factorize.h:29
ActivityRegistry
edm::EDLooperBase::EDLooperBase
EDLooperBase()
Definition: EDLooperBase.cc:33
propagate_const.h
edm::EventSetupImpl
Definition: EventSetupImpl.h:49
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
edm::EDLooperBase::copyInfo
void copyInfo(ScheduleInfo const &)
Definition: EDLooperBase.cc:190
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:103
edm::EDLooperBase::prepareForNextLoop
void prepareForNextLoop(eventsetup::EventSetupProvider *esp)
Definition: EDLooperBase.cc:82
edm::EDLooperBase::doStartingNewLoop
void doStartingNewLoop()
Definition: EDLooperBase.cc:41
edm::EDLooperBase::~EDLooperBase
~EDLooperBase() noexcept(false) override
Definition: EDLooperBase.cc:39
watchdog.const
const
Definition: watchdog.py:83
edm::EDLooperBase::setModuleChanger
void setModuleChanger(ModuleChanger *)
Definition: EDLooperBase.cc:191
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:150
ModuleDescription.h
edm::EDLooperBase::iCounter_
unsigned int iCounter_
Definition: EDLooperBase.h:149
edm::EDConsumerBase
Definition: EDConsumerBase.h:71
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:153
edm::EDLooperBase::kStop
Definition: EDLooperBase.h:80
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:180
edm::EDLooperBase::scheduleInfo
ScheduleInfo const * scheduleInfo() const
This returns a non-zero value after the constructor has been called.
Definition: EDLooperBase.cc:194
edm::ActivityRegistry
Definition: ActivityRegistry.h:134
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:179
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:182
edm::EDLooperBase::moduleDescription_
ModuleDescription moduleDescription_
Definition: EDLooperBase.h:155
EDConsumerBase.h
edm::EDLooperBase::moduleChanger
ModuleChanger * moduleChanger()
This only returns a non-zero value during the call to endOfLoop.
Definition: EDLooperBase.cc:193
edm::EDLooperBase::doEndLuminosityBlock
void doEndLuminosityBlock(LuminosityBlockPrincipal &, EventSetupImpl const &, ProcessContext *)
Definition: EDLooperBase.cc:157
edm::EDLooperBase::endOfLoop
virtual Status endOfLoop(EventSetup const &, unsigned int iCounter)=0
edm::EDLooperBase::moduleCallingContext_
ModuleCallingContext moduleCallingContext_
Definition: EDLooperBase.h:156
edm::EDLooperBase::doDuringLoop
Status doDuringLoop(EventPrincipal &eventPrincipal, EventSetupImpl const &es, ProcessingController &, StreamContext *)
Definition: EDLooperBase.cc:43
edm::EventSetup
Definition: EventSetup.h:58
edm::EDLooperBase::kContinue
Definition: EDLooperBase.h:80
edm::ScheduleInfo
Definition: ScheduleInfo.h:32
edm::ExceptionToActionTable
Definition: ExceptionActions.h:16
edm::EDLooperBase::endOfJob
virtual void endOfJob()
Definition: EDLooperBase.cc:101
edm::EDLooperBase::doEndOfLoop
Status doEndOfLoop(EventSetupImpl const &es)
Definition: EDLooperBase.cc:75
ModuleChanger
edm::EDLooperBase::doEndRun
void doEndRun(RunPrincipal &, EventSetupImpl const &, ProcessContext *)
Definition: EDLooperBase.cc:120
edm::EDLooperBase::setActionTable
void setActionTable(ExceptionToActionTable const *actionTable)
Definition: EDLooperBase.h:107
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:184
edm::EDLooperBase::modifyingRecords
virtual std::set< eventsetup::EventSetupRecordKey > modifyingRecords() const
Definition: EDLooperBase.cc:186
edm::EDLooperBase
Definition: EDLooperBase.h:78
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:152
edm::EDLooperBase::doBeginLuminosityBlock
void doBeginLuminosityBlock(LuminosityBlockPrincipal &, EventSetupImpl const &, ProcessContext *)
Definition: EDLooperBase.cc:136
edm::ModuleChanger
Definition: ModuleChanger.h:36
edm::EDLooperBase::beginOfJob
virtual void beginOfJob()
Definition: EDLooperBase.cc:99
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:181