CMS 3D CMS Logo

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

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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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
 

Detailed Description

Definition at line 30 of file L1TTwinMuxProducer.cc.

Constructor & Destructor Documentation

◆ L1TTwinMuxProducer()

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

Definition at line 44 of file L1TTwinMuxProducer.cc.

44  {
45  //m_l1tma = new L1TTwinMuxAlgorithm();
46  // std::unique_ptr<L1TTwinMuxAlgorithm> m_l1tma(new L1TTwinMuxAlgorithm());
47 
48  m_dtdigi = consumes<L1MuDTChambPhContainer>(pset.getParameter<edm::InputTag>("DTDigi_Source"));
49  m_dtthetadigi = consumes<L1MuDTChambThContainer>(pset.getParameter<edm::InputTag>("DTThetaDigi_Source"));
50  m_rpcsource = consumes<RPCDigiCollection>(pset.getParameter<edm::InputTag>("RPC_Source"));
51 
52  produces<L1MuDTChambPhContainer>();
53  produces<L1MuDTChambThContainer>();
54 }

References muonDTDigis_cfi::pset.

◆ ~L1TTwinMuxProducer()

L1TTwinMuxProducer::~L1TTwinMuxProducer ( )
inlineoverride

Definition at line 33 of file L1TTwinMuxProducer.cc.

33 {}

Member Function Documentation

◆ produce()

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 56 of file L1TTwinMuxProducer.cc.

56  {
57  std::unique_ptr<L1TTwinMuxAlgorithm> m_l1tma(new L1TTwinMuxAlgorithm());
59  const L1TTwinMuxParamsRcd& tmParamsRcd = c.get<L1TTwinMuxParamsRcd>();
60  tmParamsRcd.get(tmParamsHandle);
61  const L1TTwinMuxParams& tmParams = *tmParamsHandle.product();
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  e.getByToken(m_dtdigi, phiDigis);
77  e.getByToken(m_dtthetadigi, thetaDigis);
78 
80  e.getByToken(m_rpcsource, rpcDigis);
81 
82  if (!phiDigis.isValid()) {
83  edm::LogWarning("Inconsistent digis") << "input DT phi digis not valid";
84  }
85 
86  //std::unique_ptr<L1MuDTChambPhContainer> l1ttmp(new L1MuDTChambPhContainer);
87  auto l1ttmp = std::make_unique<L1MuDTChambPhContainer>();
88  m_l1tma->run(phiDigis, thetaDigis, rpcDigis, c);
89  *l1ttmp = m_l1tma->get_ph_tm_output();
90  //null transfer of theta digis
91  auto l1ttmth = std::make_unique<L1MuDTChambThContainer>();
92  const std::vector<L1MuDTChambThDigi>* theta = thetaDigis->getContainer();
93  l1ttmth->setContainer(*theta);
94 
95  e.put(std::move(l1ttmp));
96  e.put(std::move(l1ttmth));
97 }

References HltBtagPostValidation_cff::c, MillePedeFileConverter_cfg::e, edm::eventsetup::EventSetupRecordImplementation< T >::get(), L1TTwinMuxParams::get_UseOnlyDT(), L1TTwinMuxParams::get_UseOnlyRPC(), L1MuDTChambThContainer::getContainer(), edm::HandleBase::isValid(), eostools::move(), and theta().

Member Data Documentation

◆ m_dtdigi

edm::EDGetToken L1TTwinMuxProducer::m_dtdigi
private

Definition at line 39 of file L1TTwinMuxProducer.cc.

◆ m_dtthetadigi

edm::EDGetToken L1TTwinMuxProducer::m_dtthetadigi
private

Definition at line 39 of file L1TTwinMuxProducer.cc.

◆ m_rpcsource

edm::EDGetToken L1TTwinMuxProducer::m_rpcsource
private

Definition at line 39 of file L1TTwinMuxProducer.cc.

◆ tmParamsHandle

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

Event Setup Handler.

Definition at line 41 of file L1TTwinMuxProducer.cc.

edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
L1TTwinMuxProducer::m_rpcsource
edm::EDGetToken m_rpcsource
Definition: L1TTwinMuxProducer.cc:39
L1TTwinMuxParams::get_UseOnlyRPC
int get_UseOnlyRPC() const
Definition: L1TTwinMuxParams.h:60
L1TTwinMuxProducer::m_dtdigi
edm::EDGetToken m_dtdigi
Definition: L1TTwinMuxProducer.cc:39
edm::Handle< L1MuDTChambPhContainer >
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
edm::LogWarning
Definition: MessageLogger.h:141
L1TTwinMuxProducer::m_dtthetadigi
edm::EDGetToken m_dtthetadigi
Definition: L1TTwinMuxProducer.cc:39
L1MuDTChambThContainer::getContainer
The_Container const * getContainer() const
Definition: L1MuDTChambThContainer.cc:41
L1TTwinMuxParamsRcd
Definition: L1TTwinMuxParamsRcd.h:14
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
L1TTwinMuxAlgorithm
Definition: L1TTwinMuxAlgorithm.h:33
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::eventsetup::EventSetupRecordImplementation::get
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
Definition: EventSetupRecordImplementation.h:74
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
L1TTwinMuxParams::get_UseOnlyDT
int get_UseOnlyDT() const
Definition: L1TTwinMuxParams.h:63
edm::InputTag
Definition: InputTag.h:15
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
L1TTwinMuxProducer::tmParamsHandle
edm::ESHandle< L1TTwinMuxParams > tmParamsHandle
Event Setup Handler.
Definition: L1TTwinMuxProducer.cc:41
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
L1TTwinMuxParams
Definition: L1TTwinMuxParams.h:19