ATLAS Offline Software
Loading...
Searching...
No Matches
ROIB::MuCTPIResult Class Reference

Class holding the RoIs from the MuCTPI collected by the RoIB. More...

#include <MuCTPIResult.h>

Collaboration diagram for ROIB::MuCTPIResult:

Public Member Functions

 MuCTPIResult (Header &&head, Trailer &&trail, std::vector< MuCTPIRoI > &&roIVector)
 Constructor with header, trailer and RoI vector.
 MuCTPIResult ()
 Default constructor.
 ~MuCTPIResult ()=default
 Destructor.
 MuCTPIResult (MuCTPIResult &&) noexcept=default
MuCTPIResultoperator= (MuCTPIResult &&) noexcept=default
const Headerheader () const
 Member function returning the header.
const Trailertrailer () const
 Member function returning the trailer.
const std::vector< MuCTPIRoI > & roIVec () const
 Member function returning the RoI vector.
const std::string dump () const
 dump raw object content to string
const std::string print (const bool longFormat=false) const
 print object content in a human readable format to string
void dumpData () const
 Function dumping the stored information to the message stream.
void dumpData (MsgStream &) const
 Function dumping the stored information to the message stream.

Private Attributes

Header m_MuCTPIResultHeader
 Variable storing the header for the MuCTPI block.
Trailer m_MuCTPIResultTrailer
 Variable storing the trailer for the MuCTPI block.
std::vector< MuCTPIRoIm_MuCTPIResultRoIVec
 Variable storing the MuCTPI RoIs collected by the RoIB.

Detailed Description

Class holding the RoIs from the MuCTPI collected by the RoIB.

Date
2008-02-01 17:04:19
   The RoIBuilder receives input from the LVL1 calorimeter trigger,
   the CTP and the MuCTPI. In its output the RoIs coming from the
   MuCTPI are stored in one of these objects.
See also
ROIB::RoIBuilder
ROIB::RoIBResult
ROIB::Header
ROIB::Trailer
ROIB::MuCTPIRoI
Author
Thomas Schoerner-Sadenius thoma.nosp@m.s.sc.nosp@m.hoern.nosp@m.er@c.nosp@m.ern.c.nosp@m.h
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h
David Berge David.nosp@m..Ber.nosp@m.ge@ce.nosp@m.rn.c.nosp@m.h
Version
Revision
1.7

Definition at line 44 of file MuCTPIResult.h.

Constructor & Destructor Documentation

◆ MuCTPIResult() [1/3]

ROIB::MuCTPIResult::MuCTPIResult ( Header && head,
Trailer && trail,
std::vector< MuCTPIRoI > && roIVector )

Constructor with header, trailer and RoI vector.

This constructor is used by the RoIB simulation to create the object from the class.

Parameters
headReference to the header to be used by the object
trailReference to the trailer to be used by the object
roIVectorVector of muon RoIs collected from the MuCTPI

Definition at line 31 of file MuCTPIResult.cxx.

32 : m_MuCTPIResultHeader( std::move(head) ), m_MuCTPIResultTrailer( std::move(trail) ),
33 m_MuCTPIResultRoIVec( std::move(roIVector) ) {
34
35 }
std::vector< MuCTPIRoI > m_MuCTPIResultRoIVec
Variable storing the MuCTPI RoIs collected by the RoIB.
Header m_MuCTPIResultHeader
Variable storing the header for the MuCTPI block.
Trailer m_MuCTPIResultTrailer
Variable storing the trailer for the MuCTPI block.
std::string head(std::string s, const std::string &pattern)
head of a string

◆ MuCTPIResult() [2/3]

ROIB::MuCTPIResult::MuCTPIResult ( )

Default constructor.

Empty constructor needed by POOL to be able to stream the objects.

Definition at line 40 of file MuCTPIResult.cxx.

◆ ~MuCTPIResult()

ROIB::MuCTPIResult::~MuCTPIResult ( )
default

Destructor.

◆ MuCTPIResult() [3/3]

ROIB::MuCTPIResult::MuCTPIResult ( MuCTPIResult && )
defaultnoexcept

Member Function Documentation

◆ dump()

const std::string ROIB::MuCTPIResult::dump ( ) const

dump raw object content to string

method used for read/write testing and T/P separation

Definition at line 73 of file MuCTPIResult.cxx.

