CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
reco::tau::AssociationMatchRefSelector< InputType, MatchedType, OutputType, ClonePolicy > Class Template Reference
Inheritance diagram for reco::tau::AssociationMatchRefSelector< InputType, MatchedType, OutputType, ClonePolicy >:
edm::EDFilter edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Types

typedef edm::Association
< MatchedType > 
AssocType
 
typedef edm::RefToBase< InputType > InputRef
 
typedef OutputType::value_type OutputValue
 
- Public Types inherited from edm::EDFilter
typedef EDFilter ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 AssociationMatchRefSelector (const edm::ParameterSet &pset)
 
bool filter (edm::Event &evt, const edm::EventSetup &es) override
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDFilter ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

ClonePolicy cloner_
 
bool filter_
 
edm::InputTag matching_
 
edm::InputTag src_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

template<typename InputType, typename MatchedType, typename OutputType = typename edm::RefToBaseVector<InputType>, typename ClonePolicy = RefCopier>
class reco::tau::AssociationMatchRefSelector< InputType, MatchedType, OutputType, ClonePolicy >

Definition at line 51 of file RecoTauGenJetMatchSelector.cc.

Member Typedef Documentation

template<typename InputType , typename MatchedType , typename OutputType = typename edm::RefToBaseVector<InputType>, typename ClonePolicy = RefCopier>
typedef edm::Association<MatchedType> reco::tau::AssociationMatchRefSelector< InputType, MatchedType, OutputType, ClonePolicy >::AssocType

Definition at line 55 of file RecoTauGenJetMatchSelector.cc.

template<typename InputType , typename MatchedType , typename OutputType = typename edm::RefToBaseVector<InputType>, typename ClonePolicy = RefCopier>
typedef edm::RefToBase<InputType> reco::tau::AssociationMatchRefSelector< InputType, MatchedType, OutputType, ClonePolicy >::InputRef

Definition at line 56 of file RecoTauGenJetMatchSelector.cc.

template<typename InputType , typename MatchedType , typename OutputType = typename edm::RefToBaseVector<InputType>, typename ClonePolicy = RefCopier>
typedef OutputType::value_type reco::tau::AssociationMatchRefSelector< InputType, MatchedType, OutputType, ClonePolicy >::OutputValue

Definition at line 54 of file RecoTauGenJetMatchSelector.cc.

Constructor & Destructor Documentation

template<typename InputType , typename MatchedType , typename OutputType = typename edm::RefToBaseVector<InputType>, typename ClonePolicy = RefCopier>
reco::tau::AssociationMatchRefSelector< InputType, MatchedType, OutputType, ClonePolicy >::AssociationMatchRefSelector ( const edm::ParameterSet pset)
inlineexplicit

Member Function Documentation

template<typename InputType , typename MatchedType , typename OutputType = typename edm::RefToBaseVector<InputType>, typename ClonePolicy = RefCopier>
bool reco::tau::AssociationMatchRefSelector< InputType, MatchedType, OutputType, ClonePolicy >::filter ( edm::Event evt,
const edm::EventSetup es 
)
inlineoverridevirtual

Implements edm::EDFilter.

Definition at line 64 of file RecoTauGenJetMatchSelector.cc.

References reco::tau::AssociationMatchRefSelector< InputType, MatchedType, OutputType, ClonePolicy >::cloner_, reco::tau::AssociationMatchRefSelector< InputType, MatchedType, OutputType, ClonePolicy >::filter_, edm::Event::getByLabel(), i, input, edm::Ref< C, T, F >::isNonnull(), match(), reco::tau::AssociationMatchRefSelector< InputType, MatchedType, OutputType, ClonePolicy >::matching_, convertSQLitetoXML_cfg::output, edm::Event::put(), reco::tau::AssociationMatchRefSelector< InputType, MatchedType, OutputType, ClonePolicy >::src_, and convertXMLtoSQLite_cfg::toPut.

64  {
66  evt.getByLabel(src_, input);
68  evt.getByLabel(matching_, match);
69  std::auto_ptr<OutputType> output(new OutputType);
70  for (size_t i = 0; i < input->size(); ++i) {
71  typename AssocType::reference_type matched = (*match)[input->refAt(i)];
72  // Check if matched
73  if (matched.isNonnull()) {
75  cloner_.template convert<InputRef, OutputValue>(input->refAt(i));
76  output->push_back(toPut);
77  }
78  }
79  bool notEmpty = output->size();
80  evt.put(output);
81  // Filter if no events passed
82  return ( !filter_ || notEmpty );
83  }
int i
Definition: DBlmapReader.cc:9
Ref< typename refprod_type::product_type > reference_type
Definition: Association.h:24
static std::string const input
Definition: EdmProvDump.cc:43
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:120
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:420
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10

Member Data Documentation

template<typename InputType , typename MatchedType , typename OutputType = typename edm::RefToBaseVector<InputType>, typename ClonePolicy = RefCopier>
ClonePolicy reco::tau::AssociationMatchRefSelector< InputType, MatchedType, OutputType, ClonePolicy >::cloner_
private
template<typename InputType , typename MatchedType , typename OutputType = typename edm::RefToBaseVector<InputType>, typename ClonePolicy = RefCopier>
bool reco::tau::AssociationMatchRefSelector< InputType, MatchedType, OutputType, ClonePolicy >::filter_
private
template<typename InputType , typename MatchedType , typename OutputType = typename edm::RefToBaseVector<InputType>, typename ClonePolicy = RefCopier>
edm::InputTag reco::tau::AssociationMatchRefSelector< InputType, MatchedType, OutputType, ClonePolicy >::matching_
private
template<typename InputType , typename MatchedType , typename OutputType = typename edm::RefToBaseVector<InputType>, typename ClonePolicy = RefCopier>
edm::InputTag reco::tau::AssociationMatchRefSelector< InputType, MatchedType, OutputType, ClonePolicy >::src_
private