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 90 of file HiMixingModule.cc.
edm::HiMixingWorker< T >::HiMixingWorker | ( | std::string & | object, |
std::vector< InputTag > & | tags, | ||
std::string & | label | ||
) | [inline] |
Definition at line 92 of file HiMixingModule.cc.
: HiMixingWorkerBase(object,tags, label) {;}
edm::HiMixingWorker< T >::~HiMixingWorker | ( | ) | [inline] |
Definition at line 93 of file HiMixingModule.cc.
{;}
void edm::HiMixingWorker< T >::addSignals | ( | edm::Event & | e | ) | [inline, virtual] |
Implements edm::HiMixingWorkerBase.
Definition at line 94 of file HiMixingModule.cc.
References gather_cfg::cout, 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){ std::cout<<"itag "<<itag<<std::endl; std::cout<<"label "<<tags_[itag].label()<<std::endl; std::cout<<"instance "<<tags_[itag].instance()<<std::endl; Handle<std::vector<T> > hand; handles.push_back(hand); get = get && e.getByLabel(tags_[itag],handles[itag]); if(!get) LogError("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 123 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) LogError("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_); } }