L1Trigger
RPCTechnicalTrigger
interface
LogicTool.h
Go to the documentation of this file.
1
#ifndef LOGICTOOL_H
2
#define LOGICTOOL_H 1
3
4
// Include files
5
#include "
L1Trigger/RPCTechnicalTrigger/interface/LogicFactory.h
"
6
#include "
L1Trigger/RPCTechnicalTrigger/interface/LogicImp.h
"
7
8
#include <ostream>
9
#include <vector>
10
#include <cassert>
11
21
template
<
class
GenLogic>
22
class
LogicTool
{
23
public
:
25
LogicTool
() {}
26
28
29
std::unique_ptr<GenLogic>
retrieve
(
const
std::string
& _logic_name) {
return
rbclogic
().
CreateObject
(_logic_name); };
30
31
protected
:
32
private
:
33
using
RBCLogicType
=
LogicFactory<GenLogic, std::string>
;
34
35
static
RBCLogicType
initialise
() {
36
GenLogic* (*createlogic)();
37
bool
status
(
true
);
38
39
RBCLogicType
rbclogic
;
40
//...
41
std::string
key
=
std::string
(
"ChamberORLogic"
);
42
createlogic = (GenLogic * (*)()) &
createChamberORLogic
;
43
status
=
rbclogic
.
Register
(
key
, createlogic);
44
45
key
=
std::string
(
"TestLogic"
);
46
createlogic = (GenLogic * (*)()) &
createTestLogic
;
47
status
=
rbclogic
.
Register
(
key
, createlogic);
48
49
key
=
std::string
(
"PatternLogic"
);
50
createlogic = (GenLogic * (*)()) &
createPatternLogic
;
51
status
=
rbclogic
.
Register
(
key
, createlogic);
52
//...
53
54
key
=
std::string
(
"TrackingAlg"
);
55
createlogic = (GenLogic * (*)()) &
createTrackingAlg
;
56
status
=
rbclogic
.
Register
(
key
, createlogic);
57
58
key
=
std::string
(
"SectorORLogic"
);
59
createlogic = (GenLogic * (*)()) &
createSectorORLogic
;
60
status
=
rbclogic
.
Register
(
key
, createlogic);
61
62
key
=
std::string
(
"TwoORLogic"
);
63
createlogic = (GenLogic * (*)()) &
createTwoORLogic
;
64
status
=
rbclogic
.
Register
(
key
, createlogic);
65
66
key
=
std::string
(
"WedgeORLogic"
);
67
createlogic = (GenLogic * (*)()) &
createWedgeORLogic
;
68
status
=
rbclogic
.
Register
(
key
, createlogic);
69
70
key
=
std::string
(
"PointingLogic"
);
71
createlogic = (GenLogic * (*)()) &
createPointingLogic
;
72
status
=
rbclogic
.
Register
(
key
, createlogic);
73
74
assert
(
status
);
75
return
rbclogic
;
76
};
77
78
static
RBCLogicType
const
&
rbclogic
() {
79
static
const
RBCLogicType
s_rbclogic =
initialise
();
80
return
s_rbclogic;
81
}
82
};
83
#endif // LOGICTOOL_H
LogicTool::rbclogic
static RBCLogicType const & rbclogic()
Definition:
LogicTool.h:78
createTrackingAlg
TTUTrackingAlg * createTrackingAlg()
Definition:
LogicImp.cc:15
LogicTool::LogicTool
LogicTool()
Standard constructor.
Definition:
LogicTool.h:25
mps_update.status
status
Definition:
mps_update.py:69
LogicFactory.h
cms::cuda::assert
assert(be >=bs)
createTestLogic
RBCTestLogic * createTestLogic()
Definition:
LogicImp.cc:12
LogicTool::initialise
static RBCLogicType initialise()
Definition:
LogicTool.h:35
LogicFactory::CreateObject
std::unique_ptr< Ilogic > CreateObject(const Identifier &id) const
Definition:
LogicFactory.h:28
LogicTool
Definition:
LogicTool.h:22
createPatternLogic
RBCPatternLogic * createPatternLogic()
Definition:
LogicImp.cc:14
createChamberORLogic
RBCChamberORLogic * createChamberORLogic()
Definition:
LogicImp.cc:13
LogicFactory::Register
bool Register(const Identifier &id, LogicCreator creator)
Definition:
LogicFactory.h:22
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
createTwoORLogic
TTUTwoORLogic * createTwoORLogic()
Definition:
LogicImp.cc:17
LogicImp.h
LogicFactory
Definition:
LogicFactory.h:20
createPointingLogic
TTUPointingLogic * createPointingLogic()
Definition:
LogicImp.cc:19
createSectorORLogic
TTUSectorORLogic * createSectorORLogic()
Definition:
LogicImp.cc:16
LogicTool::retrieve
std::unique_ptr< GenLogic > retrieve(const std::string &_logic_name)
...
Definition:
LogicTool.h:29
createWedgeORLogic
TTUWedgeORLogic * createWedgeORLogic()
Definition:
LogicImp.cc:18
crabWrapper.key
key
Definition:
crabWrapper.py:19
Generated for CMSSW Reference Manual by
1.8.16