1 #ifndef HLTCollectionProducer_h
2 #define HLTCollectionProducer_h
56 hltObjectTag_ ( iConfig.getParameter<edm::InputTag>(
"HLTObject") ),
57 hltObjectToken_(consumes<trigger::TriggerFilterObjectWithRefs>(hltObjectTag_)),
58 triggerTypes_ ( iConfig.getParameter<std::vector<int> >(
"TriggerTypes") )
60 produces< std::vector<T> >();
71 std::vector<int> triggerTypes;
72 desc.
add<std::vector<int> > (
"TriggerTypes",triggerTypes);
86 std::auto_ptr<std::vector<T> >
collection (
new std::vector<T>() );
91 std::vector<edm::Ref<std::vector<T> > > objectRefs;
93 for (
size_t t=0;
t<triggerTypes_.size(); ++
t) {
95 hltObject->getObjects( triggerTypes_[
t], objectRefs );
96 for (
size_t i = 0;
i < objectRefs.size(); ++
i) {
97 collection->push_back(*objectRefs[
i]);
101 iEvent.
put(collection);
105 #endif // HLTCollectionProducer_h
std::vector< int > triggerTypes_
virtual ~HLTCollectionProducer()
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > hltObjectToken_
HLTCollectionProducer(const edm::ParameterSet &)
edm::InputTag hltObjectTag_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual void produce(edm::Event &, const edm::EventSetup &)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)