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
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
 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 Member Functions

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

Private Attributes

const edm::EDGetTokenT
< TriggerObjectStandAloneCollection
patTriggerObjectsStandAloneToken_
 
const edm::EDGetTokenT
< edm::TriggerResults
triggerResultsToken_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- 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::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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.

33 {};

Member Function Documentation

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

Implements edm::global::EDProducerBase.

Definition at line 57 of file PATTriggerObjectStandAloneUnpacker.cc.

References edm::Event::getByToken(), cscdqm::h::names, patTriggerObjectsStandAloneToken_, edm::Event::put(), edm::Event::triggerNames(), triggerResults, and triggerResultsToken_.

58 {
59  edm::Handle< TriggerObjectStandAloneCollection > patTriggerObjectsStandAlone;
60  iEvent.getByToken( patTriggerObjectsStandAloneToken_, patTriggerObjectsStandAlone );
62  iEvent.getByToken( triggerResultsToken_, triggerResults );
63 
64  std::auto_ptr< TriggerObjectStandAloneCollection > patTriggerObjectsStandAloneUnpacked( new 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( patTriggerObjectsStandAloneUnpacked );
74 }
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:208
static const HistoName names[]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
std::vector< TriggerObjectStandAlone > TriggerObjectStandAloneCollection
Collection of TriggerObjectStandAlone.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:113
static std::string const triggerResults
Definition: EdmProvDump.cc:40
const edm::EDGetTokenT< TriggerObjectStandAloneCollection > patTriggerObjectsStandAloneToken_
const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
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().