Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
L1Trigger
L1TCalorimeter
src
firmware
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
13
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
14
15
#include "
L1Trigger/L1TCalorimeter/interface/Stage1Layer2MainProcessorFirmware.h
"
16
17
#include "
L1Trigger/L1TCalorimeter/interface/Stage1Layer2FirmwareFactory.h
"
18
#include "
L1Trigger/L1TCalorimeter/interface/CaloParamsHelper.h
"
19
20
using namespace
std;
21
using namespace
edm;
22
23
namespace
l1t {
24
25
Stage1Layer2FirmwareFactory::ReturnType
26
Stage1Layer2FirmwareFactory::create
(
const
int
m_fwv ,
CaloParamsHelper
* dbPars){
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
}
Stage1Layer2FirmwareFactory.h
l1t::Stage1Layer2MainProcessorFirmwareImp1
Definition:
Stage1Layer2MainProcessorFirmware.h:29
MessageLogger.h
CaloParamsHelper.h
Stage1Layer2MainProcessorFirmware.h
l1t::CaloParamsHelper
Definition:
CaloParamsHelper.h:19
edm::LogError
Definition:
MessageLogger.h:164
ecaldqm::ReturnType
std::map< DetId, double > ReturnType
Definition:
DBReaderWorkers.cc:55
l1t::Stage1Layer2FirmwareFactory::ReturnType
boost::shared_ptr< Stage1Layer2MainProcessor > ReturnType
Definition:
Stage1Layer2FirmwareFactory.h:26
AlCaHLTBitMon_ParallelJobs.p
tuple p
Definition:
AlCaHLTBitMon_ParallelJobs.py:152
SurfaceDeformationFactory::create
SurfaceDeformation * create(int type, const std::vector< double > ¶ms)
Definition:
SurfaceDeformationFactory.cc:27
Generated for CMSSW Reference Manual by
1.8.5