Skip to content

Commit

Permalink
Move ShallowCloneProducer to RecoAlgos and define typenames in one file
Browse files Browse the repository at this point in the history
  • Loading branch information
guitargeek committed Sep 3, 2021
1 parent c2bda4f commit a695b76
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 66 deletions.
8 changes: 0 additions & 8 deletions CommonTools/RecoAlgos/plugins/CaloJetShallowCloneProducer.cc

This file was deleted.

10 changes: 0 additions & 10 deletions CommonTools/RecoAlgos/plugins/CaloMETShallowCloneProducer.cc

This file was deleted.

9 changes: 0 additions & 9 deletions CommonTools/RecoAlgos/plugins/ElectronShallowCloneProducer.cc

This file was deleted.

8 changes: 0 additions & 8 deletions CommonTools/RecoAlgos/plugins/GenJetShallowCloneProducer.cc

This file was deleted.

9 changes: 0 additions & 9 deletions CommonTools/RecoAlgos/plugins/GenMETShallowCloneProducer.cc

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions CommonTools/RecoAlgos/plugins/MuonShallowCloneProducer.cc

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#ifndef CandAlgos_ShallowCloneProducer_h
#define CandAlgos_ShallowCloneProducer_h
/** \class ShallowCloneProducer
*
* Clones a concrete Candidate collection
Expand All @@ -13,11 +11,12 @@
* - C : Concrete candidate collection type
*
*/

#include "DataFormats/Candidate/interface/ShallowCloneCandidate.h"
#include "FWCore/Framework/interface/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "DataFormats/Candidate/interface/ShallowCloneCandidate.h"

template <typename C>
class ShallowCloneProducer : public edm::EDProducer {
Expand Down Expand Up @@ -55,4 +54,33 @@ void ShallowCloneProducer<C>::produce(edm::Event& evt, const edm::EventSetup&) {
evt.put(std::move(coll));
}

#endif
#include "DataFormats/EgammaCandidates/interface/Electron.h"
#include "DataFormats/EgammaCandidates/interface/ElectronFwd.h"
#include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
#include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h"
#include "DataFormats/JetReco/interface/CaloJet.h"
#include "DataFormats/JetReco/interface/GenJet.h"
#include "DataFormats/METReco/interface/CaloMET.h"
#include "DataFormats/METReco/interface/CaloMETCollection.h"
#include "DataFormats/METReco/interface/GenMET.h"
#include "DataFormats/METReco/interface/GenMETCollection.h"
#include "DataFormats/MuonReco/interface/Muon.h"
#include "DataFormats/MuonReco/interface/MuonFwd.h"

typedef ShallowCloneProducer<reco::GenMETCollection> GenMETShallowCloneProducer;
typedef ShallowCloneProducer<reco::GsfElectronCollection> PixelMatchGsfElectronShallowCloneProducer;
typedef ShallowCloneProducer<reco::MuonCollection> MuonShallowCloneProducer;
typedef ShallowCloneProducer<reco::CaloMETCollection> CaloMETShallowCloneProducer;
typedef ShallowCloneProducer<reco::ElectronCollection> ElectronShallowCloneProducer;
typedef ShallowCloneProducer<reco::GenJetCollection> GenJetShallowCloneProducer;
typedef ShallowCloneProducer<reco::CaloJetCollection> CaloJetShallowCloneProducer;

#include "FWCore/Framework/interface/MakerMacros.h"

DEFINE_FWK_MODULE(GenMETShallowCloneProducer);
DEFINE_FWK_MODULE(PixelMatchGsfElectronShallowCloneProducer);
DEFINE_FWK_MODULE(MuonShallowCloneProducer);
DEFINE_FWK_MODULE(CaloMETShallowCloneProducer);
DEFINE_FWK_MODULE(ElectronShallowCloneProducer);
DEFINE_FWK_MODULE(GenJetShallowCloneProducer);
DEFINE_FWK_MODULE(CaloJetShallowCloneProducer);

0 comments on commit a695b76

Please sign in to comment.