CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
IsolationProducer< C1, C2, Alg, OutputCollection, Setup > Class Template Reference

#include <IsolationProducer.h>

Inheritance diagram for IsolationProducer< C1, C2, Alg, OutputCollection, Setup >:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 IsolationProducer (const edm::ParameterSet &)
 
 ~IsolationProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &)
 

Private Attributes

Alg alg_
 
edm::InputTag elements_
 
edm::InputTag src_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
typedef WorkerT< EDProducerWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDProducer
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

template<typename C1, typename C2, typename Alg, typename OutputCollection = edm::AssociationVector<edm::RefProd<C1>, std::vector<typename Alg::value_type> >, typename Setup = typename helper::IsolationAlgorithmSetup<Alg>::type>
class IsolationProducer< C1, C2, Alg, OutputCollection, Setup >

Definition at line 37 of file IsolationProducer.h.

Constructor & Destructor Documentation

template<typename C1 , typename C2 , typename Alg , typename OutputCollection , typename Setup >
IsolationProducer< C1, C2, Alg, OutputCollection, Setup >::IsolationProducer ( const edm::ParameterSet cfg)

Definition at line 49 of file IsolationProducer.h.

49  :
50  src_( cfg.template getParameter<edm::InputTag>( "src" ) ),
51  elements_( cfg.template getParameter<edm::InputTag>( "elements" ) ),
52  alg_( reco::modules::make<Alg>( cfg ) ) {
53  produces<OutputCollection>();
54 }
edm::InputTag elements_
edm::InputTag src_
template<typename C1 , typename C2 , typename Alg , typename OutputCollection , typename Setup >
IsolationProducer< C1, C2, Alg, OutputCollection, Setup >::~IsolationProducer ( )

Definition at line 57 of file IsolationProducer.h.

57  {
58 }

Member Function Documentation

template<typename C1 , typename C2 , typename Alg , typename OutputCollection , typename Setup >
void IsolationProducer< C1, C2, Alg, OutputCollection, Setup >::produce ( edm::Event evt,
const edm::EventSetup es 
)
privatevirtual

Implements edm::EDProducer.

Definition at line 61 of file IsolationProducer.h.

References asciidump::elements, edm::Event::getByLabel(), i, init, edm::Event::put(), and alcazmumu_cfi::src.

61  {
62  using namespace edm;
63  using namespace std;
66  evt.getByLabel( src_, src );
68 
69  Setup::init( alg_, es );
70 
71  typename OutputCollection::refprod_type ref( src );
72  auto_ptr<OutputCollection> isolations( new OutputCollection( ref ) );
73 
74  size_t i = 0;
75  for( typename C1::const_iterator lep = src->begin(); lep != src->end(); ++ lep ) {
76  typename Alg::value_type iso= alg_(*lep,*elements);
77  isolations->setValue( i++, iso );
78  }
79  evt.put( isolations );
80 }
int i
Definition: DBlmapReader.cc:9
std::vector< ProtoJet > OutputCollection
Definition: JetRecoTypes.h:63
int init
Definition: HydjetWrapper.h:63
list elements
Definition: asciidump.py:414
edm::InputTag elements_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:85
Container::value_type value_type
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
edm::InputTag src_

Member Data Documentation

template<typename C1 , typename C2 , typename Alg , typename OutputCollection = edm::AssociationVector<edm::RefProd<C1>, std::vector<typename Alg::value_type> >, typename Setup = typename helper::IsolationAlgorithmSetup<Alg>::type>
Alg IsolationProducer< C1, C2, Alg, OutputCollection, Setup >::alg_
private

Definition at line 45 of file IsolationProducer.h.

template<typename C1 , typename C2 , typename Alg , typename OutputCollection = edm::AssociationVector<edm::RefProd<C1>, std::vector<typename Alg::value_type> >, typename Setup = typename helper::IsolationAlgorithmSetup<Alg>::type>
edm::InputTag IsolationProducer< C1, C2, Alg, OutputCollection, Setup >::elements_
private

Definition at line 44 of file IsolationProducer.h.

template<typename C1 , typename C2 , typename Alg , typename OutputCollection = edm::AssociationVector<edm::RefProd<C1>, std::vector<typename Alg::value_type> >, typename Setup = typename helper::IsolationAlgorithmSetup<Alg>::type>
edm::InputTag IsolationProducer< C1, C2, Alg, OutputCollection, Setup >::src_
private

Definition at line 44 of file IsolationProducer.h.