12 #ifndef TauAnalysis_MCEmbeddingTools_CollectionMerger_H 13 #define TauAnalysis_MCEmbeddingTools_CollectionMerger_H 42 template <
typename T1,
typename T2>
54 std::map<std::string, std::vector<edm::EDGetTokenT<MergeCollection > > >
inputs_;
67 template <
typename T1,
typename T2>
70 std::vector<edm::InputTag> inCollections = iConfig.
getParameter<std::vector<edm::InputTag> >(
"mergCollections");
71 for (
auto inCollection : inCollections){
72 inputs_[inCollection.instance()].push_back(consumes<MergeCollection >(inCollection));
76 produces<MergeCollection>(toproduce.first);
81 template <
typename T1,
typename T2>
88 template <
typename T1,
typename T2>
94 std::vector<edm::Handle<MergeCollection> > inputCollections;
95 inputCollections.resize(input_.second.size());
96 for (
unsigned id = 0;
id<input_.second.size();
id++){
97 iEvent.
getByToken(input_.second[
id], inputCollections[
id]);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::map< std::string, std::vector< edm::EDGetTokenT< MergeCollection > > > inputs_
virtual void produce(edm::Event &, const edm::EventSetup &) override
void fill_output_obj_muonchamber(std::unique_ptr< MergeCollection > &output, std::vector< edm::Handle< MergeCollection > > &inputCollections)
void fill_output_obj_calo(std::unique_ptr< MergeCollection > &output, std::vector< edm::Handle< MergeCollection > > &inputCollections)
void fill_output_obj(std::unique_ptr< MergeCollection > &output, std::vector< edm::Handle< MergeCollection > > &inputCollections)
CollectionMerger(const edm::ParameterSet &)
void fill_output_obj_tracker(std::unique_ptr< MergeCollection > &output, std::vector< edm::Handle< MergeCollection > > &inputCollections, bool print_pixel=false)