CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1TTwinMuxProducer Class Reference
Inheritance diagram for L1TTwinMuxProducer:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1TTwinMuxProducer (const edm::ParameterSet &pset)
 
void produce (edm::Event &e, const edm::EventSetup &c) override
 
 ~L1TTwinMuxProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::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
 
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)
 
virtual ~ProducerBase () noexcept(false)
 
- 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
 
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::vector< ModuleDescription const * > &modules, 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
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

edm::EDGetToken m_dtdigi
 
edm::EDGetToken m_dtthetadigi
 
edm::EDGetToken m_rpcsource
 
edm::ESHandle< L1TTwinMuxParamstmParamsHandle
 Event Setup Handler. More...
 

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
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
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
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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

Definition at line 31 of file L1TTwinMuxProducer.cc.

Constructor & Destructor Documentation

L1TTwinMuxProducer::L1TTwinMuxProducer ( const edm::ParameterSet pset)

Definition at line 49 of file L1TTwinMuxProducer.cc.

References edm::ParameterSet::getParameter().

49  {
50 //m_l1tma = new L1TTwinMuxAlgorithm();
51 // std::unique_ptr<L1TTwinMuxAlgorithm> m_l1tma(new L1TTwinMuxAlgorithm());
52 
53 m_dtdigi = consumes<L1MuDTChambPhContainer>(pset.getParameter<edm::InputTag>("DTDigi_Source"));
54 m_dtthetadigi = consumes<L1MuDTChambThContainer>(pset.getParameter<edm::InputTag>("DTThetaDigi_Source"));
55 m_rpcsource = consumes<RPCDigiCollection>(pset.getParameter<edm::InputTag>("RPC_Source"));
56 
57 produces<L1MuDTChambPhContainer>();
58 produces<L1MuDTChambThContainer>();
59 
60 }
T getParameter(std::string const &) const
edm::EDGetToken m_dtthetadigi
edm::EDGetToken m_dtdigi
edm::EDGetToken m_rpcsource
L1TTwinMuxProducer::~L1TTwinMuxProducer ( )
inlineoverride

Definition at line 35 of file L1TTwinMuxProducer.cc.

References EnergyCorrector::c, and MillePedeFileConverter_cfg::e.

35 {}

Member Function Documentation

void L1TTwinMuxProducer::produce ( edm::Event e,
const edm::EventSetup c 
)
override

Check consistency of the paramters

Only RPC: the emulator's output consist from rpc->dy primitives only

Only DT: the emulator's output consist from dt primitives only

—Check consistency of the paramters

Definition at line 62 of file L1TTwinMuxProducer.cc.

References DEFINE_FWK_MODULE, edm::EventSetup::get(), edm::eventsetup::EventSetupRecord::get(), L1TTwinMuxParams::get_UseOnlyDT(), L1TTwinMuxParams::get_UseOnlyRPC(), edm::Event::getByToken(), L1MuDTChambThContainer::getContainer(), edm::HandleBase::isValid(), eostools::move(), edm::Event::put(), and theta().

62  {
63 
64  std::unique_ptr<L1TTwinMuxAlgorithm> m_l1tma(new L1TTwinMuxAlgorithm());
66  const L1TTwinMuxParamsRcd& tmParamsRcd = c.get<L1TTwinMuxParamsRcd>();
67  tmParamsRcd.get(tmParamsHandle);
68  const L1TTwinMuxParams& tmParams = *tmParamsHandle.product();
69 
71  bool onlyRPC = tmParams.get_UseOnlyRPC();
73  bool onlyDT = tmParams.get_UseOnlyDT();
74 
75  if(onlyDT && onlyRPC) {edm::LogWarning("Inconsistent configuration")<<"onlyRPC and onlyDT options"; return;}
77 
80  e.getByToken(m_dtdigi, phiDigis);
81  e.getByToken(m_dtthetadigi, thetaDigis);
82 
84  e.getByToken(m_rpcsource, rpcDigis);
85 
86  if (! phiDigis.isValid()){
87  edm::LogWarning("Inconsistent digis")<<"input DT phi digis not valid";
88  }
89 
90 
91 
92  //std::unique_ptr<L1MuDTChambPhContainer> l1ttmp(new L1MuDTChambPhContainer);
93  auto l1ttmp = std::make_unique<L1MuDTChambPhContainer>();
94  m_l1tma->run(phiDigis, thetaDigis, rpcDigis,c);
95  *l1ttmp = m_l1tma->get_ph_tm_output();
96  //null transfer of theta digis
97  auto l1ttmth = std::make_unique<L1MuDTChambThContainer>();
98  const std::vector< L1MuDTChambThDigi>* theta=thetaDigis->getContainer();
99  l1ttmth->setContainer(*theta);
100 
101  e.put(std::move(l1ttmp));
102  e.put(std::move(l1ttmth));
103 }
The_Container const * getContainer() const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:136
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
Geom::Theta< T > theta() const
edm::ESHandle< L1TTwinMuxParams > tmParamsHandle
Event Setup Handler.
void get(HolderT &iHolder) const
edm::EDGetToken m_dtthetadigi
bool isValid() const
Definition: HandleBase.h:74
edm::EDGetToken m_dtdigi
const T & get() const
Definition: EventSetup.h:58
int get_UseOnlyDT() const
int get_UseOnlyRPC() const
T const * product() const
Definition: ESHandle.h:86
def move(src, dest)
Definition: eostools.py:510
edm::EDGetToken m_rpcsource

Member Data Documentation

edm::EDGetToken L1TTwinMuxProducer::m_dtdigi
private

Definition at line 40 of file L1TTwinMuxProducer.cc.

edm::EDGetToken L1TTwinMuxProducer::m_dtthetadigi
private

Definition at line 40 of file L1TTwinMuxProducer.cc.

edm::EDGetToken L1TTwinMuxProducer::m_rpcsource
private

Definition at line 40 of file L1TTwinMuxProducer.cc.

edm::ESHandle< L1TTwinMuxParams > L1TTwinMuxProducer::tmParamsHandle
private

Event Setup Handler.

Definition at line 42 of file L1TTwinMuxProducer.cc.