Access to TrigConf::CTPTriggerThreshold by name.
More...
#include <ThresholdMap.h>
Access to TrigConf::CTPTriggerThreshold by name.
Definition at line 25 of file ThresholdMap.h.
◆ ThresholdMap() [1/5]
| LVL1CTP::ThresholdMap::ThresholdMap |
( |
| ) |
|
|
delete |
◆ ThresholdMap() [2/5]
Definition at line 10 of file ThresholdMap.cxx.
11{
12
13 for (
auto & thr :
l1menu->thresholds() ) {
14 CTPTriggerThreshold * ctpThr =
new CTPTriggerThreshold(
thr->name());
15
16
17
18
19
21 }
22}
std::map< std::string, const CTPTriggerThreshold * > m_mapByName
map storing the accosiation between threshold name and CTPTriggerThreshold
◆ ThresholdMap() [3/5]
Definition at line 25 of file ThresholdMap.cxx.
26{
27 unsigned int start = 0;
28 for ( TrigConf::TriggerThreshold* thr : threshold_vector ) {
29 CTPTriggerThreshold * ctpThr =
new CTPTriggerThreshold(
thr->name());
30 unsigned int end =
start + abs(
thr->cableStart() -
thr->cableEnd() );
31 ctpThr->setStartBit( start );
32 ctpThr->setEndBit( end );
35 }
36}
◆ ThresholdMap() [4/5]
Definition at line 38 of file ThresholdMap.cxx.
40{
41 for ( TrigConf::TriggerThreshold* thr : threshold_vector ) {
42 CTPTriggerThreshold * ctpThr =
new CTPTriggerThreshold(
thr->name());
43
44 int pit_start=999;
45 int pit_end=-999;
46 for( TrigConf::PIT* pit : pit_vector ) {
47 if( pit->thresholdName() !=
thr->name() )
48 continue;
49 if( pit->pitNumber() < pit_start )
50 pit_start = pit->pitNumber();
51 if( pit->pitNumber() > pit_end )
52 pit_end = pit->pitNumber();
53 }
54 ctpThr->setStartBit( pit_start );
55 ctpThr->setEndBit( pit_end );
57 }
58}
◆ ThresholdMap() [5/5]
Definition at line 61 of file ThresholdMap.cxx.
63{
64 for ( TrigConf::TriggerThreshold* thr : threshold_vector ) {
65 CTPTriggerThreshold * ctpThr =
new CTPTriggerThreshold(
thr->name());
66
67 int tip_start=999;
68 int tip_end=-999;
69 for( TrigConf::TIP* tip : tip_vector){
70 if( tip->thresholdName() !=
thr->name() )
71 continue;
72 if( tip->tipNumber() < tip_start)
73 tip_start = tip->tipNumber();
74 if( tip->tipNumber() > tip_end )
75 tip_end = tip->tipNumber();
76 }
77 ctpThr->setStartBit( tip_start );
78 ctpThr->setEndBit( tip_end );
80 }
81}
◆ ~ThresholdMap()
| LVL1CTP::ThresholdMap::~ThresholdMap |
( |
| ) |
|
◆ getCTPThreshold()
Definition at line 100 of file ThresholdMap.cxx.
100 {
101 try {
103 }
104 catch(std::exception&) {
105 throw std::runtime_error("Threshold " + thrName + " not present in CTPSimulation's internal threshold map");
106 }
107}
◆ getThresholdNames()
| std::vector< std::string > LVL1CTP::ThresholdMap::getThresholdNames |
( |
| ) |
const |
Definition at line 90 of file ThresholdMap.cxx.
90 {
91 std::vector<std::string> thrNames;
94 thrNames.emplace_back(
entry.first);
95 }
96 return thrNames;
97}
◆ m_mapByName
The documentation for this class was generated from the following files: