1 #ifndef HLTCollectionProducer_h
2 #define HLTCollectionProducer_h
55 hltObject_ ( iConfig.getParameter<edm::InputTag>(
"HLTObject") ),
56 triggerTypes_ ( iConfig.getParameter<std::vector<int> >(
"TriggerTypes") )
58 produces< std::vector<T> >();
69 std::vector<int> triggerTypes;
70 desc.
add<std::vector<int> > (
"TriggerTypes",triggerTypes);
84 std::auto_ptr<std::vector<T> >
collection (
new std::vector<T>() );
89 std::vector<edm::Ref<std::vector<T> > > objectRefs;
91 for (
size_t t=0;
t<triggerTypes_.size(); ++
t) {
93 hltObject->getObjects( triggerTypes_[
t], objectRefs );
94 for (
size_t i = 0;
i < objectRefs.size(); ++
i) {
95 collection->push_back(*objectRefs[
i]);
99 iEvent.
put(collection);
103 #endif // HLTCollectionProducer_h
std::vector< int > triggerTypes_
virtual ~HLTCollectionProducer()
HLTCollectionProducer(const edm::ParameterSet &)
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)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)