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
 
 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< IntermediateHitDoubletsdoubletToken_
 
std::unique_ptr< hitTripletEDProducerT::ImplBaseimpl_
 

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

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.

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

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 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::unique_ptr< hitTripletEDProducerT::ImplBase > impl_
edm::EDGetTokenT< IntermediateHitDoublets > doubletToken_

◆ ~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.

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

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 }
char const * label
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ 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.

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

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 }
std::unique_ptr< hitTripletEDProducerT::ImplBase > impl_
int iEvent
Definition: GenABIO.cc:224
unsigned short numberOfLayersInSet() const
Get number of layers in each SeedingLayerSets.
edm::EDGetTokenT< IntermediateHitDoublets > doubletToken_

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