ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigConfiguration
TrigConfMuctpi
src
L1MuonPtEncoding.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigConfMuctpi/MioctROIGeometry.h
"
6
#include "
TrigConfMuctpi/L1MuonPtEncoding.h
"
7
#include <iostream>
8
9
using namespace
std
;
10
11
12
void
13
L1MuonPtEncoding::setCodingInfo
(
unsigned
int
idx,
unsigned
int
ptCode,
unsigned
int
thresholdValue ) {
14
auto
&
x
=
m_encoding
[idx];
15
x
.ptCode = ptCode;
16
x
.thresholdValue = thresholdValue;
17
}
18
19
void
20
L1MuonPtEncoding::getCodingInfo
(
unsigned
int
idx,
unsigned
int
& ptCode,
unsigned
int
& thresholdValue )
const
{
21
auto
&
x
=
m_encoding
[idx];
22
ptCode =
x
.ptCode;
23
thresholdValue =
x
.thresholdValue;
24
}
25
26
void
27
L1MuonPtEncoding::print
(
const
std::string& indent,
unsigned
int
/*detail*/
)
const
{
28
uint
idx = 1;
29
for
(
auto
&
x
:
m_encoding
) {
30
cout << indent <<
"pt "
<< idx++
31
<<
", thr "
<<
x
.thresholdValue
32
<<
" -> code = "
<<
x
.ptCode << endl;
33
}
34
}
35
36
void
37
L1MuonPtEncoding::writeXML
(std::ostream &
xmlfile
,
int
indentLevel,
int
indentWidth)
const
{
38
uint
idx = 1;
39
mioctIndent
(
xmlfile
, indentLevel, indentWidth) <<
"<PtEncoding>"
<< endl;
40
for
(
auto
&
x
:
m_encoding
) {
41
mioctIndent
(
xmlfile
, indentLevel+1, indentWidth)
42
<<
"<PtCodeElement pt=\""
<< idx++
43
<<
"\" code=\""
<<
x
.ptCode
44
<<
"\" value=\""
<<
x
.thresholdValue
45
<<
"\"/>\n"
;
46
}
47
mioctIndent
(
xmlfile
, indentLevel, indentWidth) <<
"</PtEncoding>"
<< endl;
48
}
L1MuonPtEncoding.h
uint
unsigned int uint
Definition
LArOFPhaseFill.cxx:19
mioctIndent
std::ostream & mioctIndent(std::ostream &o, int lvl, int size)
Definition
MioctROIGeometry.cxx:12
MioctROIGeometry.h
x
#define x
L1MuonPtEncoding::setCodingInfo
void setCodingInfo(unsigned int idx, unsigned int ptCode, unsigned int thresholdValue)
Definition
L1MuonPtEncoding.cxx:13
L1MuonPtEncoding::writeXML
void writeXML(std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const
Definition
L1MuonPtEncoding.cxx:37
L1MuonPtEncoding::getCodingInfo
void getCodingInfo(unsigned int idx, unsigned int &ptCode, unsigned int &thresholdValue) const
Definition
L1MuonPtEncoding.cxx:20
L1MuonPtEncoding::print
void print(const std::string &indent="", unsigned int detail=1) const
Definition
L1MuonPtEncoding.cxx:27
L1MuonPtEncoding::m_encoding
code m_encoding[6]
Definition
L1MuonPtEncoding.h:29
xmlfile
static std::vector< std::string > xmlfile
Definition
iLumiCalc.h:29
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0