CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Stage1Layer2FirmwareFactory.cc
Go to the documentation of this file.
1 
8 //
9 // This class implments the firmware factory. Based on the firmware version
10 // in the configuration, it selects the appropriate concrete implementation.
11 //
12 
14 
16 
19 
20 using namespace std;
21 using namespace edm;
22 
23 namespace l1t {
24 
27  ReturnType p;
28  //unsigned fwv = m_fwv.firmwareVersion();
29  //unsigned fwv = 1;
30 
31  // It is up to developers to choose when a new concrete firmware
32  // implementation is needed. In this example, Imp1 handles FW
33  // versions 1 and 2, while Imp2 handles FW version 3.
34 
35  switch (m_fwv){
36  case 1:
37  case 2:
38  case 3:
39  p = ReturnType(new Stage1Layer2MainProcessorFirmwareImp1(m_fwv, dbPars));
40  break;
41  default:
42  // Invalid Firmware, log an error:
43  LogError("l1t|stage 1 jets") << "Invalid firmware version requested: " << m_fwv << "\n";
44  break;
45  }
46 
47  return p;
48  }
49 
50 }
std::map< DetId, double > ReturnType
boost::shared_ptr< Stage1Layer2MainProcessor > ReturnType
SurfaceDeformation * create(int type, const std::vector< double > &params)