Public Member Functions | |
void | endJob () |
EventAuxiliaryHistoryProducer (ParameterSet const &) | |
virtual void | produce (Event &e, EventSetup const &c) |
virtual | ~EventAuxiliaryHistoryProducer () |
Static Public Member Functions | |
static void | fillDescriptions (ConfigurationDescriptions &descriptions) |
Private Attributes | |
unsigned int | depth_ |
std::deque< EventAuxiliary > | history_ |
Definition at line 12 of file EventAuxiliaryHistoryProducer.cc.
edm::EventAuxiliaryHistoryProducer::EventAuxiliaryHistoryProducer | ( | ParameterSet const & | ps | ) | [explicit] |
Definition at line 26 of file EventAuxiliaryHistoryProducer.cc.
edm::EventAuxiliaryHistoryProducer::~EventAuxiliaryHistoryProducer | ( | ) | [virtual] |
Definition at line 32 of file EventAuxiliaryHistoryProducer.cc.
{ }
void edm::EventAuxiliaryHistoryProducer::endJob | ( | void | ) | [virtual] |
Reimplemented from edm::EDProducer.
Definition at line 54 of file EventAuxiliaryHistoryProducer.cc.
{ }
void edm::EventAuxiliaryHistoryProducer::fillDescriptions | ( | ConfigurationDescriptions & | descriptions | ) | [static] |
Reimplemented from edm::EDProducer.
Definition at line 59 of file EventAuxiliaryHistoryProducer.cc.
References edm::ParameterSetDescription::add(), and edm::ConfigurationDescriptions::add().
{ ParameterSetDescription desc; desc.add<unsigned int>("historyDepth"); descriptions.add("eventAuxiliaryHistory", desc); }
void edm::EventAuxiliaryHistoryProducer::produce | ( | Event & | e, |
EventSetup const & | c | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 35 of file EventAuxiliaryHistoryProducer.cc.
References printConversionInfo::aux, edm::EventBase::bunchCrossing(), depth_, edm::EventBase::experimentType(), history_, edm::EventBase::id(), edm::EventAuxiliary::invalidStoreNumber, edm::EventBase::isRealData(), j, edm::EventBase::orbitNumber(), edm::Event::put(), query::result, and edm::EventBase::time().
{ EventAuxiliary aux(e.id(), "", e.time(), e.isRealData(), e.experimentType(), e.bunchCrossing(), EventAuxiliary::invalidStoreNumber, e.orbitNumber()); //EventAuxiliary const& aux = e.auxiliary(); // when available if(history_.size() > 0) { if(history_.back().id().next(aux.luminosityBlock()) != aux.id()) history_.clear(); if(history_.size() >= depth_) history_.pop_front(); } history_.push_back(aux); //Serialize into std::vector std::auto_ptr<std::vector<EventAuxiliary > > result(new std::vector<EventAuxiliary>); for(size_t j = 0; j < history_.size(); ++j) { result->push_back(history_[j]); } e.put(result); }
unsigned int edm::EventAuxiliaryHistoryProducer::depth_ [private] |
Definition at line 22 of file EventAuxiliaryHistoryProducer.cc.
Referenced by produce().
std::deque<EventAuxiliary> edm::EventAuxiliaryHistoryProducer::history_ [private] |
Definition at line 23 of file EventAuxiliaryHistoryProducer.cc.
Referenced by produce().