74 {
75 std::ostringstream s;
76
77 s << " [" << this->header().dump() << "] ";
78 s << " [";
79 for (std::vector<MuCTPIRoI>::size_type i(0); i < roIVec().size(); ++i) {
80 s << LVL1CTP::convertToHex(roIVec()[i].roIWord());
81 }
82 s << "] ";
83 s << " [" << this->trailer().dump() << "] ";
84
85 return s.str();
86 }
const std::string dump() const
dump raw object content to string
const Header & header() const
Member function returning the header.
const Trailer & trailer() const
Member function returning the trailer.
const std::vector< MuCTPIRoI > & roIVec() const
Member function returning the RoI vector.
const std::string dump() const
dump raw object content to string
Definition Trailer.cxx:45
const std::string convertToHex(const uint32_t word)
helper function to dump a number in hex format

◆ dumpData() [1/2]

void ROIB::MuCTPIResult::dumpData ( ) const

Function dumping the stored information to the message stream.

This function is not responsible for actually printing the information, it just creates a message stream to print the information to with MuCTPIResult::dumpData(MsgStream&) const.

Definition at line 140 of file MuCTPIResult.cxx.

140 {
141
142 SmartIF<IMessageSvc> msgSvc{Gaudi::svcLocator()->service("MessageSvc")};
143 if ( !msgSvc ) {
144 return;
145 }
146 MsgStream log( msgSvc, "MuCTPIResult" );
147 dumpData( log );
148
149 return;
150 }
void dumpData() const
Function dumping the stored information to the message stream.
msgSvc
Provide convenience handles for various services.
Definition StdJOSetup.py:36

◆ dumpData() [2/2]

void ROIB::MuCTPIResult::dumpData ( MsgStream & log) const

Function dumping the stored information to the message stream.

Function printing the information stored in the object in an easy-to-read fashion.

It calls Header::dumpData(MsgStream&) const and Trailer::dumpData(MsgStream&) const to print their information as well.

Parameters
logA message stream to print the information to

Definition at line 159 of file MuCTPIResult.cxx.

159 {
160
161 log << MSG::DEBUG << "*BEGIN* MuCTPIResult" << endmsg;
162
163 m_MuCTPIResultHeader.dumpData( log );
164 int counter = 0;
165 std::vector< MuCTPIRoI >::const_iterator it = m_MuCTPIResultRoIVec.begin();
166 for( ; it != m_MuCTPIResultRoIVec.end(); ++it, ++counter ) {
167
168 std::string loc = "UNDEFINED";
169 if( it->getSectorLocation() == MuCTPI_RDO::ENDCAP )
170 loc = "ENDCAP";
171 else if( it->getSectorLocation() == MuCTPI_RDO::FORWARD )
172 loc = "FORWARD";
173 else if( it->getSectorLocation() == MuCTPI_RDO::BARREL )
174 loc = "BARREL";
175
176 log << MSG::DEBUG << "RoI word[" << counter << "] : 0x"
177 << MSG::hex << it->roIWord() << MSG::dec << endmsg;
178 log << MSG::DEBUG << "Threshold : pt" << it->pt() << endmsg;
179 log << MSG::DEBUG << "Sector location : " << loc << endmsg;
180 log << MSG::DEBUG << "Sector ID : " << it->getSectorID() << endmsg;
181 log << MSG::DEBUG << "Sector addr : 0x" << MSG::hex
182 << it->getSectorID() << MSG::dec << endmsg;
183 log << MSG::DEBUG << "Sector overflow : " << it->getSectorOverflow() << endmsg;
184 log << MSG::DEBUG << "RoI overflow : " << it->getRoiOverflow() << endmsg;
185 log << MSG::DEBUG << "RoI number : " << it->getRoiNumber() << endmsg;
186 //log << MSG::DEBUG << "IsHighestPt : " << it->getCandidateIsHighestPt() << endmsg;
187 log << MSG::DEBUG << "Overlap : " << it->getOverlapBits() << endmsg;
188
189 }
190 m_MuCTPIResultTrailer.dumpData( log );
191 log << MSG::DEBUG << "*END* MuCTPIResult" << endmsg;
192
193 return;
194 }
#define endmsg

◆ header()

const Header & ROIB::MuCTPIResult::header ( ) const

