CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
edm::EDLooperBase Class Referenceabstract

#include <EDLooperBase.h>

Inheritance diagram for edm::EDLooperBase:
edm::EDLooper edm::NavigateEventsLooper FWFFLooper EcalEleCalibLooper edm::ESProducerLooper edm::IterateNTimesLooper InvRingCalib MuScleFit AlignmentProducer loopername PhysicsTools::MVATrainerLooper Pi0FixedMassWindowCalibration ZeeCalibration PhysicsTools::MVATrainerContainerLooperImpl< Record_t > PhysicsTools::MVATrainerLooperImpl< Record_t >

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. More...
 
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. More...
 
ScheduleInfo const * scheduleInfo () const
 This returns a non-zero value after the constructor has been called. More...
 

Private Member Functions

virtual void beginLuminosityBlock (LuminosityBlock const &, EventSetup const &)
 Called after all event modules have processed the begin of a LuminosityBlock. More...
 
virtual void beginRun (Run const &, EventSetup const &)
 Called after all event modules have processed the begin of a Run. More...
 
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. More...
 
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. More...
 
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< ScheduleInfoscheduleInfo_
 

Detailed Description

Definition at line 72 of file EDLooperBase.h.

Member Enumeration Documentation

Enumerator
kContinue 
kStop 

Definition at line 74 of file EDLooperBase.h.

Constructor & Destructor Documentation

EDLooperBase::EDLooperBase ( )

Definition at line 26 of file EDLooperBase.cc.

26 : iCounter_(0), act_table_(0), moduleChanger_(0) { }
unsigned int iCounter_
Definition: EDLooperBase.h:143
ActionTable const * act_table_
Definition: EDLooperBase.h:144
ModuleChanger const * moduleChanger_
Definition: EDLooperBase.h:147
EDLooperBase::~EDLooperBase ( )
virtual

Definition at line 27 of file EDLooperBase.cc.

27 { }
edm::EDLooperBase::EDLooperBase ( EDLooperBase const &  )
private

Member Function Documentation

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.

103 {}
void EDLooperBase::beginLuminosityBlock ( LuminosityBlock const &  ,
EventSetup const &   
)
privatevirtual

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().

100 {}
void EDLooperBase::beginOfJob ( EventSetup const &  )
virtual

Reimplemented in AlignmentProducer.

Definition at line 71 of file EDLooperBase.cc.

References beginOfJob().

71 { beginOfJob();}
virtual void beginOfJob()
Definition: EDLooperBase.cc:72
void EDLooperBase::beginOfJob ( )
virtual

Reimplemented in ZeeCalibration, Pi0FixedMassWindowCalibration, loopername, EcalEleCalibLooper, and InvRingCalib.

Definition at line 72 of file EDLooperBase.cc.

Referenced by beginOfJob().

72 { }
void EDLooperBase::beginRun ( Run const &  ,
EventSetup const &   
)
privatevirtual

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().

98 {}
void EDLooperBase::copyInfo ( ScheduleInfo const &  iInfo)

Definition at line 113 of file EDLooperBase.cc.

References scheduleInfo_.

113  {
114  scheduleInfo_ = std::auto_ptr<ScheduleInfo>(new ScheduleInfo(iInfo));
115  }
std::auto_ptr< ScheduleInfo > scheduleInfo_
Definition: EDLooperBase.h:146
void EDLooperBase::doBeginLuminosityBlock ( LuminosityBlockPrincipal iLB,
EventSetup const &  iES 
)

Definition at line 87 of file EDLooperBase.cc.

References beginLuminosityBlock().

87  {
88  edm::ModuleDescription modDesc("EDLooperBase", "");
89  LuminosityBlock luminosityBlock(iLB, modDesc);
90  beginLuminosityBlock(luminosityBlock,iES);
91  }
virtual void beginLuminosityBlock(LuminosityBlock const &, EventSetup const &)
Called after all event modules have processed the begin of a LuminosityBlock.
void EDLooperBase::doBeginRun ( RunPrincipal iRP,
EventSetup const &  iES 
)

Definition at line 76 of file EDLooperBase.cc.

References beginRun(), and DTTTrigCorrFirst::run.

76  {
77  edm::ModuleDescription modDesc("EDLooperBase", "");
78  Run run(iRP, modDesc);
79  beginRun(run,iES);
80  }
virtual void beginRun(Run const &, EventSetup const &)
Called after all event modules have processed the begin of a Run.
Definition: EDLooperBase.cc:98
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.

35  {
36  edm::ModuleDescription modDesc("EDLooperBase", "");
37  Event event(eventPrincipal, modDesc);
38 
40  try {
41  status = duringLoop(event, es, ioController);
42  }
43  catch(cms::Exception& e) {
44  e.addContext("Calling the 'duringLoop' method of a looper");
46  if (action != actions::Rethrow) {
47  edm::printCmsExceptionWarning("SkipEvent", e);
48  }
49  else {
50  throw;
51  }
52  }
53  return status;
54  }
std::string const & category() const
Definition: Exception.cc:183
ActionTable const * act_table_
Definition: EDLooperBase.h:144
virtual Status duringLoop(Event const &, EventSetup const &, ProcessingController &)=0
void printCmsExceptionWarning(char const *behavior, cms::Exception const &e, edm::JobReport *jobRep=0, int rc=-1)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
void addContext(std::string const &context)
Definition: Exception.cc:227
actions::ActionCodes find(const std::string &category) const
Definition: Actions.cc:93
tuple status
Definition: ntuplemaker.py:245
void EDLooperBase::doEndLuminosityBlock ( LuminosityBlockPrincipal iLB,
EventSetup const &  iES 
)

