CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init > Class Template Reference

#include <ObjectSelectorProducer.h>

Inheritance diagram for ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >:

Public Member Functions

 ObjectSelectorProducer (const edm::ParameterSet &cfg)
 constructor More...
 
 ~ObjectSelectorProducer () override
 destructor More...
 

Private Member Functions

void produce (edm::Event &evt, const edm::EventSetup &es) override
 process one event More...
 

Private Attributes

PostProcessor postProcessor_
 post processor More...
 
Selector selector_
 
Init selectorInit_
 Object collection selector. More...
 
edm::EDGetTokenT< typename Selector::collection > srcToken_
 source collection label More...
 

Detailed Description

template<typename Selector, typename OutputCollection, typename PostProcessor, typename StoreManager, typename Base, typename Init>
class ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >

This class template is like ObjectSelector, but it is an EDProducer instead of EDFilter. Use case is that when the filter decisions are ignored (cms.ignore in configuration or EDFilter returns always true), EDProducers are better for the unscheduled mode than EDFilters.

Definition at line 30 of file ObjectSelectorProducer.h.

Constructor & Destructor Documentation

◆ ObjectSelectorProducer()

template<typename Selector , typename OutputCollection , typename PostProcessor , typename StoreManager , typename Base , typename Init >
ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >::ObjectSelectorProducer ( const edm::ParameterSet cfg)
inlineexplicit

constructor

Definition at line 33 of file ObjectSelectorProducer.h.

References ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >::postProcessor_.

34  : Base(cfg),
35  srcToken_(
36  this->template consumes<typename Selector::collection>(cfg.template getParameter<edm::InputTag>("src"))),
37  selectorInit_(this->consumesCollector()),
38  selector_(cfg, this->consumesCollector()),
39  postProcessor_(cfg, this->consumesCollector()) {
40  postProcessor_.init(*this);
41  }
PostProcessor postProcessor_
post processor
edm::EDGetTokenT< typename Selector::collection > srcToken_
source collection label
def Base(process)
Init selectorInit_
Object collection selector.

◆ ~ObjectSelectorProducer()

template<typename Selector , typename OutputCollection , typename PostProcessor , typename StoreManager , typename Base , typename Init >
ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >::~ObjectSelectorProducer ( )
inlineoverride

destructor

Definition at line 43 of file ObjectSelectorProducer.h.

43 {}

Member Function Documentation

◆ produce()

template<typename Selector , typename OutputCollection , typename PostProcessor , typename StoreManager , typename Base , typename Init >
void ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >::produce ( edm::Event evt,
const edm::EventSetup es 
)
inlineoverrideprivate

process one event

Definition at line 47 of file ObjectSelectorProducer.h.

References filtered(), edm::Event::getByToken(), ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >::postProcessor_, ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >::selector_, ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >::selectorInit_, source, and ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >::srcToken_.

47  {
48  selectorInit_.init(selector_, evt, es);
51  StoreManager manager(source);
52  selector_.select(source, evt, es);
53  manager.cloneAndStore(selector_.begin(), selector_.end(), evt);
55  postProcessor_.process(filtered, evt);
56  }
PostProcessor postProcessor_
post processor
edm::EDGetTokenT< typename Selector::collection > srcToken_
source collection label
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
static const TGPicture * filtered(bool iBackgroundIsBlack)
static std::string const source
Definition: EdmProvDump.cc:49
Init selectorInit_
Object collection selector.

Member Data Documentation

◆ postProcessor_

template<typename Selector , typename OutputCollection , typename PostProcessor , typename StoreManager , typename Base , typename Init >
PostProcessor ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >::postProcessor_
private

◆ selector_

template<typename Selector , typename OutputCollection , typename PostProcessor , typename StoreManager , typename Base , typename Init >
Selector ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >::selector_
private

◆ selectorInit_

template<typename Selector , typename OutputCollection , typename PostProcessor , typename StoreManager , typename Base , typename Init >
Init ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >::selectorInit_
private

◆ srcToken_

template<typename Selector , typename OutputCollection , typename PostProcessor , typename StoreManager , typename Base , typename Init >
edm::EDGetTokenT<typename Selector::collection> ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >::srcToken_
private