#include <EDLooperBase.h>
Public Types | |
enum | Status { kContinue, kStop } |
Public Member Functions | |
virtual void | attachTo (ActivityRegistry &) |
Override this method if you need to monitor the state of the processing. | |
virtual void | beginOfJob (EventSetup const &) |
virtual void | beginOfJob () |
void | copyInfo (ScheduleInfo const &) |
void | doBeginLuminosityBlock (LuminosityBlockPrincipal &, EventSetup const &) |
void | doBeginRun (RunPrincipal &, EventSetup const &) |
Status | doDuringLoop (EventPrincipal &eventPrincipal, EventSetup const &es, ProcessingController &) |
void | doEndLuminosityBlock (LuminosityBlockPrincipal &, EventSetup const &) |
Status | doEndOfLoop (EventSetup const &es) |
void | doEndRun (RunPrincipal &, EventSetup const &) |
void | doStartingNewLoop () |
EDLooperBase () | |
virtual void | endOfJob () |
virtual std::set < eventsetup::EventSetupRecordKey > | modifyingRecords () const |
void | prepareForNextLoop (eventsetup::EventSetupProvider *esp) |
void | setActionTable (ActionTable const *actionTable) |
void | setModuleChanger (ModuleChanger const *) |
virtual | ~EDLooperBase () |
Protected Member Functions | |
ModuleChanger const * | moduleChanger () const |
This only returns a non-zero value during the call to endOfLoop. | |
ScheduleInfo const * | scheduleInfo () const |
This returns a non-zero value after the constructor has been called. | |
Private Member Functions | |
virtual void | beginLuminosityBlock (LuminosityBlock const &, EventSetup const &) |
Called after all event modules have processed the begin of a LuminosityBlock. | |
virtual void | beginRun (Run const &, EventSetup const &) |
Called after all event modules have processed the begin of a Run. | |
virtual Status | duringLoop (Event const &, EventSetup const &, ProcessingController &)=0 |
EDLooperBase (EDLooperBase const &) | |
virtual void | endLuminosityBlock (LuminosityBlock const &, EventSetup const &) |
Called after all event modules have processed the end of a LuminosityBlock. | |
virtual Status | endOfLoop (EventSetup const &, unsigned int iCounter)=0 |
virtual void | endRun (Run const &, EventSetup const &) |
Called after all event modules have processed the end of a Run. | |
EDLooperBase const & | operator= (EDLooperBase const &) |
virtual void | startingNewLoop (unsigned int)=0 |
Private Attributes | |
ActionTable const * | act_table_ |
unsigned int | iCounter_ |
ModuleChanger const * | moduleChanger_ |
std::auto_ptr< ScheduleInfo > | scheduleInfo_ |
Definition at line 72 of file EDLooperBase.h.
EDLooperBase::EDLooperBase | ( | ) |
Definition at line 26 of file EDLooperBase.cc.
: iCounter_(0), act_table_(0), moduleChanger_(0) { }
EDLooperBase::~EDLooperBase | ( | ) | [virtual] |
Definition at line 27 of file EDLooperBase.cc.
{ }
edm::EDLooperBase::EDLooperBase | ( | EDLooperBase const & | ) | [private] |
void EDLooperBase::attachTo | ( | ActivityRegistry & | ) | [virtual] |
Override this method if you need to monitor the state of the processing.
Reimplemented in FWFFLooper.
Definition at line 103 of file EDLooperBase.cc.
{}
void EDLooperBase::beginLuminosityBlock | ( | LuminosityBlock const & | , |
EventSetup const & | |||
) | [private, virtual] |
Called after all event modules have processed the begin of a LuminosityBlock.
Reimplemented in AlignmentProducer.
Definition at line 100 of file EDLooperBase.cc.
Referenced by doBeginLuminosityBlock().
{}
void EDLooperBase::beginOfJob | ( | ) | [virtual] |
Reimplemented in EcalEleCalibLooper, InvRingCalib, Pi0FixedMassWindowCalibration, ZeeCalibration, and loopername.
Definition at line 72 of file EDLooperBase.cc.
Referenced by beginOfJob().
{ }
void EDLooperBase::beginOfJob | ( | EventSetup const & | ) | [virtual] |
Reimplemented in AlignmentProducer.
Definition at line 71 of file EDLooperBase.cc.
References beginOfJob().
{ beginOfJob();}
void EDLooperBase::beginRun | ( | Run const & | , |
EventSetup const & | |||
) | [private, virtual] |
Called after all event modules have processed the begin of a Run.
Reimplemented in AlignmentProducer, and FWFFLooper.
Definition at line 98 of file EDLooperBase.cc.
Referenced by doBeginRun().
{}
void EDLooperBase::copyInfo | ( | ScheduleInfo const & | iInfo | ) |
Definition at line 113 of file EDLooperBase.cc.
References scheduleInfo_.
{ scheduleInfo_ = std::auto_ptr<ScheduleInfo>(new ScheduleInfo(iInfo)); }
void EDLooperBase::doBeginLuminosityBlock | ( | LuminosityBlockPrincipal & | iLB, |
EventSetup const & | iES | ||
) |
Reimplemented in FWFFLooper.
Definition at line 87 of file EDLooperBase.cc.
References beginLuminosityBlock().
{ edm::ModuleDescription modDesc("EDLooperBase", ""); LuminosityBlock luminosityBlock(iLB, modDesc); beginLuminosityBlock(luminosityBlock,iES); }
void EDLooperBase::doBeginRun | ( | RunPrincipal & | iRP, |
EventSetup const & | iES | ||
) |
Definition at line 76 of file EDLooperBase.cc.
References beginRun(), and DTTTrigCorrFirst::run.
{ edm::ModuleDescription modDesc("EDLooperBase", ""); Run run(iRP, modDesc); beginRun(run,iES); }
EDLooperBase::Status EDLooperBase::doDuringLoop | ( | edm::EventPrincipal & | eventPrincipal, |
EventSetup const & | es, | ||
edm::ProcessingController & | ioController | ||
) |
Definition at line 35 of file EDLooperBase.cc.
References act_table_, alignCSCRings::action, cms::Exception::addContext(), cms::Exception::category(), duringLoop(), alignCSCRings::e, event(), edm::ActionTable::find(), kContinue, edm::printCmsExceptionWarning(), edm::actions::Rethrow, and ntuplemaker::status.
{ edm::ModuleDescription modDesc("EDLooperBase", ""); Event event(eventPrincipal, modDesc); Status status = kContinue; try { status = duringLoop(event, es, ioController); } catch(cms::Exception& e) { e.addContext("Calling the 'duringLoop' method of a looper"); actions::ActionCodes action = (act_table_->find(e.category())); if (action != actions::Rethrow) { edm::printCmsExceptionWarning("SkipEvent", e); } else { throw; } } return status; }
void EDLooperBase::doEndLuminosityBlock | ( | LuminosityBlockPrincipal & | iLB, |
EventSetup const & | iES | ||
) |
Reimplemented in FWFFLooper.
Definition at line 92 of file EDLooperBase.cc.
References endLuminosityBlock().
{ edm::ModuleDescription modDesc("EDLooperBase", ""); LuminosityBlock luminosityBlock(iLB, modDesc); endLuminosityBlock(luminosityBlock,iES); }
EDLooperBase::Status EDLooperBase::doEndOfLoop | ( | EventSetup const & | es | ) |
Definition at line 57 of file EDLooperBase.cc.
References endOfLoop(), and iCounter_.
void EDLooperBase::doEndRun | ( | RunPrincipal & | iRP, |
EventSetup const & | iES | ||
) |
Definition at line 82 of file EDLooperBase.cc.
References endRun(), and DTTTrigCorrFirst::run.
{ edm::ModuleDescription modDesc("EDLooperBase", ""); Run run(iRP, modDesc); endRun(run,iES); }
void EDLooperBase::doStartingNewLoop | ( | ) |
Definition at line 30 of file EDLooperBase.cc.
References iCounter_, and startingNewLoop().
{ startingNewLoop(iCounter_); }
virtual Status edm::EDLooperBase::duringLoop | ( | Event const & | , |
EventSetup const & | , | ||
ProcessingController & | |||
) | [private, pure virtual] |
Called after all event modules have had a chance to process the Event.
Implemented in FWFFLooper, edm::EDLooper, and edm::NavigateEventsLooper.
Referenced by doDuringLoop().
void EDLooperBase::endLuminosityBlock | ( | LuminosityBlock const & | , |
EventSetup const & | |||
) | [private, virtual] |
Called after all event modules have processed the end of a LuminosityBlock.
Reimplemented in AlignmentProducer.
Definition at line 101 of file EDLooperBase.cc.
Referenced by doEndLuminosityBlock().
{}
void EDLooperBase::endOfJob | ( | ) | [virtual] |
Reimplemented in AlignmentProducer, EcalEleCalibLooper, InvRingCalib, Pi0FixedMassWindowCalibration, ZeeCalibration, loopername, MuScleFit, and MuScleFit.
Definition at line 74 of file EDLooperBase.cc.
{ }
virtual Status edm::EDLooperBase::endOfLoop | ( | EventSetup const & | , |
unsigned int | iCounter | ||
) | [private, pure virtual] |
Called after the system has finished one loop over the events. Thar argument is a count of how many loops have been processed before this loo. For the first time through the events the argument will be 0.
Implemented in AlignmentProducer, EcalEleCalibLooper, InvRingCalib, Pi0FixedMassWindowCalibration, ZeeCalibration, FWFFLooper, edm::IterateNTimesLooper, edm::NavigateEventsLooper, MuScleFit, MuScleFit, and PhysicsTools::MVATrainerLooper.
Referenced by doEndOfLoop().
void EDLooperBase::endRun | ( | Run const & | , |
EventSetup const & | |||
) | [private, virtual] |
Called after all event modules have processed the end of a Run.
Reimplemented in AlignmentProducer.
Definition at line 99 of file EDLooperBase.cc.
Referenced by doEndRun().
{}
std::set< eventsetup::EventSetupRecordKey > EDLooperBase::modifyingRecords | ( | ) | const [virtual] |
Reimplemented in edm::ESProducerLooper.
Definition at line 107 of file EDLooperBase.cc.
Referenced by prepareForNextLoop().
{
return std::set<eventsetup::EventSetupRecordKey> ();
}
const ModuleChanger * EDLooperBase::moduleChanger | ( | ) | const [protected] |
This only returns a non-zero value during the call to endOfLoop.
Definition at line 121 of file EDLooperBase.cc.
References moduleChanger_.
Referenced by FWFFLooper::endOfLoop().
{ return moduleChanger_; }
EDLooperBase const& edm::EDLooperBase::operator= | ( | EDLooperBase const & | ) | [private] |
void EDLooperBase::prepareForNextLoop | ( | eventsetup::EventSetupProvider * | esp | ) |
Definition at line 62 of file EDLooperBase.cc.
References edm::for_all(), iCounter_, relativeConstraints::keys, modifyingRecords(), and edm::eventsetup::EventSetupProvider::resetRecordPlusDependentRecords().
{ ++iCounter_; std::set<edm::eventsetup::EventSetupRecordKey> const& keys = modifyingRecords(); for_all(keys, boost::bind(&eventsetup::EventSetupProvider::resetRecordPlusDependentRecords, esp, _1)); }
const ScheduleInfo * EDLooperBase::scheduleInfo | ( | ) | const [protected] |
This returns a non-zero value after the constructor has been called.
Definition at line 124 of file EDLooperBase.cc.
References scheduleInfo_.
Referenced by FWFFLooper::startingNewLoop().
{ return scheduleInfo_.get(); }
void edm::EDLooperBase::setActionTable | ( | ActionTable const * | actionTable | ) | [inline] |
void EDLooperBase::setModuleChanger | ( | ModuleChanger const * | iChanger | ) |
Definition at line 117 of file EDLooperBase.cc.
References moduleChanger_.
{ moduleChanger_ = iChanger; }
virtual void edm::EDLooperBase::startingNewLoop | ( | unsigned | int | ) | [private, pure virtual] |
Called before system starts to loop over the events. The argument is a count of how many loops have been processed. For the first time through the events the argument will be 0.
Implemented in AlignmentProducer, EcalEleCalibLooper, InvRingCalib, Pi0FixedMassWindowCalibration, ZeeCalibration, FWFFLooper, edm::IterateNTimesLooper, edm::NavigateEventsLooper, loopername, MuScleFit, MuScleFit, and PhysicsTools::MVATrainerLooper.
Referenced by doStartingNewLoop().
ActionTable const* edm::EDLooperBase::act_table_ [private] |
Definition at line 144 of file EDLooperBase.h.
Referenced by doDuringLoop(), and setActionTable().
unsigned int edm::EDLooperBase::iCounter_ [private] |
Definition at line 143 of file EDLooperBase.h.
Referenced by doEndOfLoop(), doStartingNewLoop(), and prepareForNextLoop().
ModuleChanger const* edm::EDLooperBase::moduleChanger_ [private] |
Definition at line 147 of file EDLooperBase.h.
Referenced by moduleChanger(), and setModuleChanger().
std::auto_ptr<ScheduleInfo> edm::EDLooperBase::scheduleInfo_ [private] |
Definition at line 146 of file EDLooperBase.h.
Referenced by copyInfo(), and scheduleInfo().