CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
 
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)
 
 ~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
< L1MuDTChambPhContainer
m_dtdigi
 
const edm::EDGetTokenT
< L1MuDTChambThContainer
m_dtthetadigi
 
const edm::EDPutTokenT
< L1MuDTChambPhContainer
m_phContainerToken
 
const edm::ESGetToken
< RPCGeometry,
MuonGeometryRecord
m_rpcGeometryToken
 
const edm::EDGetTokenT
< RPCDigiCollection
m_rpcsource
 
const edm::EDPutTokenT
< L1MuDTChambThContainer
m_thContainerToken
 
const edm::ESGetToken
< L1TTwinMuxParams,
L1TTwinMuxParamsRcd
m_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
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< B > consumes (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 () noexcept
 
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...
 
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 ( 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.
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const edm::EDPutTokenT< L1MuDTChambThContainer > m_thContainerToken
const edm::EDGetTokenT< RPCDigiCollection > m_rpcsource
const edm::EDGetTokenT< L1MuDTChambThContainer > m_dtthetadigi
L1TTwinMuxProducer::~L1TTwinMuxProducer ( )
inlineoverride

Definition at line 35 of file L1TTwinMuxProducer.cc.

35 {}

Member Function Documentation

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 edm::Event::emplace(), L1TTwinMuxAlgorithm::get_ph_tm_output(), edm::EventSetup::getData(), edm::Event::getHandle(), 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 
76 
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 
95 }
Geom::Theta< T > theta() const
const edm::EDPutTokenT< L1MuDTChambPhContainer > m_phContainerToken
bool getData(T &iHolder) const
Definition: EventSetup.h:128
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
Definition: Event.h:563
const edm::EDGetTokenT< L1MuDTChambPhContainer > m_dtdigi
def move
Definition: eostools.py:511
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.
bool isValid() const
Definition: HandleBase.h:70
OrphanHandle< PROD > emplace(EDPutTokenT< PROD > token, Args &&...args)
puts a new product
Definition: Event.h:433
const edm::EDPutTokenT< L1MuDTChambThContainer > m_thContainerToken
void setContainer(The_Container inputSegments)
Log< level::Warning, false > LogWarning
const edm::EDGetTokenT< RPCDigiCollection > m_rpcsource
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

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

Definition at line 39 of file L1TTwinMuxProducer.cc.

Referenced by produce().

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

Definition at line 40 of file L1TTwinMuxProducer.cc.

Referenced by produce().

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

Definition at line 46 of file L1TTwinMuxProducer.cc.

Referenced by produce().

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

Definition at line 44 of file L1TTwinMuxProducer.cc.

Referenced by produce().

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

Definition at line 41 of file L1TTwinMuxProducer.cc.

Referenced by produce().

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

Definition at line 47 of file L1TTwinMuxProducer.cc.

Referenced by produce().

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

Event Setup Handler.

Definition at line 43 of file L1TTwinMuxProducer.cc.

Referenced by produce().