CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
HitTripletEDProducerT< T_HitTripletGenerator > Class Template Reference

#include <HitTripletEDProducerT.h>

Inheritance diagram for HitTripletEDProducerT< T_HitTripletGenerator >:
edm::stream::EDProducer<>

Public Member Functions

 HitTripletEDProducerT (const edm::ParameterSet &iConfig)
 
void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
 ~HitTripletEDProducerT () override=default
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

edm::EDGetTokenT< IntermediateHitDoubletsdoubletToken_
 
std::unique_ptr< hitTripletEDProducerT::ImplBaseimpl_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

template<typename T_HitTripletGenerator>
class HitTripletEDProducerT< T_HitTripletGenerator >

Definition at line 28 of file HitTripletEDProducerT.h.

Constructor & Destructor Documentation

◆ HitTripletEDProducerT()

template<typename T_HitTripletGenerator >
HitTripletEDProducerT< T_HitTripletGenerator >::HitTripletEDProducerT ( const edm::ParameterSet iConfig)

Definition at line 293 of file HitTripletEDProducerT.h.

294  : doubletToken_(consumes<IntermediateHitDoublets>(iConfig.getParameter<edm::InputTag>("doublets"))) {
295  const bool produceSeedingHitSets = iConfig.getParameter<bool>("produceSeedingHitSets");
296  const bool produceIntermediateHitTriplets = iConfig.getParameter<bool>("produceIntermediateHitTriplets");
297 
298  auto iC = consumesCollector();
299 
300  using namespace hitTripletEDProducerT;
301 
303  impl_ = std::make_unique<Impl<T_HitTripletGenerator, ImplSeedingHitSets, ImplIntermediateHitTriplets>>(iConfig, iC);
304  else if (produceSeedingHitSets)
305  impl_ = std::make_unique<Impl<T_HitTripletGenerator, ImplSeedingHitSets, DoNothing>>(iConfig, iC);
307  impl_ = std::make_unique<Impl<T_HitTripletGenerator, DoNothing, ImplIntermediateHitTriplets>>(iConfig, iC);
308  else
309  throw cms::Exception("Configuration")
310  << "HitTripletEDProducerT requires either produceIntermediateHitTriplets or produceSeedingHitSets to be True. "
311  "If neither are needed, just remove this module from your sequence/path as it doesn't do anything useful";
312 
313  impl_->produces(producesCollector());
314 }

References Exception, edm::ParameterSet::getParameter(), HitTripletEDProducerT< T_HitTripletGenerator >::impl_, HLT_FULL_cff::produceIntermediateHitTriplets, and HLT_FULL_cff::produceSeedingHitSets.

◆ ~HitTripletEDProducerT()

template<typename T_HitTripletGenerator >
HitTripletEDProducerT< T_HitTripletGenerator >::~HitTripletEDProducerT ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

template<typename T_HitTripletGenerator >
void HitTripletEDProducerT< T_HitTripletGenerator >::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 317 of file HitTripletEDProducerT.h.

317  {
319 
320  desc.add<edm::InputTag>("doublets", edm::InputTag("hitPairEDProducer"));
321  desc.add<bool>("produceSeedingHitSets", false);
322  desc.add<bool>("produceIntermediateHitTriplets", false);
323 
325 
326  auto label = T_HitTripletGenerator::fillDescriptionsLabel() + std::string("EDProducerDefault");
327  descriptions.add(label, desc);
328 }

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, fillDescriptions(), HLT_FULL_cff::InputTag, label, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ produce()

template<typename T_HitTripletGenerator >
void HitTripletEDProducerT< T_HitTripletGenerator >::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 331 of file HitTripletEDProducerT.h.

331  {
333  iEvent.getByToken(doubletToken_, hdoublets);
334  const auto& regionDoublets = *hdoublets;
335 
336  const SeedingLayerSetsHits& seedingLayerHits = regionDoublets.seedingLayerHits();
337  if (seedingLayerHits.numberOfLayersInSet() < 3) {
338  throw cms::Exception("LogicError")
339  << "HitTripletEDProducerT expects SeedingLayerSetsHits::numberOfLayersInSet() to be >= 3, got "
340  << seedingLayerHits.numberOfLayersInSet()
341  << ". This is likely caused by a configuration error of this module, HitPairEDProducer, or "
342  "SeedingLayersEDProducer.";
343  }
344 
345  impl_->produce(regionDoublets, iEvent, iSetup);
346 }

References HitTripletEDProducerT< T_HitTripletGenerator >::doubletToken_, Exception, iEvent, HitTripletEDProducerT< T_HitTripletGenerator >::impl_, and SeedingLayerSetsHits::numberOfLayersInSet().

Member Data Documentation

◆ doubletToken_

template<typename T_HitTripletGenerator >
edm::EDGetTokenT<IntermediateHitDoublets> HitTripletEDProducerT< T_HitTripletGenerator >::doubletToken_
private

◆ impl_

template<typename T_HitTripletGenerator >
std::unique_ptr<hitTripletEDProducerT::ImplBase> HitTripletEDProducerT< T_HitTripletGenerator >::impl_
private
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:85964
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
SeedingLayerSetsHits
Definition: SeedingLayerSetsHits.h:18
edm::Handle
Definition: AssociativeIterator.h:50
HitTripletEDProducerT::doubletToken_
edm::EDGetTokenT< IntermediateHitDoublets > doubletToken_
Definition: HitTripletEDProducerT.h:38
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
SeedingLayerSetsHits::numberOfLayersInSet
unsigned short numberOfLayersInSet() const
Get number of layers in each SeedingLayerSets.
Definition: SeedingLayerSetsHits.h:197
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HLT_FULL_cff.produceIntermediateHitTriplets
produceIntermediateHitTriplets
Definition: HLT_FULL_cff.py:47122
iEvent
int iEvent
Definition: GenABIO.cc:224
HitTripletEDProducerT::impl_
std::unique_ptr< hitTripletEDProducerT::ImplBase > impl_
Definition: HitTripletEDProducerT.h:40
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
HLT_FULL_cff.produceSeedingHitSets
produceSeedingHitSets
Definition: HLT_FULL_cff.py:9913
Exception
Definition: hltDiff.cc:246
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
hitTripletEDProducerT
Definition: HitTripletEDProducerT.h:23
edm::InputTag
Definition: InputTag.h:15
label
const char * label
Definition: PFTauDecayModeTools.cc:11