Definition at line 92 of file EDLooperBase.cc.

References endLuminosityBlock().

92  {
93  edm::ModuleDescription modDesc("EDLooperBase", "");
94  LuminosityBlock luminosityBlock(iLB, modDesc);
95  endLuminosityBlock(luminosityBlock,iES);
96  }
virtual void endLuminosityBlock(LuminosityBlock const &, EventSetup const &)
Called after all event modules have processed the end of a LuminosityBlock.
EDLooperBase::Status EDLooperBase::doEndOfLoop ( EventSetup const &  es)

Definition at line 57 of file EDLooperBase.cc.

References endOfLoop(), and iCounter_.

57  {
58  return endOfLoop(es, iCounter_);
59  }
virtual Status endOfLoop(EventSetup const &, unsigned int iCounter)=0
unsigned int iCounter_
Definition: EDLooperBase.h:143
void EDLooperBase::doEndRun ( RunPrincipal iRP,
EventSetup const &  iES 
)

Definition at line 82 of file EDLooperBase.cc.

References endRun(), and DTTTrigCorrFirst::run.

82  {
83  edm::ModuleDescription modDesc("EDLooperBase", "");
84  Run run(iRP, modDesc);
85  endRun(run,iES);
86  }
virtual void endRun(Run const &, EventSetup const &)
Called after all event modules have processed the end of a Run.
Definition: EDLooperBase.cc:99
void EDLooperBase::doStartingNewLoop ( )

Definition at line 30 of file EDLooperBase.cc.

References iCounter_, and startingNewLoop().

30  {
32  }
unsigned int iCounter_
Definition: EDLooperBase.h:143
virtual void startingNewLoop(unsigned int)=0
virtual Status edm::EDLooperBase::duringLoop ( Event const &  ,
EventSetup const &  ,
ProcessingController  
)
privatepure 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 &   
)
privatevirtual

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().

101 {}
void EDLooperBase::endOfJob ( )
virtual
virtual Status edm::EDLooperBase::endOfLoop ( EventSetup const &  ,
unsigned int  iCounter 
)
privatepure 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 MuScleFit, ZeeCalibration, AlignmentProducer, Pi0FixedMassWindowCalibration, FWFFLooper, EcalEleCalibLooper, InvRingCalib, edm::NavigateEventsLooper, edm::IterateNTimesLooper, and PhysicsTools::MVATrainerLooper.

Referenced by doEndOfLoop().

void EDLooperBase::endRun ( Run const &  ,
EventSetup const &   
)
privatevirtual

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().

99 {}
std::set< eventsetup::EventSetupRecordKey > EDLooperBase::modifyingRecords ( ) const
virtual

Reimplemented in edm::ESProducerLooper.

Definition at line 107 of file EDLooperBase.cc.

Referenced by prepareForNextLoop().

108  {
109  return std::set<eventsetup::EventSetupRecordKey> ();
110  }
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().

121  {
122  return moduleChanger_;
123  }
ModuleChanger const * moduleChanger_
Definition: EDLooperBase.h:147
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().

62  {
63  ++iCounter_;
64 
65  std::set<edm::eventsetup::EventSetupRecordKey> const& keys = modifyingRecords();
66  for_all(keys,
68  esp, _1));
69  }
unsigned int iCounter_
Definition: EDLooperBase.h:143
void resetRecordPlusDependentRecords(EventSetupRecordKey const &)
Used when we need to force a Record to reset all its proxies.
virtual std::set< eventsetup::EventSetupRecordKey > modifyingRecords() const
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
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().

124  {
125  return scheduleInfo_.get();
126  }
std::auto_ptr< ScheduleInfo > scheduleInfo_
Definition: EDLooperBase.h:146
void edm::EDLooperBase::setActionTable ( ActionTable const *  actionTable)
inline

Definition at line 97 of file EDLooperBase.h.

References act_table_.

97 { act_table_ = actionTable; }
ActionTable const * act_table_
Definition: EDLooperBase.h:144
void EDLooperBase::setModuleChanger ( ModuleChanger const *  iChanger)

Definition at line 117 of file EDLooperBase.cc.

References moduleChanger_.

117  {
118  moduleChanger_ = iChanger;
119  }
ModuleChanger const * moduleChanger_
Definition: EDLooperBase.h:147
virtual void edm::EDLooperBase::startingNewLoop ( unsigned  int)
privatepure 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 MuScleFit, ZeeCalibration, AlignmentProducer, Pi0FixedMassWindowCalibration, FWFFLooper, loopername, EcalEleCalibLooper, InvRingCalib, edm::NavigateEventsLooper, edm::IterateNTimesLooper, and PhysicsTools::MVATrainerLooper.

Referenced by doStartingNewLoop().

Member Data Documentation

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().