ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
TrigT1Result
src
EMTauResult.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
// Local include(s):
7
#include "
TrigT1Result/EMTauResult.h
"
8
9
// stl includes
10
#include <sstream>
11
#include <iomanip>
12
13
// Local include(s):
14
#include "
TrigT1Interfaces/TrigT1CTPDefs.h
"
15
16
namespace
ROIB
{
17
18
EMTauResult::EMTauResult
(
Header
&&
head
,
Trailer
&& trail, std::vector< EMTauRoI >&& roIVector )
19
:
m_EMTauResultHeader
(
std
::move(
head
) ),
m_EMTauResultTrailer
(
std
::move(trail) ),
20
m_EMTauResultRoIVec
(
std
::move(roIVector) ) {
21
22
}
23
24
EMTauResult::EMTauResult
()
25
:
m_EMTauResultHeader
(),
m_EMTauResultTrailer
(),
26
m_EMTauResultRoIVec
() {
27
28
}
29
30
EMTauResult::~EMTauResult
() {
31
32
}
33
34
const
Header
&
EMTauResult::header
()
const
{
35
return
m_EMTauResultHeader
;
36
}
37
38
const
Trailer
&
EMTauResult::trailer
()
const
{
39
return
m_EMTauResultTrailer
;
40
}
41
42
const
std::vector< EMTauRoI >&
EMTauResult::roIVec
()
const
{
43
return
m_EMTauResultRoIVec
;
44
}
45
46
const
std::string
EMTauResult::dump
()
const
47
{
48
std::ostringstream s;
49
50
s <<
" ["
<< this->
header
().
dump
() <<
"] "
;
51
s <<
" ["
;
52
for
(std::vector<EMTauRoI>::size_type i(0); i <
roIVec
().size(); ++i) {
53
s <<
LVL1CTP::convertToHex
(
roIVec
()[i].roIWord());
54
}
55
s <<
"] "
;
56
s <<
" ["
<< this->
trailer
().
dump
() <<
"] "
;
57
58
return
s.str();
59
}
60
61
const
std::string
EMTauResult::print
(
const
bool
longFormat)
const
62
{
63
std::ostringstream s;
64
65
s <<
"\n header ["
<< this->
header
().
print
(longFormat) <<
"] "
;
66
if
(longFormat) s << std::endl;
67
68
for
(std::vector<EMTauRoI>::size_type i(0); i <
roIVec
().size(); ++i) {
69
70
if
(i == 0 || longFormat) s <<
"data"
;
71
if
(longFormat) s <<
"["
<< std::setw(2) << i <<
"]"
;
72
73
s <<
" ["
;
74
if
(longFormat) s <<
LVL1CTP::convertToHex
(
roIVec
()[i].roIWord());
75
if
(longFormat) s << std::setw(12) <<
"\n Type: "
;
76
s <<
" "
<<
roIVec
()[i].roIType();
77
if
(longFormat) s << std::setw(12) <<
"\n ID: "
;
78
s <<
" "
<<
roIVec
()[i].electronicsID();
79
if
(longFormat) s << std::setw(12) <<
"\n Threshold: "
;
80
using namespace
LVL1CTP
;
// for importing operator<<
81
s <<
" "
<<
roIVec
()[i].thresholds();
82
s <<
"] "
;
83
}
84
s <<
"trailer ["
<< this->
trailer
().
print
(longFormat) <<
"] "
;
85
86
return
s.str();
87
}
88
89
}
// namespace ROIB
EMTauResult.h
TrigT1CTPDefs.h
ROIB::EMTauResult::m_EMTauResultHeader
Header m_EMTauResultHeader
header fragment in LVL1 eformat
Definition
EMTauResult.h:54
ROIB::EMTauResult::header
const Header & header() const
Definition
EMTauResult.cxx:34
ROIB::EMTauResult::print
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string
Definition
EMTauResult.cxx:61
ROIB::EMTauResult::m_EMTauResultTrailer
Trailer m_EMTauResultTrailer
trailer fragment in LVL1 eformat
Definition
EMTauResult.h:55
ROIB::EMTauResult::roIVec
const std::vector< EMTauRoI > & roIVec() const
Definition
EMTauResult.cxx:42
ROIB::EMTauResult::dump
const std::string dump() const
dump raw object content to string
Definition
EMTauResult.cxx:46
ROIB::EMTauResult::~EMTauResult
~EMTauResult()
Definition
EMTauResult.cxx:30
ROIB::EMTauResult::EMTauResult
EMTauResult()
Definition
EMTauResult.cxx:24
ROIB::EMTauResult::trailer
const Trailer & trailer() const
Definition
EMTauResult.cxx:38
ROIB::EMTauResult::m_EMTauResultRoIVec
std::vector< EMTauRoI > m_EMTauResultRoIVec
raw data content (RoIs)
Definition
EMTauResult.h:56
ROIB::Header
Header models the LVL1 ROD Header.
Definition
TrigT1Result/TrigT1Result/Header.h:37
ROIB::Header::print
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string
Definition
TrigT1Result/src/Header.cxx:80
ROIB::Header::dump
const std::string dump() const
dump raw object content to string
Definition
TrigT1Result/src/Header.cxx:69
ROIB::Trailer
ROIB::Trailer models the LVL1 ROD Trailer.
Definition
Trailer.h:37
ROIB::Trailer::dump
const std::string dump() const
dump raw object content to string
Definition
Trailer.cxx:45
ROIB::Trailer::print
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string
Definition
Trailer.cxx:56
head
std::string head(std::string s, const std::string &pattern)
head of a string
Definition
computils.cxx:312
LVL1CTP
Definition
Lvl1ResultAccessTool.h:20
LVL1CTP::convertToHex
const std::string convertToHex(const uint32_t word)
helper function to dump a number in hex format
Definition
TrigT1CTPDefs.h:41
ROIB
Namespace of the LVL1 RoIB simulation.
Definition
ILvl1ResultAccessTool.h:19
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0