CMS 3D CMS Logo

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

Public Member Functions

 L1TTwinMuxProducer (const edm::ParameterSet &pset)
 
void produce (edm::StreamID, edm::Event &e, const edm::EventSetup &c) const override
 
 ~L1TTwinMuxProducer () 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > 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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, 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::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

const edm::EDGetTokenT< L1MuDTChambPhContainerm_dtdigi
 
const edm::EDGetTokenT< L1MuDTChambThContainerm_dtthetadigi
 
const edm::EDPutTokenT< L1MuDTChambPhContainerm_phContainerToken
 
const edm::ESGetToken< RPCGeometry, MuonGeometryRecordm_rpcGeometryToken
 
const edm::EDGetTokenT< RPCDigiCollectionm_rpcsource
 
const edm::EDPutTokenT< L1MuDTChambThContainerm_thContainerToken
 
const edm::ESGetToken< L1TTwinMuxParams, L1TTwinMuxParamsRcdm_tmParamsToken
 Event Setup Handler. More...
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase 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::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
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)
 
template<Transition B>
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 (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 32 of file L1TTwinMuxProducer.cc.

Constructor & Destructor Documentation

◆ L1TTwinMuxProducer()

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

Definition at line 50 of file L1TTwinMuxProducer.cc.

51  : m_dtdigi(consumes(pset.getParameter<edm::InputTag>("DTDigi_Source"))),
52  m_dtthetadigi(consumes(pset.getParameter<edm::InputTag>("DTThetaDigi_Source"))),
53  m_rpcsource(consumes(pset.getParameter<edm::InputTag>("RPC_Source"))),
56  m_phContainerToken(produces<L1MuDTChambPhContainer>()),
57  m_thContainerToken(produces<L1MuDTChambThContainer>()) {}

◆ ~L1TTwinMuxProducer()

L1TTwinMuxProducer::~L1TTwinMuxProducer ( )
inlineoverride

Definition at line 35 of file L1TTwinMuxProducer.cc.

35 {}

Member Function Documentation

◆ produce()

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

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

Implements edm::global::EDProducerBase.

Definition at line 59 of file L1TTwinMuxProducer.cc.

59  {
61  auto const& tmParams = c.getData(m_tmParamsToken);
62 
64  bool onlyRPC = tmParams.get_UseOnlyRPC();
66  bool onlyDT = tmParams.get_UseOnlyDT();
67 
68  if (onlyDT && onlyRPC) {
69  edm::LogWarning("Inconsistent configuration") << "onlyRPC and onlyDT options";
70  return;
71  }
73 
74  edm::Handle<L1MuDTChambPhContainer> phiDigis = e.getHandle(m_dtdigi);
75  edm::Handle<L1MuDTChambThContainer> thetaDigis = e.getHandle(m_dtthetadigi);
76 
77  edm::Handle<RPCDigiCollection> rpcDigis = e.getHandle(m_rpcsource);
78 
79  if (!phiDigis.isValid()) {
80  edm::LogWarning("Inconsistent digis") << "input DT phi digis not valid";
81  }
82 
83  auto const& rpcGeometry = c.getData(m_rpcGeometryToken);
84 
85  L1TTwinMuxAlgorithm l1tma;
86  l1tma.run(phiDigis, thetaDigis, rpcDigis, tmParams, rpcGeometry);
87  auto l1ttmp = l1tma.get_ph_tm_output();
88  //null transfer of theta digis
89  L1MuDTChambThContainer l1ttmth;
90  const std::vector<L1MuDTChambThDigi>* theta = thetaDigis->getContainer();
91  l1ttmth.setContainer(*theta);
92 
93  e.emplace(m_phContainerToken, std::move(l1ttmp));
94  e.emplace(m_thContainerToken, std::move(l1ttmth));
95 }

References c, MillePedeFileConverter_cfg::e, L1TTwinMuxAlgorithm::get_ph_tm_output(), L1MuDTChambThContainer::getContainer(), edm::HandleBase::isValid(), m_dtdigi, m_dtthetadigi, m_phContainerToken, m_rpcGeometryToken, m_rpcsource, m_thContainerToken, m_tmParamsToken, eostools::move(), L1TTwinMuxAlgorithm::run(), L1MuDTChambThContainer::setContainer(), and theta().

Member Data Documentation

◆ m_dtdigi

const edm::EDGetTokenT<L1MuDTChambPhContainer> L1TTwinMuxProducer::m_dtdigi
private

Definition at line 39 of file L1TTwinMuxProducer.cc.

Referenced by produce().

◆ m_dtthetadigi

const edm::EDGetTokenT<L1MuDTChambThContainer> L1TTwinMuxProducer::m_dtthetadigi
private

Definition at line 40 of file L1TTwinMuxProducer.cc.

Referenced by produce().

◆ m_phContainerToken

const edm::EDPutTokenT<L1MuDTChambPhContainer> L1TTwinMuxProducer::m_phContainerToken
private

Definition at line 46 of file L1TTwinMuxProducer.cc.

Referenced by produce().

◆ m_rpcGeometryToken

const edm::ESGetToken<RPCGeometry, MuonGeometryRecord> L1TTwinMuxProducer::m_rpcGeometryToken
private

Definition at line 44 of file L1TTwinMuxProducer.cc.

Referenced by produce().

◆ m_rpcsource

const edm::EDGetTokenT<RPCDigiCollection> L1TTwinMuxProducer::m_rpcsource
private

Definition at line 41 of file L1TTwinMuxProducer.cc.

Referenced by produce().

◆ m_thContainerToken

const edm::EDPutTokenT<L1MuDTChambThContainer> L1TTwinMuxProducer::m_thContainerToken
private

Definition at line 47 of file L1TTwinMuxProducer.cc.

Referenced by produce().

◆ m_tmParamsToken

const edm::ESGetToken<L1TTwinMuxParams, L1TTwinMuxParamsRcd> L1TTwinMuxProducer::m_tmParamsToken
private

Event Setup Handler.

Definition at line 43 of file L1TTwinMuxProducer.cc.

Referenced by produce().

L1TTwinMuxProducer::m_tmParamsToken
const edm::ESGetToken< L1TTwinMuxParams, L1TTwinMuxParamsRcd > m_tmParamsToken
Event Setup Handler.
Definition: L1TTwinMuxProducer.cc:43
L1TTwinMuxAlgorithm::get_ph_tm_output
L1MuDTChambPhContainer get_ph_tm_output()
Return Output PhContainer.
Definition: L1TTwinMuxAlgorithm.h:39
edm::Handle< L1MuDTChambPhContainer >
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
L1MuDTChambThContainer::setContainer
void setContainer(The_Container inputSegments)
Definition: L1MuDTChambThContainer.cc:39
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
L1TTwinMuxProducer::m_dtdigi
const edm::EDGetTokenT< L1MuDTChambPhContainer > m_dtdigi
Definition: L1TTwinMuxProducer.cc:39
L1TTwinMuxProducer::m_rpcsource
const edm::EDGetTokenT< RPCDigiCollection > m_rpcsource
Definition: L1TTwinMuxProducer.cc:41
L1MuDTChambThContainer::getContainer
The_Container const * getContainer() const
Definition: L1MuDTChambThContainer.cc:41
L1TTwinMuxProducer::m_rpcGeometryToken
const edm::ESGetToken< RPCGeometry, MuonGeometryRecord > m_rpcGeometryToken
Definition: L1TTwinMuxProducer.cc:44
L1TTwinMuxAlgorithm
Definition: L1TTwinMuxAlgorithm.h:27
L1TTwinMuxProducer::m_dtthetadigi
const edm::EDGetTokenT< L1MuDTChambThContainer > m_dtthetadigi
Definition: L1TTwinMuxProducer.cc:40
eostools.move
def move(src, dest)
Definition: eostools.py:511
L1TTwinMuxProducer::m_phContainerToken
const edm::EDPutTokenT< L1MuDTChambPhContainer > m_phContainerToken
Definition: L1TTwinMuxProducer.cc:46
edm::EDConsumerBase::esConsumes
auto esConsumes()
Definition: EDConsumerBase.h:206
L1TTwinMuxAlgorithm::run
void run(edm::Handle< L1MuDTChambPhContainer > phiDigis, edm::Handle< L1MuDTChambThContainer > thetaDigis, edm::Handle< RPCDigiCollection > rpcDigis, const L1TTwinMuxParams &, const RPCGeometry &)
Definition: L1TTwinMuxAlgorithm.cc:32
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:159
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
L1MuDTChambThContainer
Definition: L1MuDTChambThContainer.h:33
edm::InputTag
Definition: InputTag.h:15
L1TTwinMuxProducer::m_thContainerToken
const edm::EDPutTokenT< L1MuDTChambThContainer > m_thContainerToken
Definition: L1TTwinMuxProducer.cc:47
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37