ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
L1Topo
L1TopoInterfaces
Root
DecisionAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3
*/
4
// DecisionAlg.cxx
5
// TopoCore
6
// Created by Joerg Stelzer on 11/15/12.
7
8
#include "
L1TopoInterfaces/DecisionAlg.h
"
9
10
TCS::StatusCode
11
TCS::DecisionAlg::doReset
() {
12
return
StatusCode::SUCCESS
;
13
}
14
15
TCS::DecisionAlg::~DecisionAlg
() {}
16
17
TCS::StatusCode
18
TCS::DecisionAlg::processBitCorrect
(
const
std::vector<TCS::TOBArray const *> & input,
19
const
std::vector<TCS::TOBArray *> & output,
20
Decision
& decision )
21
{
22
return
process
(input,output,decision);
23
}
24
25
TCS::DecisionAlg
&
TCS::DecisionAlg::setHardwareBits
(
const
unsigned
int
&bitNumber,
26
const
bool
&valueDecision,
27
const
bool
&valueOverflow)
28
{
29
if
(bitNumber<
m_numberOutputBits
){
30
if
(valueDecision)
31
m_hardwareDecisionBits
|= (1 << bitNumber);
32
if
(valueOverflow)
33
m_hardwareOverflowBits
|= (1 << bitNumber);
34
}
else
if
(bitNumber<32) {
35
TRG_MSG_WARNING
(
"Cannot set hardware bits for bit number "
<<bitNumber
36
<<
" > "
<<
m_numberOutputBits
<<
" N output bits "
37
<<
" for algo "
<<
name
());
38
}
else
{
39
TRG_MSG_WARNING
(
"Cannot set hardware bits for bit number "
<<bitNumber
40
<<
" > 31 N output bits for algo "
<<
name
());
41
}
42
return
*
this
;
43
}
44
//----------------------------------------------------------
45
TCS::DecisionAlg
&
TCS::DecisionAlg::resetHardwareBits
()
46
{
47
m_hardwareDecisionBits
= 0;
48
m_hardwareOverflowBits
= 0;
49
return
*
this
;
50
}
51
//----------------------------------------------------------
52
bool
TCS::DecisionAlg::getDecisionHardwareBit
(
const
unsigned
int
&bitNumber)
const
53
{
54
bool
value =
false
;
55
if
(bitNumber<
m_numberOutputBits
){
56
value = (
m_hardwareDecisionBits
>> bitNumber) & 1;
57
}
else
{
58
TRG_MSG_WARNING
(
"Cannot get hardware decision bit "
<<bitNumber
59
<<
" > "
<<
m_numberOutputBits
<<
" N output bits "
60
<<
" for algo "
<<
name
());
61
}
62
return
value;
63
}
64
//----------------------------------------------------------
65
bool
TCS::DecisionAlg::getOverflowHardwareBit
(
const
unsigned
int
&bitNumber)
const
66
{
67
bool
value =
false
;
68
if
(bitNumber<
m_numberOutputBits
){
69
value = (
m_hardwareOverflowBits
>> bitNumber) & 1;
70
}
else
{
71
TRG_MSG_WARNING
(
"Cannot get hardware overflow bit "
<<bitNumber
72
<<
" > "
<<
m_numberOutputBits
<<
" N output bits "
73
<<
" for algo "
<<
name
());
74
}
75
return
value;
76
}
77
//----------------------------------------------------------
78
TCS::DecisionAlg
&
TCS::DecisionAlg::setFillHistosBasedOnHardware
(
const
bool
&value)
79
{
80
m_fillHistosBasedOnHardware
= value;
81
return
*
this
;
82
}
83
//----------------------------------------------------------
84
bool
TCS::DecisionAlg::fillHistosBasedOnHardware
()
const
85
{
86
return
m_fillHistosBasedOnHardware
;
87
}
88
//----------------------------------------------------------
89
TCS::DecisionAlg
&
TCS::DecisionAlg::setSkipHistos
(
const
bool
&value)
90
{
91
m_skipHistos
= value;
92
return
*
this
;
93
}
94
//----------------------------------------------------------
95
bool
TCS::DecisionAlg::skipHistos
()
const
96
{
97
return
m_skipHistos
;
98
}
99
//----------------------------------------------------------
100
bool
TCS::DecisionAlg::fillHistos
()
const
101
{
102
return
(not
m_fillHistosBasedOnHardware
or not
m_skipHistos
);
103
}
104
//----------------------------------------------------------
DecisionAlg.h
TRG_MSG_WARNING
#define TRG_MSG_WARNING(x)
Definition
Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStreamMacros.h:28
TCS::ConfigurableAlg::name
const std::string & name() const
Definition
ConfigurableAlg.h:49
TCS::DecisionAlg
Definition
DecisionAlg.h:21
TCS::DecisionAlg::setHardwareBits
DecisionAlg & setHardwareBits(const unsigned int &bitNumber, const bool &valueDecision, const bool &valueOverflow)
propagate the hardware decision bits for each output bit of this algo
Definition
DecisionAlg.cxx:25
TCS::DecisionAlg::m_numberOutputBits
unsigned int m_numberOutputBits
Definition
DecisionAlg.h:93
TCS::DecisionAlg::m_hardwareDecisionBits
uint32_t m_hardwareDecisionBits
! decision bits from hardware (assume the algo won't have >31 output bits)
Definition
DecisionAlg.h:95
TCS::DecisionAlg::m_hardwareOverflowBits
uint32_t m_hardwareOverflowBits
! overflow bits from hardware (assume the algo won't have >31 output bits)
Definition
DecisionAlg.h:97
TCS::DecisionAlg::fillHistosBasedOnHardware
bool fillHistosBasedOnHardware() const
! getter
Definition
DecisionAlg.cxx:84
TCS::DecisionAlg::fillHistos
bool fillHistos() const
whether the monitoring histograms should be filled
Definition
DecisionAlg.cxx:100
TCS::DecisionAlg::skipHistos
bool skipHistos() const
! getter
Definition
DecisionAlg.cxx:95
TCS::DecisionAlg::m_skipHistos
bool m_skipHistos
! skip filling monitoring histos, used only when m_fillHistosBasedOnHardware==true
Definition
DecisionAlg.h:101
TCS::DecisionAlg::m_fillHistosBasedOnHardware
bool m_fillHistosBasedOnHardware
! fill accept/reject monitoring histos based on hdw decision
Definition
DecisionAlg.h:99
TCS::DecisionAlg::processBitCorrect
virtual TCS::StatusCode processBitCorrect(const std::vector< TCS::TOBArray const * > &input, const std::vector< TCS::TOBArray * > &output, Decision &decison)=0
Definition
DecisionAlg.cxx:18
TCS::DecisionAlg::getOverflowHardwareBit
bool getOverflowHardwareBit(const unsigned int &bitNumber) const
! get one hardware overflow bit from this algo
Definition
DecisionAlg.cxx:65
TCS::DecisionAlg::~DecisionAlg
virtual ~DecisionAlg()
Definition
DecisionAlg.cxx:15
TCS::DecisionAlg::getDecisionHardwareBit
bool getDecisionHardwareBit(const unsigned int &bitNumber) const
! get one hardware decision bit from this algo
Definition
DecisionAlg.cxx:52
TCS::DecisionAlg::setSkipHistos
DecisionAlg & setSkipHistos(const bool &value)
! toggle m_skipHistos (see TopoSteering::setOutputAlgosSkipHistograms)
Definition
DecisionAlg.cxx:89
TCS::DecisionAlg::setFillHistosBasedOnHardware
DecisionAlg & setFillHistosBasedOnHardware(const bool &value)
! toggle m_fillHistosBasedOnHardware
Definition
DecisionAlg.cxx:78
TCS::DecisionAlg::doReset
virtual StatusCode doReset()
Definition
DecisionAlg.cxx:11
TCS::DecisionAlg::resetHardwareBits
DecisionAlg & resetHardwareBits()
! reset all hardware bits for this algo
Definition
DecisionAlg.cxx:45
TCS::Decision
Definition
Decision.h:19
TCS::StatusCode
Definition
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:15
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
process
const std::string process
Definition
fbtTestBasics.cxx:76
Generated on
for ATLAS Offline Software by
1.17.0