CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1TEGMultiMerger::InstanceMerger< T > Class Template Reference

Public Member Functions

 InstanceMerger (L1TEGMultiMerger *prod, const edm::ParameterSet &conf)
 
void produce (edm::Event &iEvent) const
 

Private Member Functions

template<class TT >
void populate (std::unique_ptr< TT > &out, const edm::Handle< TT > &in) const
 
void populate (std::unique_ptr< BXVector< l1t::EGamma >> &out, const edm::Handle< BXVector< l1t::EGamma >> &in) const
 

Private Attributes

std::string instanceLabel_
 
std::vector< edm::EDGetTokenT< T > > tokens_
 

Detailed Description

template<class T>
class L1TEGMultiMerger::InstanceMerger< T >

Definition at line 27 of file L1TEGMultiMerger.cc.

Constructor & Destructor Documentation

◆ InstanceMerger()

template<class T >
L1TEGMultiMerger::InstanceMerger< T >::InstanceMerger ( L1TEGMultiMerger prod,
const edm::ParameterSet conf 
)
inline

Definition at line 29 of file L1TEGMultiMerger.cc.

References edm::ParameterSet::getParameter(), L1TEGMultiMerger::InstanceMerger< T >::instanceLabel_, dumpMFGeometry_cfg::prod, and L1TEGMultiMerger::InstanceMerger< T >::tokens_.

30  : instanceLabel_(conf.getParameter<std::string>("instance")) {
31  for (const auto& producer_tag : conf.getParameter<std::vector<edm::InputTag>>("pfProducers")) {
32  tokens_.push_back(
33  prod->consumes<T>(edm::InputTag(producer_tag.label(), producer_tag.instance(), producer_tag.process())));
34  }
35  // FIXME: move this outside
36  prod->produces<T>(instanceLabel_);
37  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::vector< edm::EDGetTokenT< T > > tokens_
long double T

Member Function Documentation

◆ populate() [1/2]

template<class T >
template<class TT >
void L1TEGMultiMerger::InstanceMerger< T >::populate ( std::unique_ptr< TT > &  out,
const edm::Handle< TT > &  in 
) const
inlineprivate

Definition at line 51 of file L1TEGMultiMerger.cc.

References recoMuon::in, and MillePedeFileConverter_cfg::out.

Referenced by L1TEGMultiMerger::InstanceMerger< T >::produce().

51  {
52  out->insert(out->end(), in->begin(), in->end());
53  }

◆ populate() [2/2]

template<class T >
void L1TEGMultiMerger::InstanceMerger< T >::populate ( std::unique_ptr< BXVector< l1t::EGamma >> &  out,
const edm::Handle< BXVector< l1t::EGamma >> &  in 
) const
inlineprivate

Definition at line 55 of file L1TEGMultiMerger.cc.

References nano_mu_digi_cff::bx, recoMuon::in, and MillePedeFileConverter_cfg::out.

55  {
56  for (int bx = in->getFirstBX(); bx <= in->getLastBX(); bx++) {
57  for (auto egee_itr = in->begin(bx); egee_itr != in->end(bx); egee_itr++) {
58  out->push_back(bx, *egee_itr);
59  }
60  }
61  }

◆ produce()

template<class T >
void L1TEGMultiMerger::InstanceMerger< T >::produce ( edm::Event iEvent) const
inline

Member Data Documentation

◆ instanceLabel_

template<class T >
std::string L1TEGMultiMerger::InstanceMerger< T >::instanceLabel_
private

◆ tokens_

template<class T >
std::vector<edm::EDGetTokenT<T> > L1TEGMultiMerger::InstanceMerger< T >::tokens_
private