Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 ///
0002 /// \class l1t::Stage2Layer2FirmwareFactory
0003 ///
0004 ///
0005 /// \author: Jim Brooke
0006 ///
0007 
0008 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0009 
0010 #include "L1Trigger/L1TCalorimeter/interface/Stage2MainProcessorFirmware.h"
0011 #include "L1Trigger/L1TCalorimeter/interface/Stage2Layer2FirmwareFactory.h"
0012 
0013 #include "L1Trigger/L1TCalorimeter/interface/CaloParamsHelper.h"
0014 
0015 using namespace std;
0016 using namespace edm;
0017 
0018 l1t::Stage2Layer2FirmwareFactory::ReturnType l1t::Stage2Layer2FirmwareFactory::create(unsigned fwv,
0019                                                                                       CaloParamsHelper const* params) {
0020   ReturnType p;
0021   unsigned v = fwv;
0022 
0023   switch (v) {
0024     case 1:
0025       p = ReturnType(new Stage2MainProcessorFirmwareImp1(fwv, params));
0026       break;
0027     default:
0028       // Invalid Firmware, log an error:
0029       LogError("l1t|caloStage2") << "Invalid firmware version requested: " << v << "\n";
0030       break;
0031   }
0032 
0033   return p;
0034 }