ATLAS Offline Software
Loading...
Searching...
No Matches
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):
8
9// stl includes
10#include <sstream>
11#include <iomanip>
12
13// Local include(s):
15
16namespace 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
29
33
34 const Header& EMTauResult::header() const {
36 }
37
40 }
41
42 const std::vector< EMTauRoI >& EMTauResult::roIVec() const {
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
Header m_EMTauResultHeader
header fragment in LVL1 eformat
Definition EMTauResult.h:54
const Header & header() const
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string
Trailer m_EMTauResultTrailer
trailer fragment in LVL1 eformat
Definition EMTauResult.h:55
const std::vector< EMTauRoI > & roIVec() const
const std::string dump() const
dump raw object content to string
const Trailer & trailer() const
std::vector< EMTauRoI > m_EMTauResultRoIVec
raw data content (RoIs)
Definition EMTauResult.h:56
Header models the LVL1 ROD Header.
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string
const std::string dump() const
dump raw object content to string
ROIB::Trailer models the LVL1 ROD Trailer.
Definition Trailer.h:37
const std::string dump() const
dump raw object content to string
Definition Trailer.cxx:45
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string
Definition Trailer.cxx:56
std::string head(std::string s, const std::string &pattern)
head of a string
const std::string convertToHex(const uint32_t word)
helper function to dump a number in hex format
Namespace of the LVL1 RoIB simulation.
STL namespace.