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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
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<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
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)
 
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 ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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)
 
void resetItemsToGetFrom (BranchType iType)
 

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>()) {}
const edm::EDPutTokenT< L1MuDTChambPhContainer > m_phContainerToken
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const edm::EDGetTokenT< L1MuDTChambPhContainer > m_dtdigi
const edm::ESGetToken< RPCGeometry, MuonGeometryRecord > m_rpcGeometryToken
const edm::ESGetToken< L1TTwinMuxParams, L1TTwinMuxParamsRcd > m_tmParamsToken
Event Setup Handler.
const edm::EDPutTokenT< L1MuDTChambThContainer > m_thContainerToken
const edm::EDGetTokenT< RPCDigiCollection > m_rpcsource
const edm::EDGetTokenT< L1MuDTChambThContainer > m_dtthetadigi

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

References HltBtagPostValidation_cff::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().

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 }
const edm::EDPutTokenT< L1MuDTChambPhContainer > m_phContainerToken
The_Container const * getContainer() const
const edm::EDGetTokenT< L1MuDTChambPhContainer > m_dtdigi
L1MuDTChambPhContainer get_ph_tm_output()
Return Output PhContainer.
const edm::ESGetToken< RPCGeometry, MuonGeometryRecord > m_rpcGeometryToken
const edm::ESGetToken< L1TTwinMuxParams, L1TTwinMuxParamsRcd > m_tmParamsToken
Event Setup Handler.
const edm::EDPutTokenT< L1MuDTChambThContainer > m_thContainerToken
void setContainer(The_Container inputSegments)
bool isValid() const
Definition: HandleBase.h:70
Log< level::Warning, false > LogWarning
const edm::EDGetTokenT< RPCDigiCollection > m_rpcsource
Geom::Theta< T > theta() const
def move(src, dest)
Definition: eostools.py:511
const edm::EDGetTokenT< L1MuDTChambThContainer > m_dtthetadigi
void run(edm::Handle< L1MuDTChambPhContainer > phiDigis, edm::Handle< L1MuDTChambThContainer > thetaDigis, edm::Handle< RPCDigiCollection > rpcDigis, const L1TTwinMuxParams &, const RPCGeometry &)

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().