Public Member Functions | |
void | addSignals (edm::Event &e) |
template<> | |
void | addSignals (edm::Event &e) |
HiMixingWorker (std::string &object, std::vector< InputTag > &tags, std::string &label) | |
~HiMixingWorker () |
Definition at line 91 of file HiMixingModule.cc.
edm::HiMixingWorker< T >::HiMixingWorker | ( | std::string & | object, |
std::vector< InputTag > & | tags, | ||
std::string & | label | ||
) | [inline] |
Definition at line 93 of file HiMixingModule.cc.
: HiMixingWorkerBase(object,tags, label) {;}
edm::HiMixingWorker< T >::~HiMixingWorker | ( | ) | [inline] |
Definition at line 94 of file HiMixingModule.cc.
{;}
void edm::HiMixingWorker< T >::addSignals | ( | edm::Event & | e | ) | [inline, virtual] |
Implements edm::HiMixingWorkerBase.
Definition at line 95 of file HiMixingModule.cc.
References edm::Event::getByLabel(), edm::EventBase::id(), and edm::Event::put().
{ std::vector<Handle<std::vector<T> > > handles; bool get = true; for(size_t itag = 0; itag < tags_.size(); ++itag){ LogInfo("HiEmbedding")<<"itag "<<itag; LogInfo("HiEmbedding")<<"label "<<tags_[itag].label(); LogInfo("HiEmbedding")<<"instance "<<tags_[itag].instance(); Handle<std::vector<T> > hand; handles.push_back(hand); get = get && e.getByLabel(tags_[itag],handles[itag]); if(!get) LogWarning("Product inconsistency")<<"One of the sub-events is missing the product with type " <<object_ <<", instance " <<tags_[itag].instance() <<" whereas the other one is fine."; } if(get){ std::auto_ptr<CrossingFrame<T> > crFrame(new CrossingFrame<T>() ); crFrame->addSignals(handles[0].product(),e.id()); for(size_t itag = 1; itag < tags_.size(); ++itag){ crFrame->addPileups(0,const_cast< std::vector<T> * >(handles[itag].product()),itag); } e.put(crFrame,label_); } }
void edm::HiMixingWorker< HepMCProduct >::addSignals | ( | edm::Event & | e | ) | [virtual] |
Implements edm::HiMixingWorkerBase.
Definition at line 124 of file HiMixingModule.cc.
References edm::Event::getByLabel(), edm::EventBase::id(), and edm::Event::put().
{ std::vector<Handle<HepMCProduct> > handles; bool get = true; for(size_t itag = 0; itag< tags_.size(); ++itag){ Handle<HepMCProduct> hand; handles.push_back(hand); get = get && e.getByLabel(tags_[itag],handles[itag]); if(!get) LogWarning("Product inconsistency")<<"One of the sub-events is missing the product with type " <<object_ <<", instance " <<tags_[itag].instance() <<" whereas the other one is fine."; } if(get){ std::auto_ptr<CrossingFrame<HepMCProduct> > crFrame(new CrossingFrame<HepMCProduct>() ); crFrame->addSignals(handles[0].product(),e.id()); for(size_t itag = 1; itag < tags_.size(); ++itag){ crFrame->addPileups(0, const_cast<HepMCProduct *>(handles[itag].product()),itag); } e.put(crFrame,label_); } }