#include <HLTCollectionProducer.h>
Public Member Functions | |
HLTCollectionProducer (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
virtual | ~HLTCollectionProducer () |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
Private Attributes | |
edm::InputTag | hltObject_ |
std::vector< int > | triggerTypes_ |
Extract objects from trigger::TriggerFilterObjectWithRefs and fill them into a new collection (Based on GetJetsFromHLTobject.h)
Definition at line 36 of file HLTCollectionProducer.h.
HLTCollectionProducer< T >::HLTCollectionProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 54 of file HLTCollectionProducer.h.
: hltObject_ ( iConfig.getParameter<edm::InputTag>("HLTObject") ), triggerTypes_ ( iConfig.getParameter<std::vector<int> >("TriggerTypes") ) { produces< std::vector<T> >(); }
HLTCollectionProducer< T >::~HLTCollectionProducer | ( | ) | [virtual] |
Definition at line 62 of file HLTCollectionProducer.h.
{}
void HLTCollectionProducer< T >::fillDescriptions | ( | edm::ConfigurationDescriptions & | descriptions | ) | [static] |
Reimplemented from edm::EDProducer.
Definition at line 66 of file HLTCollectionProducer.h.
References edm::ParameterSetDescription::add(), edm::ConfigurationDescriptions::add(), and mergeVDriftHistosByStation::name.
{ edm::ParameterSetDescription desc; desc.add<edm::InputTag> ("HLTObject", edm::InputTag("TriggerFilterObjectWithRefs")); std::vector<int> triggerTypes; desc.add<std::vector<int> > ("TriggerTypes",triggerTypes); descriptions.add(std::string("hlt")+std::string(typeid(HLTCollectionProducer<T>).name()), desc); }
void HLTCollectionProducer< T >::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 81 of file HLTCollectionProducer.h.
References runEdmFileComparison::collection, edm::Event::getByLabel(), i, edm::Event::put(), and lumiQTWidget::t.
{ std::auto_ptr<std::vector<T> > collection ( new std::vector<T>() ); // get hold of collection of TriggerFilterObjectsWithRefs edm::Handle<trigger::TriggerFilterObjectWithRefs> hltObject; iEvent.getByLabel(hltObject_, hltObject); std::vector<edm::Ref<std::vector<T> > > objectRefs; for (size_t t=0; t<triggerTypes_.size(); ++t) { objectRefs.clear(); hltObject->getObjects( triggerTypes_[t], objectRefs ); for (size_t i = 0; i < objectRefs.size(); ++i) { collection->push_back(*objectRefs[i]); } } iEvent.put(collection); }
edm::InputTag HLTCollectionProducer< T >::hltObject_ [private] |
Definition at line 45 of file HLTCollectionProducer.h.
std::vector<int> HLTCollectionProducer< T >::triggerTypes_ [private] |
Definition at line 46 of file HLTCollectionProducer.h.