CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
pat::PATTriggerObjectStandAloneUnpacker Class Reference

Unpacks a pat::TriggerObjectStandAloneCollection with packed path names. More...

Inheritance diagram for pat::PATTriggerObjectStandAloneUnpacker:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 PATTriggerObjectStandAloneUnpacker (const edm::ParameterSet &iConfig)
 
 ~PATTriggerObjectStandAloneUnpacker ()
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, std::unordered_multimap< std::string, edm::ProductResolverIndex > const &iIndicies, std::string const &moduleLabel)
 
virtual ~ProducerBase () noexcept(false)
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

virtual void produce (edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
 

Private Attributes

const edm::EDGetTokenT< TriggerObjectStandAloneCollectionpatTriggerObjectsStandAloneToken_
 
const edm::EDGetTokenT< edm::TriggerResultstriggerResultsToken_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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

Unpacks a pat::TriggerObjectStandAloneCollection with packed path names.

The producer will throw, if a pat::TriggerObjectStandAloneCollection with unpacked path names is used as input.

Author
Volker Adler

Definition at line 28 of file PATTriggerObjectStandAloneUnpacker.cc.

Constructor & Destructor Documentation

PATTriggerObjectStandAloneUnpacker::PATTriggerObjectStandAloneUnpacker ( const edm::ParameterSet iConfig)
explicit

Definition at line 50 of file PATTriggerObjectStandAloneUnpacker.cc.

51 : patTriggerObjectsStandAloneToken_( consumes< TriggerObjectStandAloneCollection >( iConfig.getParameter< edm::InputTag >( "patTriggerObjectsStandAlone" ) ) )
52 , triggerResultsToken_( consumes< edm::TriggerResults >( iConfig.getParameter< edm::InputTag >( "triggerResults" ) ) )
53 {
54  produces< TriggerObjectStandAloneCollection >();
55 }
T getParameter(std::string const &) const
const edm::EDGetTokenT< TriggerObjectStandAloneCollection > patTriggerObjectsStandAloneToken_
const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
pat::PATTriggerObjectStandAloneUnpacker::~PATTriggerObjectStandAloneUnpacker ( )
inline

Definition at line 33 of file PATTriggerObjectStandAloneUnpacker.cc.

References iEvent, and produce().

33 {};

Member Function Documentation

void PATTriggerObjectStandAloneUnpacker::produce ( edm::StreamID  ,
edm::Event iEvent,
const edm::EventSetup iSetup 
) const
overrideprivatevirtual

Definition at line 57 of file PATTriggerObjectStandAloneUnpacker.cc.

References DEFINE_FWK_MODULE, edm::Event::getByToken(), eostools::move(), cscdqm::h::names, unpackedPatTrigger_cfi::patTriggerObjectsStandAlone, patTriggerObjectsStandAloneToken_, edm::Event::put(), edm::Event::triggerNames(), triggerResults, and triggerResultsToken_.

Referenced by ~PATTriggerObjectStandAloneUnpacker().

58 {
60  iEvent.getByToken( patTriggerObjectsStandAloneToken_, patTriggerObjectsStandAlone );
62  iEvent.getByToken( triggerResultsToken_, triggerResults );
63 
64  auto patTriggerObjectsStandAloneUnpacked = std::make_unique<TriggerObjectStandAloneCollection>();
65 
66  for ( size_t iTrigObj = 0; iTrigObj < patTriggerObjectsStandAlone->size(); ++iTrigObj ) {
67  TriggerObjectStandAlone patTriggerObjectStandAloneUnpacked( patTriggerObjectsStandAlone->at( iTrigObj ) );
68  const edm::TriggerNames & names = iEvent.triggerNames( *triggerResults );
69  patTriggerObjectStandAloneUnpacked.unpackPathNames( names );
70  patTriggerObjectsStandAloneUnpacked->push_back( patTriggerObjectStandAloneUnpacked );
71  }
72 
73  iEvent.put(std::move(patTriggerObjectsStandAloneUnpacked) );
74 }
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:234
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
static const HistoName names[]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
static std::string const triggerResults
Definition: EdmProvDump.cc:41
const edm::EDGetTokenT< TriggerObjectStandAloneCollection > patTriggerObjectsStandAloneToken_
const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
def move(src, dest)
Definition: eostools.py:510
Analysis-level trigger object class (stand-alone)

Member Data Documentation

const edm::EDGetTokenT< TriggerObjectStandAloneCollection > pat::PATTriggerObjectStandAloneUnpacker::patTriggerObjectsStandAloneToken_
private

Definition at line 39 of file PATTriggerObjectStandAloneUnpacker.cc.

Referenced by produce().

const edm::EDGetTokenT< edm::TriggerResults > pat::PATTriggerObjectStandAloneUnpacker::triggerResultsToken_
private

Definition at line 40 of file PATTriggerObjectStandAloneUnpacker.cc.

Referenced by produce().