#include <DPGAnalysis/SiStripTools/plugins/EventWithHistoryProducer.cc>
Public Member Functions | |
EventWithHistoryProducer (const edm::ParameterSet &) | |
~EventWithHistoryProducer () | |
Private Member Functions | |
virtual void | beginJob () |
virtual void | endJob () |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
const unsigned int | _depth |
EventWithHistory | _prevHE |
Description: EDProducer of EventWithHistory which rely on the presence of the previous event in the analyzed dataset
Implementation:
Definition at line 41 of file EventWithHistoryProducer.cc.
EventWithHistoryProducer::EventWithHistoryProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 69 of file EventWithHistoryProducer.cc.
: _depth(iConfig.getUntrackedParameter<unsigned int>("historyDepth")), _prevHE() { produces<EventWithHistory>(); //now do what ever other initialization is needed }
EventWithHistoryProducer::~EventWithHistoryProducer | ( | ) |
Definition at line 81 of file EventWithHistoryProducer.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
void EventWithHistoryProducer::beginJob | ( | void | ) | [private, virtual] |
void EventWithHistoryProducer::endJob | ( | void | ) | [private, virtual] |
void EventWithHistoryProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Implements edm::EDProducer.
Definition at line 96 of file EventWithHistoryProducer.cc.
References _depth, TinyEvent::_event, _prevHE, edm::EventBase::bunchCrossing(), edm::EventID::event(), edm::EventBase::id(), edm::EventBase::orbitNumber(), and edm::Event::put().
{ using namespace edm; std::auto_ptr<EventWithHistory> heOut(new EventWithHistory(iEvent.id().event(),iEvent.orbitNumber(),iEvent.bunchCrossing())); heOut->add(_prevHE,_depth); if(*heOut < _prevHE) edm::LogInfo("EventsNotInOrder") << " Events not in order " << _prevHE._event; _prevHE = *heOut; iEvent.put(heOut); }
const unsigned int EventWithHistoryProducer::_depth [private] |
Definition at line 53 of file EventWithHistoryProducer.cc.
Referenced by produce().
Definition at line 54 of file EventWithHistoryProducer.cc.
Referenced by produce().