1 #ifndef IsolationAlgos_IsolationProducer_h
2 #define IsolationAlgos_IsolationProducer_h
23 template<
typename Alg>
24 struct NullIsolationAlgorithmSetup {
28 template<
typename Alg>
29 struct IsolationAlgorithmSetup {
35 namespace modulesNew {
37 template <
typename C1,
typename C2,
typename Alg,
52 template <
typename C1,
typename C2,
typename Alg,
typename OutputCollection,
typename Setup>
54 srcToken_( consumes<C1>( cfg.
template getParameter<edm::
InputTag>(
"src" ) ) ),
55 elementsToken_( consumes<C2>( cfg.
template getParameter<edm::
InputTag>(
"elements" ) ) ),
57 produces<OutputCollection>();
60 template <
typename C1,
typename C2,
typename Alg,
typename OutputCollection,
typename Setup>
64 template <
typename C1,
typename C2,
typename Alg,
typename OutputCollection,
typename Setup>
76 auto_ptr<OutputCollection> isolations(
new OutputCollection);
78 typename OutputCollection::Filler filler(*isolations);
79 vector<double> iso(master.
size(),-1);
81 for(
typename C1::const_iterator lep =
src->begin(); lep !=
src->end(); ++ lep )
83 filler.insert(master.
get(), iso.begin(), iso.end());
86 evt.
put( isolations );
edm::EDGetTokenT< C2 > elementsToken_
const edm::Handle< C1 > & get() const
static void init(Alg &, const edm::EventSetup &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
S make(const edm::ParameterSet &cfg)
edm::EDGetTokenT< C1 > srcToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
size_t index(size_t i) const
void produce(edm::Event &, const edm::EventSetup &)
IsolationProducer(const edm::ParameterSet &)
NullIsolationAlgorithmSetup< Alg > type