Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:49

0001 ///
0002 /// \class l1t::MicroGMTRankPtQualLUTFactory
0003 ///
0004 /// \author: Thomas Reis
0005 ///
0006 //
0007 // This class implements the RankPtQualLUT factory. Based on the firmware
0008 // version it selects the appropriate concrete implementation.
0009 //
0010 
0011 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0012 
0013 #include "L1Trigger/L1TMuon/interface/MicroGMTLUTFactories.h"
0014 
0015 using namespace edm;
0016 
0017 namespace l1t {
0018   MicroGMTRankPtQualLUTFactory::ReturnType MicroGMTRankPtQualLUTFactory::create(const std::string& filename,
0019                                                                                 const int fwVersion,
0020                                                                                 const unsigned ptFactor,
0021                                                                                 const unsigned qualFactor) {
0022     ReturnType p;
0023 
0024     if (fwVersion >= 1) {
0025       p = std::make_shared<l1t::MicroGMTRankPtQualLUT>(filename, ptFactor, qualFactor);
0026     } else {
0027       LogError("MicroGMTRankPtQualLUTFactory")
0028           << "Invalid firmware version requested: 0x" << std::hex << fwVersion << std::dec;
0029     }
0030     return p;
0031   }
0032 
0033   MicroGMTRankPtQualLUTFactory::ReturnType MicroGMTRankPtQualLUTFactory::create(l1t::LUT* lut, const int fwVersion) {
0034     ReturnType p;
0035 
0036     if (fwVersion >= 1) {
0037       p = std::make_shared<l1t::MicroGMTRankPtQualLUT>(lut);
0038     } else {
0039       LogError("MicroGMTRankPtQualLUTFactory")
0040           << "Invalid firmware version requested: 0x" << std::hex << fwVersion << std::dec;
0041     }
0042     return p;
0043   }
0044 }  // namespace l1t