CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
InputDataProducer Class Reference

#include <L1Trigger/VertexFinder/plugins/InputDataProducer.cc>

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

Public Member Functions

 InputDataProducer (const edm::ParameterSet &)
 
 ~InputDataProducer () override
 
- Public Member Functions inherited from edm::global::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- 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 ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
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, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
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 & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Types

typedef edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > > DetSetVec
 

Private Member Functions

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

Private Attributes

const edm::EDGetTokenT< edm::View< reco::GenParticle > > genParticlesToken_
 
const edm::EDGetTokenT< edm::HepMCProducthepMCToken_
 
const std::string outputCollectionName_
 
l1tVertexFinder::AnalysisSettings settings_
 
const edm::EDGetTokenT< DetSetVecstubToken_
 
const edm::EDGetTokenT< edm::ValueMap< l1tVertexFinder::Stub > > stubValueMapToken_
 
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtGeomToken_
 
const edm::EDGetTokenT< edm::View< TrackingParticle > > tpToken_
 
const edm::EDGetTokenT< edm::ValueMap< l1tVertexFinder::TP > > tpValueMapToken_
 
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Description: Produces an InputData object which stores generator level information for further analysis

Implementation: [Notes on implementation]

Definition at line 45 of file InputDataProducer.cc.

Member Typedef Documentation

◆ DetSetVec

Definition at line 56 of file InputDataProducer.cc.

Constructor & Destructor Documentation

◆ InputDataProducer()

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

Definition at line 74 of file InputDataProducer.cc.

References outputCollectionName_.

75  : outputCollectionName_(iConfig.getParameter<std::string>("outputCollectionName")),
76  settings_(iConfig),
77  hepMCToken_(consumes<edm::HepMCProduct>(iConfig.getParameter<edm::InputTag>("hepMCInputTag"))),
79  consumes<edm::View<reco::GenParticle>>(iConfig.getParameter<edm::InputTag>("genParticleInputTag"))),
83  stubToken_(consumes<DetSetVec>(iConfig.getParameter<edm::InputTag>("stubInputTag"))),
84  tTopoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd>(edm::ESInputTag("", ""))),
85  tGeomToken_(esConsumes<TrackerGeometry, TrackerDigiGeometryRecord>(edm::ESInputTag("", ""))) {
86  // Define EDM output to be written to file (if required)
87  produces<l1tVertexFinder::InputData>(outputCollectionName_);
88 
89  //now do what ever other initialization is needed
90 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const edm::EDGetTokenT< edm::View< reco::GenParticle > > genParticlesToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tGeomToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
l1tVertexFinder::AnalysisSettings settings_
const edm::EDGetTokenT< edm::HepMCProduct > hepMCToken_
const edm::EDGetTokenT< edm::ValueMap< l1tVertexFinder::TP > > tpValueMapToken_
const edm::EDGetTokenT< DetSetVec > stubToken_
const edm::EDGetTokenT< edm::View< TrackingParticle > > tpToken_
const std::string outputCollectionName_

◆ ~InputDataProducer()

InputDataProducer::~InputDataProducer ( )
override

Definition at line 92 of file InputDataProducer.cc.

92 {}

Member Function Documentation

◆ fillDescriptions()

void InputDataProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 115 of file InputDataProducer.cc.

References edm::ConfigurationDescriptions::addDefault(), and submitPVResolutionJobs::desc.

115  {
116  //The following says we do not know what parameters are allowed so do no validation
117  // Please change this to state exactly what you do use, even if it is no parameters
119  desc.setUnknown();
120  descriptions.addDefault(desc);
121 }
void addDefault(ParameterSetDescription const &psetDescription)

◆ produce()

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

Implements edm::global::EDProducerBase.

Definition at line 99 of file InputDataProducer.cc.

References genParticlesToken_, hepMCToken_, iEvent, eostools::move(), outputCollectionName_, settings_, stubToken_, tGeomToken_, tpToken_, tpValueMapToken_, and tTopoToken_.

99  {
100  std::unique_ptr<l1tVertexFinder::InputData> product = std::make_unique<l1tVertexFinder::InputData>(iEvent,
101  iSetup,
102  settings_,
103  hepMCToken_,
105  tpToken_,
107  stubToken_,
108  tTopoToken_,
109  tGeomToken_);
110 
111  iEvent.put(std::move(product), outputCollectionName_);
112 }
const edm::EDGetTokenT< edm::View< reco::GenParticle > > genParticlesToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tGeomToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
l1tVertexFinder::AnalysisSettings settings_
int iEvent
Definition: GenABIO.cc:224
const edm::EDGetTokenT< edm::HepMCProduct > hepMCToken_
const edm::EDGetTokenT< edm::ValueMap< l1tVertexFinder::TP > > tpValueMapToken_
const edm::EDGetTokenT< DetSetVec > stubToken_
const edm::EDGetTokenT< edm::View< TrackingParticle > > tpToken_
const std::string outputCollectionName_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ genParticlesToken_

const edm::EDGetTokenT<edm::View<reco::GenParticle> > InputDataProducer::genParticlesToken_
private

Definition at line 62 of file InputDataProducer.cc.

Referenced by produce().

◆ hepMCToken_

const edm::EDGetTokenT<edm::HepMCProduct> InputDataProducer::hepMCToken_
private

Definition at line 61 of file InputDataProducer.cc.

Referenced by produce().

◆ outputCollectionName_

const std::string InputDataProducer::outputCollectionName_
private

Definition at line 59 of file InputDataProducer.cc.

Referenced by InputDataProducer(), and produce().

◆ settings_

l1tVertexFinder::AnalysisSettings InputDataProducer::settings_
private

Definition at line 60 of file InputDataProducer.cc.

Referenced by produce().

◆ stubToken_

const edm::EDGetTokenT<DetSetVec> InputDataProducer::stubToken_
private

Definition at line 65 of file InputDataProducer.cc.

Referenced by produce().

◆ stubValueMapToken_

const edm::EDGetTokenT<edm::ValueMap<l1tVertexFinder::Stub> > InputDataProducer::stubValueMapToken_
private

Definition at line 66 of file InputDataProducer.cc.

◆ tGeomToken_

const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> InputDataProducer::tGeomToken_
private

Definition at line 68 of file InputDataProducer.cc.

Referenced by produce().

◆ tpToken_

const edm::EDGetTokenT<edm::View<TrackingParticle> > InputDataProducer::tpToken_
private

Definition at line 63 of file InputDataProducer.cc.

Referenced by produce().

◆ tpValueMapToken_

const edm::EDGetTokenT<edm::ValueMap<l1tVertexFinder::TP> > InputDataProducer::tpValueMapToken_
private

Definition at line 64 of file InputDataProducer.cc.

Referenced by produce().

◆ tTopoToken_

const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> InputDataProducer::tTopoToken_
private

Definition at line 67 of file InputDataProducer.cc.

Referenced by produce().