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
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...
 
virtual ~ObjectSelectorProducer ()
 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_
 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 31 of file ObjectSelectorProducer.h.

Constructor & Destructor Documentation

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 34 of file ObjectSelectorProducer.h.

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

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

destructor

Definition at line 42 of file ObjectSelectorProducer.h.

42 { }

Member Function Documentation

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 46 of file ObjectSelectorProducer.h.

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

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

46  {
47  Init::init(selector_, evt, es);
48  using namespace std;
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
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
int init
Definition: HydjetWrapper.h:67
edm::EDGetTokenT< typename Selector::collection > srcToken_
source collection label
static const TGPicture * filtered(bool iBackgroundIsBlack)
Selector selector_
Object collection selector.
static std::string const source
Definition: EdmProvDump.cc:43

Member Data Documentation

template<typename Selector, typename OutputCollection, typename PostProcessor, typename StoreManager, typename Base, typename Init>
PostProcessor ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >::postProcessor_
private
template<typename Selector, typename OutputCollection, typename PostProcessor, typename StoreManager, typename Base, typename Init>
Selector ObjectSelectorProducer< Selector, OutputCollection, PostProcessor, StoreManager, Base, Init >::selector_
private
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