CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
MergedTrackstersProducer Class Reference
Inheritance diagram for MergedTrackstersProducer:
edm::stream::EDProducer<>

Public Member Functions

 MergedTrackstersProducer (const edm::ParameterSet &ps)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 ~MergedTrackstersProducer () override
 
- Public Member Functions inherited from edm::stream::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
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

edm::EDGetTokenT< std::vector< Trackster > > egamma_tracksters_token_
 
edm::EDGetTokenT< std::vector< Trackster > > general_tracksters_token_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 16 of file MergedTrackstersProducer.cc.

Constructor & Destructor Documentation

◆ MergedTrackstersProducer()

MergedTrackstersProducer::MergedTrackstersProducer ( const edm::ParameterSet ps)
explicit

Definition at line 29 of file MergedTrackstersProducer.cc.

31  consumes<std::vector<ticl::Trackster>>(ps.getParameter<edm::InputTag>("egamma_tracksters"))),
33  consumes<std::vector<ticl::Trackster>>(ps.getParameter<edm::InputTag>("had_tracksters"))) {
34  produces<std::vector<Trackster>>();
35 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< std::vector< Trackster > > egamma_tracksters_token_
edm::EDGetTokenT< std::vector< Trackster > > general_tracksters_token_

◆ ~MergedTrackstersProducer()

MergedTrackstersProducer::~MergedTrackstersProducer ( )
inlineoverride

Definition at line 19 of file MergedTrackstersProducer.cc.

19 {};

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 51 of file MergedTrackstersProducer.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and ProducerED_cfi::InputTag.

51  {
53  desc.add<edm::InputTag>("egamma_tracksters", edm::InputTag("ticlTrackstersCLUE3DEM"));
54  desc.add<edm::InputTag>("had_tracksters", edm::InputTag("ticlTrackstersCLUE3DHAD"));
55  descriptions.add("mergedTrackstersProducer", desc);
56 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

void MergedTrackstersProducer::produce ( edm::Event evt,
const edm::EventSetup es 
)
override

Definition at line 37 of file MergedTrackstersProducer.cc.

References egamma_tracksters_token_, general_tracksters_token_, edm::Event::get(), eostools::move(), and edm::Event::put().

37  {
38  auto resultTracksters = std::make_unique<std::vector<Trackster>>();
39  auto const &egamma_tracksters = evt.get(egamma_tracksters_token_);
40  auto const &had_tracksters = evt.get(general_tracksters_token_);
41  for (auto const &eg_trackster : egamma_tracksters) {
42  resultTracksters->push_back(eg_trackster);
43  }
44  for (auto const &had_trackster : had_tracksters) {
45  resultTracksters->push_back(had_trackster);
46  }
47 
48  evt.put(std::move(resultTracksters));
49 }
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
edm::EDGetTokenT< std::vector< Trackster > > egamma_tracksters_token_
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:344
edm::EDGetTokenT< std::vector< Trackster > > general_tracksters_token_
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ egamma_tracksters_token_

edm::EDGetTokenT<std::vector<Trackster> > MergedTrackstersProducer::egamma_tracksters_token_
private

Definition at line 24 of file MergedTrackstersProducer.cc.

Referenced by produce().

◆ general_tracksters_token_

edm::EDGetTokenT<std::vector<Trackster> > MergedTrackstersProducer::general_tracksters_token_
private

Definition at line 26 of file MergedTrackstersProducer.cc.

Referenced by produce().