Member function returning the header.

Simply returning a constant reference to the variable.

Returns
Constant reference to the header

Definition at line 51 of file MuCTPIResult.cxx.

51 {
53 }

◆ operator=()

MuCTPIResult & ROIB::MuCTPIResult::operator= ( MuCTPIResult && )
defaultnoexcept

◆ print()

const std::string ROIB::MuCTPIResult::print ( const bool longFormat = false) const

print object content in a human readable format to string

Definition at line 88 of file MuCTPIResult.cxx.

89 {
90 std::ostringstream s;
91
92 s << "header [" << this->header().print(longFormat) << "] ";
93 if (longFormat) s << std::endl;
94
95 for(std::vector< MuCTPIRoI >::size_type i(0); i < roIVec().size(); ++i ) {
96
97 std::string loc = "UNDEFINED";
98 if( roIVec()[i].getSectorLocation() == MuCTPI_RDO::ENDCAP )
99 loc = "ENDCAP";
100 else if( roIVec()[i].getSectorLocation() == MuCTPI_RDO::FORWARD )
101 loc = "FORWARD";
102 else if( roIVec()[i].getSectorLocation() == MuCTPI_RDO::BARREL )
103 loc = "BARREL";
104
105 if (i == 0 || longFormat) s << "data";
106 if (longFormat) s << "[" << std::setw(2) << i << "]";
107
108 s << " [";
109 if (longFormat) s << LVL1CTP::convertToHex(roIVec()[i].roIWord());
110 if (longFormat) s << std::setw(12) << "\n Threshold: ";
111 s << " " << roIVec()[i].pt();
112 if (longFormat) s << std::setw(12) << "\n Sector location: ";
113 s << " " << loc;
114 if (longFormat) s << std::setw(12) << "\n Sector ID:";
115 s << " " << roIVec()[i].getSectorID();
116 if (longFormat) s << std::setw(12) << "\n Sector addr:";
117 s << " " << LVL1CTP::convertToHex(roIVec()[i].getSectorID());
118 if (longFormat) s << std::setw(12) << "\n Sector overflow:";
119 s << " " << roIVec()[i].getSectorOverflow();
120 if (longFormat) s << std::setw(12) << "\n RoI overflow:";
121 s << " " << roIVec()[i].getRoiOverflow();
122 if (longFormat) s << std::setw(12) << "\n RoI number:";
123 s << " " << roIVec()[i].getRoiNumber();
124 //if (longFormat) s << std::setw(12) << "\n IsHighestPt:";
125 //s << " " << roIVec()[i].getCandidateIsHighestPt();
126 if (longFormat) s << std::setw(12) << "\n Overlap:";
127 s << " " << roIVec()[i].getOverlapBits();
128 s << "] ";
129 }
130 s << "trailer [" << this->trailer().print(longFormat) << "] ";
131
132 return s.str();
133 }
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string
Definition Trailer.cxx:56

◆ roIVec()

const vector< MuCTPIRoI > & ROIB::MuCTPIResult::roIVec ( ) const

Member function returning the RoI vector.

Simply returning a constant reference to the variable.

Returns
Constant reference to the RoI vector

Definition at line 69 of file MuCTPIResult.cxx.

69 {
71 }

◆ trailer()

const Trailer & ROIB::MuCTPIResult::trailer ( ) const

Member function returning the trailer.

Simply returning a constant reference to the variable.

Returns
Constant reference to the trailer

Definition at line 60 of file MuCTPIResult.cxx.

60 {
62 }

Member Data Documentation

◆ m_MuCTPIResultHeader

Header ROIB::MuCTPIResult::m_MuCTPIResultHeader
private

Variable storing the header for the MuCTPI block.

Definition at line 77 of file MuCTPIResult.h.

◆ m_MuCTPIResultRoIVec

std::vector< MuCTPIRoI > ROIB::MuCTPIResult::m_MuCTPIResultRoIVec
private

Variable storing the MuCTPI RoIs collected by the RoIB.

Definition at line 81 of file MuCTPIResult.h.

◆ m_MuCTPIResultTrailer

Trailer ROIB::MuCTPIResult::m_MuCTPIResultTrailer
private

Variable storing the trailer for the MuCTPI block.

Definition at line 79 of file MuCTPIResult.h.


The documentation for this class was generated from the following files: