Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-10 01:53:55

0001 #include "L1Trigger/Phase2L1ParticleFlow/interface/egamma/l2egencoder_ref.h"
0002 
0003 using namespace l1ct;
0004 
0005 #ifdef CMSSW_GIT_HASH
0006 
0007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0008 
0009 l1ct::L2EgEncoderEmulator::L2EgEncoderEmulator(const edm::ParameterSet& pset)
0010     : L2EgEncoderEmulator(pset.getParameter<uint32_t>("nTKELE_OUT"), pset.getParameter<uint32_t>("nTKPHO_OUT")) {}
0011 
0012 #endif
0013 
0014 void L2EgEncoderEmulator::toFirmware(const std::vector<ap_uint<64>>& encoded_in, ap_uint<64> encoded_fw[]) const {
0015   for (unsigned int i = 0; i < nEncodedWords_; i++) {
0016     encoded_fw[i] = (i < encoded_in.size()) ? encoded_in[i] : ap_uint<64>(0);
0017   }
0018 }